- NanoCls is a simple and lightweight image classification model. And it is very suitable for deployment on embedded or mobile devices. We provide Android demo and MacOS demo based on ncnn inference framework.
Config:mobilenetv2 128x128 width_mult=0.25 batch=128, lr =0.05
Input Size: torch.Size([1, 3, 128, 128])
MACS: 13.244M Params: 243.236K
val_accuracy: 0.850
Config: shufflenetv2 64x64 width_mult=0.5 batch=128, lr =0.05
Input Size: torch.Size([1, 3, 128, 128])
MACS: 13.555M Params: 345.892K
val_accuracy: 0.901
-
We provide PyTorch code, and it is very friendly for training with much lower GPU memory cost than other models. We only use grabage classification dataset as tranining dataset.
-
We also provide Pytorch code for server deployment
Download password: u94u
cd xxx/xxx/NanoCls
mkdir data
Put your train data into 'data' directory
python train.py
python predict.py
python pytorch2onnx.py
https://convertmodel.com/
-
- Modify your own CMakeList.txt
-
- Build (Apple M1 CPU)
$ sh make_macos_arm64.sh
-
- Modify your own CMakeList.txt
-
- Download password: tcmb OpenCV and NCNN libraries for Android
https://github.com/d-li14/mobilenetv2.pytorch
https://github.com/d-li14/mobilenetv3.pytorch
https://github.com/WZMIAOMIAO/deep-learning-for-image-processing