ONNX
DaniAffCH commited on
Commit
3100ace
·
1 Parent(s): 82faaf0

[GSoC] Add block quantized models (#270)

Browse files

* Gemm and MatMul block quantization support

* refactoring

* fix indentation

* node name independent

* Block quantization tool:
- constant weight category supported
- add data type saturation
- handled the case in which all the elements within a block are the same

benchmark script modified to support block quantized models

block quantized some models

* add missing block quantized models

* formatting

* add blocked models to eval script. Evaluation yunet

* Add sface and pphumanseg evaluation, block quantization tool fix, handpose blocked model fix, removed blocked CRNN EN,

* changed evaluation metric in block_quantize script and add verbose mode

* Add evaluation for PP-ResNet and Mobilenet

* changed file suffix and update readmes

* renamed int8bq

Files changed (1) hide show
  1. README.md +6 -0
README.md CHANGED
@@ -4,16 +4,22 @@ MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applicatio
4
 
5
  MobileNetV2: Inverted Residuals and Linear Bottlenecks
6
 
 
 
 
7
  Results of accuracy evaluation with [tools/eval](../../tools/eval).
8
 
9
  | Models | Top-1 Accuracy | Top-5 Accuracy |
10
  | ------------------ | -------------- | -------------- |
11
  | MobileNet V1 | 67.64 | 87.97 |
 
12
  | MobileNet V1 quant | 55.53 | 78.74 |
13
  | MobileNet V2 | 69.44 | 89.23 |
 
14
  | MobileNet V2 quant | 68.37 | 88.56 |
15
 
16
  \*: 'quant' stands for 'quantized'.
 
17
 
18
  ## Demo
19
 
 
4
 
5
  MobileNetV2: Inverted Residuals and Linear Bottlenecks
6
 
7
+ **Note**:
8
+ - `image_classification_mobilenetvX_2022apr_int8bq.onnx` represents the block-quantized version in int8 precision and is generated using [block_quantize.py](../../tools/quantize/block_quantize.py) with `block_size=64`.
9
+
10
  Results of accuracy evaluation with [tools/eval](../../tools/eval).
11
 
12
  | Models | Top-1 Accuracy | Top-5 Accuracy |
13
  | ------------------ | -------------- | -------------- |
14
  | MobileNet V1 | 67.64 | 87.97 |
15
+ | MobileNet V1 block | 67.21 | 87.62 |
16
  | MobileNet V1 quant | 55.53 | 78.74 |
17
  | MobileNet V2 | 69.44 | 89.23 |
18
+ | MobileNet V2 block | 68.66 | 88.90 |
19
  | MobileNet V2 quant | 68.37 | 88.56 |
20
 
21
  \*: 'quant' stands for 'quantized'.
22
+ \*\*: 'block' stands for 'blockwise quantized'.
23
 
24
  ## Demo
25