jemartin commited on
Commit
0c4c519
·
verified ·
1 Parent(s): cf9c477

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +94 -0
README.md ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ license: apache-2.0
4
+ model_name: densenet-12-int8.onnx
5
+ tags:
6
+ - validated
7
+ - vision
8
+ - classification
9
+ - densenet-121
10
+ ---
11
+ <!--- SPDX-License-Identifier: MIT -->
12
+
13
+ # DenseNet-121
14
+
15
+ |Model |Download |Download (with sample test data)| ONNX version |Opset version|Top-1 accuracy (%)|
16
+ | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- |
17
+ |DenseNet-121| [32 MB](model/densenet-3.onnx) | [33 MB](model/densenet-3.tar.gz) | 1.1 | 3| |
18
+ |DenseNet-121| [32 MB](model/densenet-6.onnx) | [33 MB](model/densenet-6.tar.gz) | 1.1.2 | 6| |
19
+ |DenseNet-121| [32 MB](model/densenet-7.onnx) | [33 MB](model/densenet-7.tar.gz) | 1.2 | 7| |
20
+ |DenseNet-121| [32 MB](model/densenet-8.onnx) | [33 MB](model/densenet-8.tar.gz) | 1.3 | 8| |
21
+ |DenseNet-121| [32 MB](model/densenet-9.onnx) | [33 MB](model/densenet-9.tar.gz) | 1.4 | 9| |
22
+ |DenseNet-121-12| [32 MB](model/densenet-12.onnx) | [30 MB](model/densenet-12.tar.gz) | 1.9 | 12| 60.96 |
23
+ |DenseNet-121-12-int8| [9 MB](model/densenet-12-int8.onnx) | [6 MB](model/densenet-12-int8.tar.gz) | 1.9 | 12| 60.20 |
24
+ > Compared with the DenseNet-121-12, DenseNet-121-12-int8's op-1 accuracy drop ratio is 1.25% and performance improvement is 1.18x.
25
+ >
26
+ > Note the performance depends on the test hardware.
27
+ >
28
+ > Performance data here is collected with Intel® Xeon® Platinum 8280 Processor, 1s 4c per instance, CentOS Linux 8.3, data batch size is 1.
29
+
30
+ ## Description
31
+ DenseNet-121 is a convolutional neural network for classification.
32
+
33
+ ### Paper
34
+ [Densely Connected Convolutional Networks](https://arxiv.org/abs/1608.06993)
35
+
36
+ ### Dataset
37
+ [ILSVRC2012](http://www.image-net.org/challenges/LSVRC/2012/)
38
+
39
+ ## Source
40
+ Caffe2 DenseNet-121 ==> ONNX DenseNet
41
+
42
+ ## Model input and output
43
+ ### Input
44
+ ```
45
+ data_0: float[1, 3, 224, 224]
46
+ ```
47
+ ### Output
48
+ ```
49
+ fc6_1: float[1, 1000, 1, 1]
50
+ ```
51
+ ### Pre-processing steps
52
+ ### Post-processing steps
53
+ ### Sample test data
54
+ random generated sampe test data:
55
+ - test_data_0.npz
56
+ - test_data_1.npz
57
+ - test_data_2.npz
58
+ - test_data_set_0
59
+ - test_data_set_1
60
+ - test_data_set_2
61
+
62
+ ## Results/accuracy on test set
63
+
64
+ ## Quantization
65
+ Mask R-CNN R-50-FPN-int8 is obtained by quantizing Mask R-CNN R-50-FPN-fp32 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/densenet/quantization/ptq/README.md) to understand how to use Intel® Neural Compressor for quantization.
66
+
67
+ ### Environment
68
+ onnx: 1.9.0
69
+ onnxruntime: 1.10.0
70
+
71
+ ### Prepare model
72
+ ```shell
73
+ wget https://github.com/onnx/models/raw/main/vision/classification/densenet-121/model/densenet-12.onnx
74
+ ```
75
+
76
+ ### Model quantize
77
+ ```bash
78
+ bash run_tuning.sh --input_model=path/to/model \ # model path as *.onnx
79
+ --config=densenet.yaml \
80
+ --output_model=path/to/save
81
+ ```
82
+
83
+ ## References
84
+ * [Intel® Neural Compressor](https://github.com/intel/neural-compressor)
85
+
86
+ ## Contributors
87
+ * [mengniwang95](https://github.com/mengniwang95) (Intel)
88
+ * [airMeng](https://github.com/airMeng) (Intel)
89
+ * [ftian1](https://github.com/ftian1) (Intel)
90
+ * [hshen14](https://github.com/hshen14) (Intel)
91
+
92
+ ## License
93
+ MIT
94
+