Image Classification
FBAGSTM commited on
Commit
342bbc3
·
verified ·
1 Parent(s): 5f16cc0

Release AI-ModelZoo-4.0.0

Browse files
Files changed (1) hide show
  1. README.md +110 -3
README.md CHANGED
@@ -1,3 +1,110 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ pipeline_tag: image-classification
4
+ ---
5
+ # SEMnasNet
6
+
7
+ ## **Use case** : `Image classification`
8
+
9
+ # Model description
10
+
11
+
12
+ SEMnasNet combines the MnasNet architecture with **Squeeze-and-Excitation (SE) blocks**, adding channel attention mechanisms to the NAS-derived architecture for improved accuracy.
13
+
14
+ The architecture builds on MnasNet's **NAS-derived efficient design** and adds **Squeeze-and-Excitation blocks** for channel attention and feature recalibration. **Adaptive feature weighting** emphasizes informative channels, with SE blocks boosting accuracy with minimal overhead.
15
+
16
+ SEMnasNet achieves the **highest accuracy** in the model zoo (75.38% Top-1) with excellent quantization stability (0.37% drop), making it the best choice for accuracy-critical applications.
17
+
18
+ (source: https://arxiv.org/abs/1807.11626, https://arxiv.org/abs/1709.01507)
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 | ~4.04 M |
29
+ | Quantization | Int8 |
30
+ | Provenance | https://github.com/huggingface/pytorch-image-models |
31
+ | Paper | https://arxiv.org/abs/1807.11626 |
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
+ | [semnasnet100_pt_224](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/semnasnet_pt/Public_pretrainedmodel_public_dataset/Imagenet/semnasnet100_pt_224/semnasnet100_pt_224_qdq_int8.onnx) | Imagenet | Int8 | 224×224×3 | STM32N6 | 2058 | 0 | 4133.38 | 3.0.0 |
71
+
72
+ ### Reference **NPU** inference time on Imagenet dataset (see Accuracy for details on dataset)
73
+
74
+ | Model | Dataset | Format | Resolution | Board | Execution Engine | Inference time (ms) | Inf / sec | STEdgeAI Core version |
75
+ |--------|---------|--------|--------|-------------|------------------|------------------|---------------------|-------------------------|
76
+ | [semnasnet100_pt_224](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/semnasnet_pt/Public_pretrainedmodel_public_dataset/Imagenet/semnasnet100_pt_224/semnasnet100_pt_224_qdq_int8.onnx) | Imagenet | Int8 | 224×224×3 | STM32N6570-DK | NPU/MCU | 37.63 | 26.57 | 3.0.0 |
77
+
78
+ | Model | Dataset | Format | Resolution | Board | Execution Engine | Inference time (ms) | Inf / sec | STEdgeAI Core version |
79
+ |--------|---------|--------|--------|-------------|------------------|------------------|---------------------|-------------------------|
80
+ | [semnasnet100_pt_224](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/semnasnet_pt/Public_pretrainedmodel_public_dataset/Imagenet/semnasnet100_pt_224/semnasnet100_pt_224_qdq_int8.onnx) | Imagenet | Int8 | 224×224×3 | STM32N6570-DK | NPU/MCU | 37.63 | 26.57 | 3.0.0 |
81
+
82
+
83
+ ### Accuracy with Imagenet dataset
84
+
85
+ | Model | Format | Resolution | Top 1 Accuracy |
86
+ | --- | --- | --- | --- |
87
+ | [semnasnet100_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/semnasnet_pt/Public_pretrainedmodel_public_dataset/Imagenet/semnasnet100_pt_224/semnasnet100_pt_224.onnx) | Float | 224x224x3 | 75.75 % |
88
+ | [semnasnet100_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/semnasnet_pt/Public_pretrainedmodel_public_dataset/Imagenet/semnasnet100_pt_224/semnasnet100_pt_224_qdq_int8.onnx) | Int8 | 224x224x3 | 75.38 % |
89
+
90
+
91
+ | Model | Format | Resolution | Top 1 Accuracy |
92
+ | --- | --- | --- | --- |
93
+ | [semnasnet100_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/semnasnet_pt/Public_pretrainedmodel_public_dataset/Imagenet/semnasnet100_pt_224/semnasnet100_pt_224.onnx) | Float | 224x224x3 | 75.75 % |
94
+ | [semnasnet100_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/semnasnet_pt/Public_pretrainedmodel_public_dataset/Imagenet/semnasnet100_pt_224/semnasnet100_pt_224_qdq_int8.onnx) | Int8 | 224x224x3 | 75.38 % |
95
+
96
+
97
+
98
+ ## Retraining and Integration in a simple example:
99
+
100
+ Please refer to the stm32ai-modelzoo-services GitHub [here](https://github.com/STMicroelectronics/stm32ai-modelzoo-services)
101
+
102
+
103
+
104
+ # References
105
+
106
+ <a id="1">[1]</a> - **Dataset**: Imagenet (ILSVRC 2012) — https://www.image-net.org/
107
+
108
+ <a id="2">[2]</a> - **Model (MnasNet)**: MnasNet — https://arxiv.org/abs/1807.11626
109
+
110
+ <a id="3">[3]</a> - **Model (SE-Net)**: Squeeze-and-Excitation Networks — https://arxiv.org/abs/1709.01507