Skip to content

Commit 8e893eb

Browse files
yuwenzhojcwchen
andauthored
add alexnet, caffenet and squeezenet qdq models (#571)
Signed-off-by: yuwenzho <[email protected]> Signed-off-by: yuwenzho <[email protected]> Co-authored-by: Chun-Wei Chen <[email protected]>
1 parent 376af18 commit 8e893eb

File tree

10 files changed

+155
-3
lines changed

10 files changed

+155
-3
lines changed

ONNX_HUB_MANIFEST.json

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,6 +1131,48 @@
11311131
"model_with_data_bytes": 40683138
11321132
}
11331133
},
1134+
{
1135+
"model": "AlexNet-qdq",
1136+
"model_path": "vision/classification/alexnet/model/bvlcalexnet-12-qdq.onnx",
1137+
"onnx_version": "1.9",
1138+
"opset_version": 12,
1139+
"metadata": {
1140+
"model_sha": "c103c0f7b8f9d8d64b400e0899d5934d2a13d1f08368ba1907285aa0691f4cbb",
1141+
"model_bytes": 61009072,
1142+
"tags": [
1143+
"vision",
1144+
"classification",
1145+
"alexnet"
1146+
],
1147+
"io_ports": {
1148+
"inputs": [
1149+
{
1150+
"name": "data_0",
1151+
"shape": [
1152+
1,
1153+
3,
1154+
224,
1155+
224
1156+
],
1157+
"type": "tensor(float)"
1158+
}
1159+
],
1160+
"outputs": [
1161+
{
1162+
"name": "prob_1",
1163+
"shape": [
1164+
1,
1165+
1000
1166+
],
1167+
"type": "tensor(float)"
1168+
}
1169+
]
1170+
},
1171+
"model_with_data_path": "vision/classification/alexnet/model/bvlcalexnet-12-qdq.tar.gz",
1172+
"model_with_data_sha": "930eeb3f4d25a20e59fa21919f95edbb7a4b3f31b51a83f62c9b6627906156b9",
1173+
"model_with_data_bytes": 45565042
1174+
}
1175+
},
11341176
{
11351177
"model": "AlexNet",
11361178
"model_path": "vision/classification/alexnet/model/bvlcalexnet-12.onnx",
@@ -1421,6 +1463,48 @@
14211463
"model_with_data_bytes": 40718510
14221464
}
14231465
},
1466+
{
1467+
"model": "CaffeNet-qdq",
1468+
"model_path": "vision/classification/caffenet/model/caffenet-12-qdq.onnx",
1469+
"onnx_version": "1.9",
1470+
"opset_version": 12,
1471+
"metadata": {
1472+
"model_sha": "ff1170e8123aa7b8d652bc43a9e9864ee6ba050653470f34dada9b6ad0731b40",
1473+
"model_bytes": 61009797,
1474+
"tags": [
1475+
"vision",
1476+
"classification",
1477+
"caffenet"
1478+
],
1479+
"io_ports": {
1480+
"inputs": [
1481+
{
1482+
"name": "data_0",
1483+
"shape": [
1484+
1,
1485+
3,
1486+
224,
1487+
224
1488+
],
1489+
"type": "tensor(float)"
1490+
}
1491+
],
1492+
"outputs": [
1493+
{
1494+
"name": "prob_1",
1495+
"shape": [
1496+
1,
1497+
1000
1498+
],
1499+
"type": "tensor(float)"
1500+
}
1501+
]
1502+
},
1503+
"model_with_data_path": "vision/classification/caffenet/model/caffenet-12-qdq.tar.gz",
1504+
"model_with_data_sha": "7d78cb5357b90e71f38c133715e67237c5156e21be0aa6e397c9654557364a6d",
1505+
"model_with_data_bytes": 45685092
1506+
}
1507+
},
14241508
{
14251509
"model": "CaffeNet",
14261510
"model_path": "vision/classification/caffenet/model/caffenet-12.onnx",
@@ -5102,6 +5186,50 @@
51025186
"model_with_data_bytes": 5151210
51035187
}
51045188
},
5189+
{
5190+
"model": "SqueezeNet 1.0-qdq",
5191+
"model_path": "vision/classification/squeezenet/model/squeezenet1.0-13-qdq.onnx",
5192+
"onnx_version": "1.9",
5193+
"opset_version": 13,
5194+
"metadata": {
5195+
"model_sha": "4a567dd7542ef440890d57268fabf47211174c593d7a1837bd7f16a1067169e7",
5196+
"model_bytes": 1345213,
5197+
"tags": [
5198+
"vision",
5199+
"classification",
5200+
"squeezenet"
5201+
],
5202+
"io_ports": {
5203+
"inputs": [
5204+
{
5205+
"name": "data_0",
5206+
"shape": [
5207+
1,
5208+
3,
5209+
224,
5210+
224
5211+
],
5212+
"type": "tensor(float)"
5213+
}
5214+
],
5215+
"outputs": [
5216+
{
5217+
"name": "softmaxout_1",
5218+
"shape": [
5219+
1,
5220+
1000,
5221+
1,
5222+
1
5223+
],
5224+
"type": "tensor(float)"
5225+
}
5226+
]
5227+
},
5228+
"model_with_data_path": "vision/classification/squeezenet/model/squeezenet1.0-13-qdq.tar.gz",
5229+
"model_with_data_sha": "d3a84101535d52ecf31503ff1645f170c7b156b6bc53f1492caec485b7c023a7",
5230+
"model_with_data_bytes": 1565787
5231+
}
5232+
},
51055233
{
51065234
"model": "SqueezeNet 1.0",
51075235
"model_path": "vision/classification/squeezenet/model/squeezenet1.0-3.onnx",

vision/classification/alexnet/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
|AlexNet| [238 MB](model/bvlcalexnet-9.onnx) | [226 MB](model/bvlcalexnet-9.tar.gz) | 1.4 | 9| | |
1212
|AlexNet| [233 MB](model/bvlcalexnet-12.onnx) | [216 MB](model/bvlcalexnet-12.tar.gz) | 1.9 | 12|54.80|78.23|
1313
|AlexNet-int8| [58 MB](model/bvlcalexnet-12-int8.onnx) | [39 MB](model/bvlcalexnet-12-int8.tar.gz) | 1.9 | 12|54.68|78.23|
14+
|AlexNet-qdq| [59 MB](model/bvlcalexnet-12-qdq.onnx) | [44 MB](model/bvlcalexnet-12-qdq.tar.gz) | 1.9 | 12|54.71|78.22|
1415
> Compared with the fp32 AlextNet, int8 AlextNet's Top-1 accuracy drop ratio is 0.22%, Top-5 accuracy drop ratio is 0.05% and performance improvement is 2.26x.
1516
>
1617
> **Note**
@@ -63,7 +64,7 @@ This model obtains a top-1 accuracy 57.1% and a top-5 accuracy
6364
should obtain a bit higher accuracy.)
6465

6566
## Quantization
66-
AlexNet-int8 is obtained by quantizing fp32 AlexNet model. We use [Intel® Neural Compressor](https://github.com/intel/neural-compressor) with onnxruntime backend to perform quantization. View the [instructions](https://github.com/intel/neural-compressor/blob/master/examples/onnxrt/image_recognition/onnx_model_zoo/alexnet/quantization/ptq/README.md) to understand how to use Intel® Neural Compressor for quantization.
67+
AlexNet-int8 and AlexNet-qdq are obtained by quantizing fp32 AlexNet model. We use [Intel® Neural Compressor](https://github.com/intel/neural-compressor) with onnxruntime backend to perform quantization. View the [instructions](https://github.com/intel/neural-compressor/blob/master/examples/onnxrt/image_recognition/onnx_model_zoo/alexnet/quantization/ptq/README.md) to understand how to use Intel® Neural Compressor for quantization.
6768

6869
### Environment
6970
onnx: 1.9.0
@@ -91,6 +92,7 @@ bash run_tuning.sh --input_model=path/to/model \ # model path as *.onnx
9192

9293
## Contributors
9394
* [mengniwang95](https://github.com/mengniwang95) (Intel)
95+
* [yuwenzho](https://github.com/yuwenzho) (Intel)
9496
* [airMeng](https://github.com/airMeng) (Intel)
9597
* [ftian1](https://github.com/ftian1) (Intel)
9698
* [hshen14](https://github.com/hshen14) (Intel)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:c103c0f7b8f9d8d64b400e0899d5934d2a13d1f08368ba1907285aa0691f4cbb
3+
size 61009072
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:930eeb3f4d25a20e59fa21919f95edbb7a4b3f31b51a83f62c9b6627906156b9
3+
size 45565042

vision/classification/caffenet/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
|CaffeNet| [238 MB](model/caffenet-9.onnx) | [244 MB](model/caffenet-9.tar.gz) | 1.4 | 9| | |
1212
|CaffeNet| [233 MB](model/caffenet-12.onnx) | [216 MB](model/caffenet-12.tar.gz) | 1.9 | 12|56.27 |79.52 |
1313
|CaffeNet-int8| [58 MB](model/caffenet-12-int8.onnx) | [39 MB](model/caffenet-12-int8.tar.gz) | 1.9 | 12| 56.22|79.52 |
14+
|CaffeNet-qdq| [59 MB](model/caffenet-12-qdq.onnx) | [44 MB](model/caffenet-12-qdq.tar.gz) | 1.9 | 12| 56.25|79.45 |
1415
> Compared with the fp32 CaffeNet, int8 CaffeNet's Top-1 accuracy drop ratio is 0.09%, Top-5 accuracy drop ratio is 0.13% and performance improvement is 3.08x.
1516
>
1617
> **Note**
@@ -64,7 +65,7 @@ This model obtains a top-1 accuracy 57.4% and a top-5 accuracy
6465
should obtain a bit higher accuracy still.)
6566

6667
## Quantization
67-
CaffeNet-int8 is obtained by quantizing fp32 CaffeNet model. We use [Intel® Neural Compressor](https://github.com/intel/neural-compressor) with onnxruntime backend to perform quantization. View the [instructions](https://github.com/intel/neural-compressor/blob/master/examples/onnxrt/image_recognition/onnx_model_zoo/caffenet/quantization/ptq/README.md) to understand how to use Intel® Neural Compressor for quantization.
68+
CaffeNet-int8 and CaffeNet-qdq are obtained by quantizing fp32 CaffeNet model. We use [Intel® Neural Compressor](https://github.com/intel/neural-compressor) with onnxruntime backend to perform quantization. View the [instructions](https://github.com/intel/neural-compressor/blob/master/examples/onnxrt/image_recognition/onnx_model_zoo/caffenet/quantization/ptq/README.md) to understand how to use Intel® Neural Compressor for quantization.
6869

6970
### Environment
7071
onnx: 1.9.0
@@ -92,6 +93,7 @@ bash run_tuning.sh --input_model=path/to/model \ # model path as *.onnx
9293

9394
## Contributors
9495
* [mengniwang95](https://github.com/mengniwang95) (Intel)
96+
* [yuwenzho](https://github.com/yuwenzho) (Intel)
9597
* [airMeng](https://github.com/airMeng) (Intel)
9698
* [ftian1](https://github.com/ftian1) (Intel)
9799
* [hshen14](https://github.com/hshen14) (Intel)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:ff1170e8123aa7b8d652bc43a9e9864ee6ba050653470f34dada9b6ad0731b40
3+
size 61009797
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:7d78cb5357b90e71f38c133715e67237c5156e21be0aa6e397c9654557364a6d
3+
size 45685092

vision/classification/squeezenet/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ SqueezeNet 1.1 has 2.4x less computation and slightly fewer parameters than Sque
2222
|SqueezeNet 1.0| [5 MB](model/squeezenet1.0-9.onnx) | [11 MB](model/squeezenet1.0-9.tar.gz) | 1.4 | 9|
2323
|SqueezeNet 1.0| [5 MB](model/squeezenet1.0-12.onnx) | [5 MB](model/squeezenet1.0-12.tar.gz) | 1.9 | 12|56.85|79.87|
2424
|SqueezeNet 1.0-int8| [2 MB](model/squeezenet1.0-12-int8.onnx) | [2 MB](model/squeezenet1.0-12-int8.tar.gz) | 1.9 | 12|56.48|79.76|
25+
|SqueezeNet 1.0-qdq| [2 MB](model/squeezenet1.0-13-qdq.onnx) | [2 MB](model/squeezenet1.0-13-qdq.tar.gz) | 1.9 | 13|56.54|79.76|
2526
> Compared with the fp32 SqueezeNet 1.0, int8 SqueezeNet 1.0's Top-1 accuracy drop ratio is 0.65%, Top-5 accuracy drop ratio is 0.14% and performance improvement is 1.31x.
2627
>
2728
> **Note**
@@ -64,7 +65,7 @@ We used MXNet as framework with gluon APIs to perform training. View the [traini
6465
We used MXNet as framework with gluon APIs to perform validation. Use the notebook [imagenet_validation](../imagenet_validation.ipynb) to verify the accuracy of the model on the validation set. Make sure to specify the appropriate model name in the notebook.
6566

6667
## Quantization
67-
SqueezeNet 1.0-int8 is obtained by quantizing fp32 SqueezeNet 1.0 model. We use [Intel® Neural Compressor](https://github.com/intel/neural-compressor) with onnxruntime backend to perform quantization. View the [instructions](https://github.com/intel/neural-compressor/blob/master/examples/onnxrt/image_recognition/onnx_model_zoo/squeezenet/quantization/ptq/README.md) to understand how to use Intel® Neural Compressor for quantization.
68+
SqueezeNet 1.0-int8 and SqueezeNet 1.0-qdq are obtained by quantizing fp32 SqueezeNet 1.0 model. We use [Intel® Neural Compressor](https://github.com/intel/neural-compressor) with onnxruntime backend to perform quantization. View the [instructions](https://github.com/intel/neural-compressor/blob/master/examples/onnxrt/image_recognition/onnx_model_zoo/squeezenet/quantization/ptq/README.md) to understand how to use Intel® Neural Compressor for quantization.
6869

6970
### Environment
7071
onnx: 1.9.0
@@ -97,6 +98,7 @@ SqueezeNet1.1 presented in the [Official SqueezeNet repo](https://github.com/Dee
9798
* [abhinavs95](https://github.com/abhinavs95) (Amazon AI)
9899
* [ankkhedia](https://github.com/ankkhedia) (Amazon AI)
99100
* [mengniwang95](https://github.com/mengniwang95) (Intel)
101+
* [yuwenzho](https://github.com/yuwenzho) (Intel)
100102
* [airMeng](https://github.com/airMeng) (Intel)
101103
* [ftian1](https://github.com/ftian1) (Intel)
102104
* [hshen14](https://github.com/hshen14) (Intel)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:4a567dd7542ef440890d57268fabf47211174c593d7a1837bd7f16a1067169e7
3+
size 1345213
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:d3a84101535d52ecf31503ff1645f170c7b156b6bc53f1492caec485b7c023a7
3+
size 1565787

0 commit comments

Comments
 (0)