See quantization-pytorch for Pytorch Quantizatizationn Tests
See D2Go for Instance semgementaiton on custom Vegetable dataset.
-
To Train on custom dataset run
python veg_train_infer.py --train True
-
To Validate and visualize the model
python veg_train_infer.py --val True
-
To Quantize the model
python veg_train_infer.py --m_conversion True
-
Visual results on original dataset
- With Post taining quantization we observe the classification and object detection works well while we suffer significat drop in accuracy of Dense Prediction (masks)
- With Quantization Aware Pruning we see negligible drop in accuracy. The size of final quantized model is total 7.4MB
For Android app for instance segmentaiton using MaskRCNN we added nearest Neighbout Interpolation for Masks and Canvas visualization of masks in Java. See D2Go/android-app for android app. On Huwawei P30 model runs at average of 140ms
1) See D2G0 https://github.com/facebookresearch/d2go
2) See Android App for Pytorch https://github.com/pytorch/android-demo-app