@@ -27,17 +27,19 @@ The following models have been tested on Linux systems.
2727
2828| Model | Source | Dataset | FP32 Accuracy (top-1/top-5)| INT8 Accuracy (top-1/top-5)|
2929| :---| :---| ---| :---:| :---:|
30+ | [ ResNet18-V1] ( #3 ) | [ Gluon-CV] ( https://gluon-cv.mxnet.io/model_zoo/classification.html ) | [ Validation Dataset] ( http://data.mxnet.io/data/val_256_q90.rec ) | 70.07%/89.30%| 69.85%/89.23%|
3031| [ ResNet50-V1] ( #3 ) | [ Gluon-CV] ( https://gluon-cv.mxnet.io/model_zoo/classification.html ) | [ Validation Dataset] ( http://data.mxnet.io/data/val_256_q90.rec ) | 75.87%/92.72% | 75.71%/92.65% |
31- | [ ResNet101-V1] ( #4 ) | [ Gluon-CV] ( https://gluon-cv.mxnet.io/model_zoo/classification.html ) | [ Validation Dataset] ( http://data.mxnet.io/data/val_256_q90.rec ) | 77.3%/93.58% | 77.09%/93.41% |
32- | [ Squeezenet 1.0] ( #5 ) | [ Gluon-CV] ( https://gluon-cv.mxnet.io/model_zoo/classification.html ) | [ Validation Dataset] ( http://data.mxnet.io/data/val_256_q90.rec ) | 57.01%/79.71%| 56.62%/79.55%|
33- | [ MobileNet 1.0] ( #6 ) | [ Gluon-CV] ( https://gluon-cv.mxnet.io/model_zoo/classification.html ) | [ Validation Dataset] ( http://data.mxnet.io/data/val_256_q90.rec ) | 69.76%/89.32%| 69.61%/89.09%|
32+ | [ ResNet101-V1] ( #3 ) | [ Gluon-CV] ( https://gluon-cv.mxnet.io/model_zoo/classification.html ) | [ Validation Dataset] ( http://data.mxnet.io/data/val_256_q90.rec ) | 77.3%/93.58% | 77.09%/93.41% |
33+ | [ Squeezenet 1.0] ( #4 ) | [ Gluon-CV] ( https://gluon-cv.mxnet.io/model_zoo/classification.html ) | [ Validation Dataset] ( http://data.mxnet.io/data/val_256_q90.rec ) | 57.01%/79.71%| 56.62%/79.55%|
34+ | [ MobileNet 1.0] ( #5 ) | [ Gluon-CV] ( https://gluon-cv.mxnet.io/model_zoo/classification.html ) | [ Validation Dataset] ( http://data.mxnet.io/data/val_256_q90.rec ) | 69.76%/89.32%| 69.61%/89.09%|
35+ | [ MobileNetV2 1.0] ( #6 ) | [ Gluon-CV] ( https://gluon-cv.mxnet.io/model_zoo/classification.html ) | [ Validation Dataset] ( http://data.mxnet.io/data/val_256_q90.rec ) | 70.14%/89.60%| 69.53%/89.24%|
3436| [ Inception V3] ( #7 ) | [ Gluon-CV] ( https://gluon-cv.mxnet.io/model_zoo/classification.html ) | [ Validation Dataset] ( http://data.mxnet.io/data/val_256_q90.rec ) | 76.49%/93.10% | 76.38%/93% |
3537| [ ResNet152-V2] ( #8 ) | [ MXNet ModelZoo] ( http://data.mxnet.io/models/imagenet/resnet/152-layers/ ) | [ Validation Dataset] ( http://data.mxnet.io/data/val_256_q90.rec ) | 76.76%/93.03%| 76.48%/92.96%|
3638| [ Inception-BN] ( #9 ) | [ MXNet ModelZoo] ( http://data.mxnet.io/models/imagenet/inception-bn/ ) | [ Validation Dataset] ( http://data.mxnet.io/data/val_256_q90.rec ) | 72.09%/90.60%| 72.00%/90.53%|
3739| [ SSD-VGG16] ( #10 ) | [ example/ssd] ( https://github.com/apache/incubator-mxnet/tree/master/example/ssd ) | VOC2007/2012 | 0.8366 mAP | 0.8364 mAP |
3840| [ SSD-VGG16] ( #10 ) | [ example/ssd] ( https://github.com/apache/incubator-mxnet/tree/master/example/ssd ) | COCO2014 | 0.2552 mAP | 0.253 mAP |
3941
40- <h3 id =' 3 ' >ResNet50 -V1</h3 >
42+ <h3 id =' 3 ' >ResNet18/50/101 -V1</h3 >
4143
4244The following command is to download the pre-trained model from Gluon-CV and transfer it into the symbolic model which would be finally quantized. The [ validation dataset] ( http://data.mxnet.io/data/val_256_q90.rec ) is available for testing the pre-trained models:
4345
@@ -62,37 +64,36 @@ python imagenet_inference.py --symbol-file=./model/resnet50_v1-symbol.json --bat
6264python imagenet_inference.py --symbol-file=./model/resnet50_v1-quantized-5batches-naive-symbol.json --batch-size=64 --num-inference-batches=500 --ctx=cpu --benchmark=True
6365```
6466
65- <h3 id =' 4 ' >ResNet101-V1 </h3 >
67+ <h3 id =' 4 ' >SqueezeNet 1.0 </h3 >
6668
6769The following command is to download the pre-trained model from Gluon-CV and transfer it into the symbolic model which would be finally quantized. The [ validation dataset] ( http://data.mxnet.io/data/val_256_q90.rec ) is available for testing the pre-trained models:
6870
6971```
70- python imagenet_gen_qsym_mkldnn.py --model=resnet101_v1 --num-calib-batches=5 --calib-mode=naive
72+ python imagenet_gen_qsym_mkldnn.py --model=squeezenet1.0 --num-calib-batches=5 --calib-mode=naive
7173```
72-
7374The model would be automatically replaced in fusion and quantization format. It is then saved as the quantized symbol and parameter files in the ` ./model ` directory. The following command is to launch inference.
7475
7576```
7677# USE MKLDNN AS SUBGRAPH BACKEND
7778export MXNET_SUBGRAPH_BACKEND=MKLDNN
7879
79- # Launch FP32 Inference
80- python imagenet_inference.py --symbol-file=./model/resnet101_v1 -symbol.json --param-file=./model/resnet101_v1 -0000.params --rgb-mean=123.68,116.779,103.939 --rgb-std=58.393,57.12,57.375 --num-skipped-batches=50 --batch-size=64 --num-inference-batches=500 --dataset=./data/val_256_q90.rec --ctx=cpu --data-nthreads=1
80+ # Launch FP32 Inference
81+ python imagenet_inference.py --symbol-file=./model/squeezenet1.0 -symbol.json --param-file=./model/squeezenet1.0 -0000.params --rgb-mean=123.68,116.779,103.939 --rgb-std=58.393,57.12,57.375 --num-skipped-batches=50 --batch-size=64 --num-inference-batches=500 --dataset=./data/val_256_q90.rec --ctx=cpu --data-nthreads=1
8182
8283# Launch INT8 Inference
83- python imagenet_inference.py --symbol-file=./model/resnet101_v1 -quantized-5batches-naive-symbol.json --param-file=./model/resnet101_v1 -quantized-0000.params --rgb-mean=123.68,116.779,103.939 --rgb-std=58.393,57.12,57.375 --num-skipped-batches=50 --batch-size=64 --num-inference-batches=500 --dataset=./data/val_256_q90.rec --ctx=cpu --data-nthreads=1
84+ python imagenet_inference.py --symbol-file=./model/squeezenet1.0 -quantized-5batches-naive-symbol.json --param-file=./model/squeezenet1.0 -quantized-0000.params --rgb-mean=123.68,116.779,103.939 --rgb-std=58.393,57.12,57.375 --num-skipped-batches=50 --batch-size=64 --num-inference-batches=500 --dataset=./data/val_256_q90.rec --ctx=cpu --data-nthreads=1
8485
8586# Launch dummy data Inference
86- python imagenet_inference.py --symbol-file=./model/resnet101_v1 -symbol.json --batch-size=64 --num-inference-batches=500 --ctx=cpu --benchmark=True
87- python imagenet_inference.py --symbol-file=./model/resnet101_v1 -quantized-5batches-naive-symbol.json --batch-size=64 --num-inference-batches=500 --ctx=cpu --benchmark=True
87+ python imagenet_inference.py --symbol-file=./model/squeezenet1.0 -symbol.json --batch-size=64 --num-inference-batches=500 --ctx=cpu --benchmark=True
88+ python imagenet_inference.py --symbol-file=./model/squeezenet1.0 -quantized-5batches-naive-symbol.json --batch-size=64 --num-inference-batches=500 --ctx=cpu --benchmark=True
8889```
8990
90- <h3 id =' 5 ' >SqueezeNet 1.0</h3 >
91+ <h3 id =' 5 ' >MobileNet 1.0</h3 >
9192
9293The following command is to download the pre-trained model from Gluon-CV and transfer it into the symbolic model which would be finally quantized. The [ validation dataset] ( http://data.mxnet.io/data/val_256_q90.rec ) is available for testing the pre-trained models:
9394
9495```
95- python imagenet_gen_qsym_mkldnn.py --model=squeezenet1 .0 --num-calib-batches=5 --calib-mode=naive
96+ python imagenet_gen_qsym_mkldnn.py --model=mobilenet1 .0 --num-calib-batches=5 --calib-mode=naive
9697```
9798The model would be automatically replaced in fusion and quantization format. It is then saved as the quantized symbol and parameter files in the ` ./model ` directory. The following command is to launch inference.
9899
@@ -101,22 +102,22 @@ The model would be automatically replaced in fusion and quantization format. It
101102export MXNET_SUBGRAPH_BACKEND=MKLDNN
102103
103104# Launch FP32 Inference
104- python imagenet_inference.py --symbol-file=./model/squeezenet1 .0-symbol.json --param-file=./model/squeezenet1 .0-0000.params --rgb-mean=123.68,116.779,103.939 --rgb-std=58.393,57.12,57.375 --num-skipped-batches=50 --batch-size=64 --num-inference-batches=500 --dataset=./data/val_256_q90.rec --ctx=cpu --data-nthreads=1
105+ python imagenet_inference.py --symbol-file=./model/mobilenet1 .0-symbol.json --param-file=./model/mobilenet1 .0-0000.params --rgb-mean=123.68,116.779,103.939 --rgb-std=58.393,57.12,57.375 --num-skipped-batches=50 --batch-size=64 --num-inference-batches=500 --dataset=./data/val_256_q90.rec --ctx=cpu --data-nthreads=1
105106
106107# Launch INT8 Inference
107- python imagenet_inference.py --symbol-file=./model/squeezenet1 .0-quantized-5batches-naive-symbol.json --param-file=./model/squeezenet1 .0-quantized-0000.params --rgb-mean=123.68,116.779,103.939 --rgb-std=58.393,57.12,57.375 --num-skipped-batches=50 --batch-size=64 --num-inference-batches=500 --dataset=./data/val_256_q90.rec --ctx=cpu --data-nthreads=1
108+ python imagenet_inference.py --symbol-file=./model/mobilenet1 .0-quantized-5batches-naive-symbol.json --param-file=./model/mobilenet1 .0-quantized-0000.params --rgb-mean=123.68,116.779,103.939 --rgb-std=58.393,57.12,57.375 --num-skipped-batches=50 --batch-size=64 --num-inference-batches=500 --dataset=./data/val_256_q90.rec --ctx=cpu --data-nthreads=1
108109
109110# Launch dummy data Inference
110- python imagenet_inference.py --symbol-file=./model/squeezenet1 .0-symbol.json --batch-size=64 --num-inference-batches=500 --ctx=cpu --benchmark=True
111- python imagenet_inference.py --symbol-file=./model/squeezenet1 .0-quantized-5batches-naive-symbol.json --batch-size=64 --num-inference-batches=500 --ctx=cpu --benchmark=True
111+ python imagenet_inference.py --symbol-file=./model/mobilenet1 .0-symbol.json --batch-size=64 --num-inference-batches=500 --ctx=cpu --benchmark=True
112+ python imagenet_inference.py --symbol-file=./model/mobilenet1 .0-quantized-5batches-naive-symbol.json --batch-size=64 --num-inference-batches=500 --ctx=cpu --benchmark=True
112113```
113114
114- <h3 id =' 6 ' >MobileNet 1.0</h3 >
115+ <h3 id =' 6 ' >MobileNetV2 1.0</h3 >
115116
116117The following command is to download the pre-trained model from Gluon-CV and transfer it into the symbolic model which would be finally quantized. The [ validation dataset] ( http://data.mxnet.io/data/val_256_q90.rec ) is available for testing the pre-trained models:
117118
118119```
119- python imagenet_gen_qsym_mkldnn.py --model=mobilenet1 .0 --num-calib-batches=5 --calib-mode=naive
120+ python imagenet_gen_qsym_mkldnn.py --model=mobilenetv2_1 .0 --num-calib-batches=5 --calib-mode=naive
120121```
121122The model would be automatically replaced in fusion and quantization format. It is then saved as the quantized symbol and parameter files in the ` ./model ` directory. The following command is to launch inference.
122123
@@ -125,14 +126,14 @@ The model would be automatically replaced in fusion and quantization format. It
125126export MXNET_SUBGRAPH_BACKEND=MKLDNN
126127
127128# Launch FP32 Inference
128- python imagenet_inference.py --symbol-file=./model/mobilenet1 .0-symbol.json --param-file=./model/mobilenet1 .0-0000.params --rgb-mean=123.68,116.779,103.939 --rgb-std=58.393,57.12,57.375 --num-skipped-batches=50 --batch-size=64 --num-inference-batches=500 --dataset=./data/val_256_q90.rec --ctx=cpu --data-nthreads=1
129+ python imagenet_inference.py --symbol-file=./model/mobilenetv2_1 .0-symbol.json --param-file=./model/mobilenetv2_1 .0-0000.params --rgb-mean=123.68,116.779,103.939 --rgb-std=58.393,57.12,57.375 --num-skipped-batches=50 --batch-size=64 --num-inference-batches=500 --dataset=./data/val_256_q90.rec --ctx=cpu --data-nthreads=1
129130
130131# Launch INT8 Inference
131- python imagenet_inference.py --symbol-file=./model/mobilenet1 .0-quantized-5batches-naive-symbol.json --param-file=./model/mobilenet1 .0-quantized-0000.params --rgb-mean=123.68,116.779,103.939 --rgb-std=58.393,57.12,57.375 --num-skipped-batches=50 --batch-size=64 --num-inference-batches=500 --dataset=./data/val_256_q90.rec --ctx=cpu --data-nthreads=1
132+ python imagenet_inference.py --symbol-file=./model/mobilenetv2_1 .0-quantized-5batches-naive-symbol.json --param-file=./model/mobilenetv2_1 .0-quantized-0000.params --rgb-mean=123.68,116.779,103.939 --rgb-std=58.393,57.12,57.375 --num-skipped-batches=50 --batch-size=64 --num-inference-batches=500 --dataset=./data/val_256_q90.rec --ctx=cpu --data-nthreads=1
132133
133134# Launch dummy data Inference
134- python imagenet_inference.py --symbol-file=./model/mobilenet1 .0-symbol.json --batch-size=64 --num-inference-batches=500 --ctx=cpu --benchmark=True
135- python imagenet_inference.py --symbol-file=./model/mobilenet1 .0-quantized-5batches-naive-symbol.json --batch-size=64 --num-inference-batches=500 --ctx=cpu --benchmark=True
135+ python imagenet_inference.py --symbol-file=./model/mobilenetv2_1 .0-symbol.json --batch-size=64 --num-inference-batches=500 --ctx=cpu --benchmark=True
136+ python imagenet_inference.py --symbol-file=./model/mobilenetv2_1 .0-quantized-5batches-naive-symbol.json --batch-size=64 --num-inference-batches=500 --ctx=cpu --benchmark=True
136137```
137138
138139<h3 id =' 7 ' >Inception-V3</h3 >
0 commit comments