lukemelas / EfficientNet-PyTorch

A PyTorch implementation of EfficientNet
Apache License 2.0
7.89k stars 1.53k forks source link

Add EfficientNet-lite Models? #158

Open seefun opened 4 years ago

seefun commented 4 years ago

EfficientNet-lite are a set of mobile/IoT friendly image classification models. Notably, while EfficientNet-EdgeTPU that is specialized for Coral EdgeTPU, these EfficientNet-lite models run well on all mobile CPU/GPU/EdgeTPU.

Due to the requirements from edge devices, we mainly made the following changes based on the original EfficientNets.

  • Remove squeeze-and-excite (SE): SE are not well supported for some mobile accelerators.
  • Replace all swish with RELU6: for easier post-quantization.
  • Fix the stem and head while scaling models up: for keeping models small and fast.

https://github.com/tensorflow/tpu/tree/master/models/official/efficientnet/lite

This model seems very optimized for the mobile.

ml-illustrated commented 4 years ago

FYI, I did a quick port of the Lite variants and converted the pretrained weights from the official Tensorflow models at this repo: https://github.com/ml-illustrated/EfficientNet-Lite-PyTorch

The changes may be minor enough to merge into this original repo, with some work and sufficient testing. I'd be happy to create a pull request if there's interest.

lukemelas commented 4 years ago

I'd definitely be open to merging a PR once you feel your repo is ready!