This is an unofficial implementation of MobileNetV3 in PyTorch. Currently this repo contains the small and large versions of MobileNetV3, but I plan to also implement detection and segmentation extensions.
net/
folder contains model definitionsdata/
folder is used when running training codemodels/
will store checkpoints & training logtrain_*.py
runs training
Models are found under net
folder. You can load models as follows:
from net.mobilenetv3 import MobileNetV3Large, MobileNetV3Small
model_large = MobileNetV3Large(n_classes=1000) # Or use small
The script train_cifar10.py
pulls the CIFAR10 dataset using torchvision datasets and trains a MobileNetV3 on it. Note that the dimension was upsampled to 224x224 in order to match the dimensions.
You can start the training by simply executing:
python train_cifar10.py
(WIP)
To train the models on ImageNet, run train_imagenet.py
. The script assumes that the imagenet dataset is placed under data/imagenet/
folder.
(WIP)
Implemented in net/ssdlite.py
- Training code for ImageNet
- Detection: SSDLite
- Segmentation: Lite R-ASPP