Image Classification
FBAGSTM commited on
Commit
60f6456
·
verified ·
1 Parent(s): 0b2f6af

Release AI-ModelZoo-4.0.0

Browse files
Files changed (1) hide show
  1. README.md +123 -3
README.md CHANGED
@@ -1,3 +1,123 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ pipeline_tag: image-classification
4
+ ---
5
+ # ShuffleNet V2
6
+
7
+ ## **Use case** : `Image classification`
8
+
9
+ # Model description
10
+
11
+
12
+ ShuffleNet V2 is designed following **practical guidelines for efficient CNN architecture design**. It uses channel shuffle operations and a split-concat structure for efficient feature reuse with minimal memory access cost.
13
+
14
+ The architecture features **channel shuffle** operations to enable information flow between channel groups, with a **split-concat architecture** for efficient feature processing. Designed based on **practical guidelines** using direct speed measurement rather than FLOPs, the architecture makes choices that **minimize memory access cost**.
15
+
16
+ ShuffleNet V2 is well-suited for mobile applications with strict efficiency requirements, real-time video processing, and multi-model deployment scenarios.
17
+
18
+ (source: https://arxiv.org/abs/1807.11164)
19
+
20
+ The model is quantized to **int8** using **ONNX Runtime** and exported for efficient deployment.
21
+
22
+ ## Network information
23
+
24
+
25
+ | Network Information | Value |
26
+ |--------------------|-------|
27
+ | Framework | Torch |
28
+ | MParams | ~1.34–2.21 M |
29
+ | Quantization | Int8 |
30
+ | Provenance | https://github.com/megvii-model/ShuffleNet-Series |
31
+ | Paper | https://arxiv.org/abs/1807.11164 |
32
+
33
+ ## Network inputs / outputs
34
+
35
+
36
+ For an image resolution of NxM and P classes
37
+
38
+ | Input Shape | Description |
39
+ | ----- | ----------- |
40
+ | (1, N, M, 3) | Single NxM RGB image with UINT8 values between 0 and 255 |
41
+
42
+ | Output Shape | Description |
43
+ | ----- | ----------- |
44
+ | (1, P) | Per-class confidence for P classes in FLOAT32|
45
+
46
+
47
+ ## Recommended platforms
48
+
49
+
50
+ | Platform | Supported | Recommended |
51
+ |----------|-----------|-----------|
52
+ | STM32L0 |[]|[]|
53
+ | STM32L4 |[]|[]|
54
+ | STM32U5 |[]|[]|
55
+ | STM32H7 |[]|[]|
56
+ | STM32MP1 |[]|[]|
57
+ | STM32MP2 |[]|[]|
58
+ | STM32N6 |[x]|[x]|
59
+
60
+ # Performances
61
+
62
+ ## Metrics
63
+
64
+ - Measures are done with default STEdgeAI Core configuration with enabled input / output allocated option.
65
+ - All the models are trained from scratch on Imagenet dataset
66
+
67
+ ### Reference **NPU** memory footprint on Imagenet dataset (see Accuracy for details on dataset)
68
+ | Model | Dataset | Format | Resolution | Series | Internal RAM (KiB) | External RAM (KiB) | Weights Flash (KiB) | STEdgeAI Core version |
69
+ |-------|---------|--------|------------|--------|--------------|--------------|---------------|----------------------|
70
+ | [shufflenetv2_x050_pt_224](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/shufflenetv2_pt/Public_pretrainedmodel_public_dataset/Imagenet/shufflenetv2_x050_pt_224/shufflenetv2_x050_pt_224_qdq_int8.onnx) | Imagenet | Int8 | 224×224×3 | STM32N6 | 441 | 0 | 1369.07 | 3.0.0 |
71
+ | [shufflenetv2b_x050_pt_224](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/shufflenetv2_pt/Public_pretrainedmodel_public_dataset/Imagenet/shufflenetv2b_x050_pt_224/shufflenetv2b_x050_pt_224_qdq_int8.onnx) | Imagenet | Int8 | 224×224×3 | STM32N6 | 441 | 0 | 1369.07 | 3.0.0 |
72
+ | [shufflenetv2_x100_pt_224](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/shufflenetv2_pt/Public_pretrainedmodel_public_dataset/Imagenet/shufflenetv2_x100_pt_224/shufflenetv2_x100_pt_224_qdq_int8.onnx) | Imagenet | Int8 | 224×224×3 | STM32N6 | 459.38 | 0 | 2262.45 | 3.0.0 |
73
+ | [shufflenetv2b_x100_pt_224](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/shufflenetv2_pt/Public_pretrainedmodel_public_dataset/Imagenet/shufflenetv2b_x100_pt_224/shufflenetv2b_x100_pt_224_qdq_int8.onnx) | Imagenet | Int8 | 224×224×3 | STM32N6 | 459.38 | 0 | 2263.57 | 3.0.0 |
74
+
75
+
76
+ ### Reference **NPU** inference time on Imagenet dataset (see Accuracy for details on dataset)
77
+
78
+ | Model | Dataset | Format | Resolution | Board | Execution Engine | Inference time (ms) | Inf / sec | STEdgeAI Core version |
79
+ |--------|---------|--------|--------|-------------|------------------|------------------|---------------------|-------------------------|
80
+ | [shufflenetv2_x050_pt_224](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/shufflenetv2_pt/Public_pretrainedmodel_public_dataset/Imagenet/shufflenetv2_x050_pt_224/shufflenetv2_x050_pt_224_qdq_int8.onnx) | Imagenet | Int8 | 224×224×3 | STM32N6570-DK | NPU/MCU | 8.35 | 119.76 | 3.0.0 |
81
+ | [shufflenetv2_x100_pt_224](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/shufflenetv2_pt/Public_pretrainedmodel_public_dataset/Imagenet/shufflenetv2_x100_pt_224/shufflenetv2_x100_pt_224_qdq_int8.onnx) | Imagenet | Int8 | 224×224×3 | STM32N6570-DK | NPU/MCU | 32.43 | 30.84 | 3.0.0 |
82
+ | [shufflenetv2b_x050_pt_224](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/shufflenetv2_pt/Public_pretrainedmodel_public_dataset/Imagenet/shufflenetv2b_x050_pt_224/shufflenetv2b_x050_pt_224_qdq_int8.onnx) | Imagenet | Int8 | 224×224×3 | STM32N6570-DK | NPU/MCU | 8.39 | 119.19 | 3.0.0 |
83
+ | [shufflenetv2b_x100_pt_224](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/shufflenetv2_pt/Public_pretrainedmodel_public_dataset/Imagenet/shufflenetv2b_x100_pt_224/shufflenetv2b_x100_pt_224_qdq_int8.onnx) | Imagenet | Int8 | 224×224×3 | STM32N6570-DK | NPU/MCU | 32.65 | 30.63 | 3.0.0 |
84
+
85
+
86
+ ### Accuracy with Imagenet dataset
87
+
88
+ | Model | Format | Resolution | Top 1 Accuracy |
89
+ | --- | --- | --- | --- |
90
+ | [shufflenetv2_x050_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/shufflenetv2_pt/Public_pretrainedmodel_public_dataset/Imagenet/shufflenetv2_x050_pt_224/shufflenetv2_x050_pt_224.onnx) | Float | 224x224x3 | 60.63 % |
91
+ | [shufflenetv2_x050_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/shufflenetv2_pt/Public_pretrainedmodel_public_dataset/Imagenet/shufflenetv2_x050_pt_224/shufflenetv2_x050_pt_224_qdq_int8.onnx) | Int8 | 224x224x3 | 59.69 % |
92
+ | [shufflenetv2_x100_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/shufflenetv2_pt/Public_pretrainedmodel_public_dataset/Imagenet/shufflenetv2_x100_pt_224/shufflenetv2_x100_pt_224.onnx) | Float | 224x224x3 | 69.29 % |
93
+ | [shufflenetv2_x100_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/shufflenetv2_pt/Public_pretrainedmodel_public_dataset/Imagenet/shufflenetv2_x100_pt_224/shufflenetv2_x100_pt_224_qdq_int8.onnx) | Int8 | 224x224x3 | 68.65 % |
94
+ | [shufflenetv2b_x050_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/shufflenetv2_pt/Public_pretrainedmodel_public_dataset/Imagenet/shufflenetv2b_x050_pt_224/shufflenetv2b_x050_pt_224.onnx) | Float | 224x224x3 | 60.90 % |
95
+ | [shufflenetv2b_x050_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/shufflenetv2_pt/Public_pretrainedmodel_public_dataset/Imagenet/shufflenetv2b_x050_pt_224/shufflenetv2b_x050_pt_224_qdq_int8.onnx) | Int8 | 224x224x3 | 59.62 % |
96
+ | [shufflenetv2b_x100_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/shufflenetv2_pt/Public_pretrainedmodel_public_dataset/Imagenet/shufflenetv2b_x100_pt_224/shufflenetv2b_x100_pt_224.onnx) | Float | 224x224x3 | 70.40 % |
97
+ | [shufflenetv2b_x100_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/shufflenetv2_pt/Public_pretrainedmodel_public_dataset/Imagenet/shufflenetv2b_x100_pt_224/shufflenetv2b_x100_pt_224_qdq_int8.onnx) | Int8 | 224x224x3 | 69.59 % |
98
+
99
+
100
+ | Model | Format | Resolution | Top 1 Accuracy |
101
+ | --- | --- | --- | --- |
102
+ | [shufflenetv2_x050_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/shufflenetv2_pt/Public_pretrainedmodel_public_dataset/Imagenet/shufflenetv2_x050_pt_224/shufflenetv2_x050_pt_224.onnx) | Float | 224x224x3 | 60.63 % |
103
+ | [shufflenetv2_x050_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/shufflenetv2_pt/Public_pretrainedmodel_public_dataset/Imagenet/shufflenetv2_x050_pt_224/shufflenetv2_x050_pt_224_qdq_int8.onnx) | Int8 | 224x224x3 | 59.69 % |
104
+ | [shufflenetv2_x100_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/shufflenetv2_pt/Public_pretrainedmodel_public_dataset/Imagenet/shufflenetv2_x100_pt_224/shufflenetv2_x100_pt_224.onnx) | Float | 224x224x3 | 69.29 % |
105
+ | [shufflenetv2_x100_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/shufflenetv2_pt/Public_pretrainedmodel_public_dataset/Imagenet/shufflenetv2_x100_pt_224/shufflenetv2_x100_pt_224_qdq_int8.onnx) | Int8 | 224x224x3 | 68.65 % |
106
+ | [shufflenetv2b_x050_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/shufflenetv2_pt/Public_pretrainedmodel_public_dataset/Imagenet/shufflenetv2b_x050_pt_224/shufflenetv2b_x050_pt_224.onnx) | Float | 224x224x3 | 60.90 % |
107
+ | [shufflenetv2b_x050_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/shufflenetv2_pt/Public_pretrainedmodel_public_dataset/Imagenet/shufflenetv2b_x050_pt_224/shufflenetv2b_x050_pt_224_qdq_int8.onnx) | Int8 | 224x224x3 | 59.62 % |
108
+ | [shufflenetv2b_x100_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/shufflenetv2_pt/Public_pretrainedmodel_public_dataset/Imagenet/shufflenetv2b_x100_pt_224/shufflenetv2b_x100_pt_224.onnx) | Float | 224x224x3 | 70.40 % |
109
+ | [shufflenetv2b_x100_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/shufflenetv2_pt/Public_pretrainedmodel_public_dataset/Imagenet/shufflenetv2b_x100_pt_224/shufflenetv2b_x100_pt_224_qdq_int8.onnx) | Int8 | 224x224x3 | 69.59 % |
110
+
111
+
112
+
113
+ ## Retraining and Integration in a simple example:
114
+
115
+ Please refer to the stm32ai-modelzoo-services GitHub [here](https://github.com/STMicroelectronics/stm32ai-modelzoo-services)
116
+
117
+
118
+
119
+ # References
120
+
121
+ <a id="1">[1]</a> - **Dataset**: Imagenet (ILSVRC 2012) — https://www.image-net.org/
122
+
123
+ <a id="2">[2]</a> - **Model**: ShuffleNet V2 — https://github.com/megvii-model/ShuffleNet-Series