Skip to content

MobileOne - An Improved One millisecond Mobile Backbone. Unofficial Pytorch implementation for edge export - ONNX, OpenVINO.

Notifications You must be signed in to change notification settings

tersekmatija/mobileone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MobileOne - An Improved One millisecond Mobile Backbone Pytorch implementation

MobileOne block

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).

Setup

pip3 install -r requirements.txt

Demo

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.

Compare and time measure

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

TODO

  • Add support for other MobileOne backbones
  • Add export options
  • Provide training scripts

Contributions

All contributions and improvements through PRs welcome!

About

MobileOne - An Improved One millisecond Mobile Backbone. Unofficial Pytorch implementation for edge export - ONNX, OpenVINO.

Topics

Resources

Stars

Watchers

Forks

Languages