A PyTorch implementation of MobileNet V2 architecture and pretrained model.
A PyTorch implementation of MobileNet V2 architecture and pretrained model.
This is a PyTorch implementation of MobileNetV2 architecture as described in the paper Inverted Residuals and Linear Bottlenecks: Mobile Networks for Classification, Detection and Segmentation.
[NEW] Add the code to automatically download the pre-trained weights.
Recently I have figured out a good training setting:
You should get >72% top-1 accuracy with this training recipe!
Here is a comparison of statistics against the official TensorFlow implementation.
| FLOPs | Parameters | Top1-acc | Pretrained Model | |
|---|---|---|---|---|
| Official TF | 300 M | 3.47 M | 71.8% | - |
| Ours | 300.775 M | 3.471 M | 71.8% | [google drive] |
To use the pretrained model, run
from MobileNetV2 import mobilenet_v2
net = mobilenet_v2(pretrained=True)I used the following code for data pre-processing on ImageNet:
…No open issues yet, or sync has not completed.