This is an unofficial Pytorch implementation of MobileOne from Apple. Similar to RepVGG, they introduce a block with reparametrizable convolutions called MobileOne block.
This implementation is based on RepVGG, with Stack and Sum operations suitable for edge devices.
Currently, S0 is implemented by default, but other backbones can be trivially configured. You can find the model trained on Imagenette in the releases (or click here to download).
pip3 install -r requirements.txt
Download weights from the demo and some images with Imagenette classes. Call
python demo.py -s path/to/image/or/dir -w path/to/weights
You will see a matplotlib window with image and inferred class.
Call python compare.py
to verify that the model returns the same values in deploy mode. Code also contains script for measuring inference speed on CPU.
Backbone | Normal (ms) | Deploy (ms) |
---|---|---|
MobileOne-S0 | 0.0664 | 0.0077 |
- Add support for other MobileOne backbones
- Add export options
- Provide training scripts
All contributions and improvements through PRs welcome!