Image Classification
FBAGSTM commited on
Commit
0181910
·
verified ·
1 Parent(s): dd39c44

Release AI-ModelZoo-4.0.0

Browse files
Files changed (1) hide show
  1. README.md +105 -3
README.md CHANGED
@@ -1,3 +1,105 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ pipeline_tag: image-classification
4
+ ---
5
+ # ProxylessNAS
6
+
7
+ ## **Use case** : `Image classification`
8
+
9
+ # Model description
10
+
11
+
12
+
13
+ ProxylessNAS enables **direct neural architecture search on target hardware**, eliminating the "proxy" task typically used in NAS. It learns specialized architectures optimized for specific devices without costly re-training.
14
+
15
+ The architecture employs **direct hardware targeting** by searching directly on target hardware metrics, using **path-level binarization** as an efficient search method with binary architecture parameters. **Latency regularization** incorporates actual latency into the search objective, resulting in **hardware-specific architectures** optimized for different hardware platforms.
16
+
17
+ ProxylessNAS achieves high accuracy (74.25% Top-1) with good quantization stability (0.60% drop), making it ideal for applications requiring hardware-optimized architectures with strict latency requirements.
18
+
19
+ (source: https://arxiv.org/abs/1812.00332)
20
+
21
+ The model is quantized to **int8** using **ONNX Runtime** and exported for efficient deployment.
22
+
23
+ ## Network information
24
+
25
+
26
+ | Network Information | Value |
27
+ |--------------------|-------|
28
+ | Framework | Torch |
29
+ | MParams | ~4.13 M |
30
+ | Quantization | Int8 |
31
+ | Provenance | https://github.com/mit-han-lab/proxylessnas |
32
+ | Paper | https://arxiv.org/abs/1812.00332 |
33
+
34
+ ## Network inputs / outputs
35
+
36
+
37
+ For an image resolution of NxM and P classes
38
+
39
+ | Input Shape | Description |
40
+ | ----- | ----------- |
41
+ | (1, N, M, 3) | Single NxM RGB image with UINT8 values between 0 and 255 |
42
+
43
+ | Output Shape | Description |
44
+ | ----- | ----------- |
45
+ | (1, P) | Per-class confidence for P classes in FLOAT32|
46
+
47
+
48
+ ## Recommended platforms
49
+
50
+
51
+ | Platform | Supported | Recommended |
52
+ |----------|-----------|-----------|
53
+ | STM32L0 |[]|[]|
54
+ | STM32L4 |[]|[]|
55
+ | STM32U5 |[]|[]|
56
+ | STM32H7 |[]|[]|
57
+ | STM32MP1 |[]|[]|
58
+ | STM32MP2 |[]|[]|
59
+ | STM32N6 |[x]|[x]|
60
+
61
+ # Performances
62
+
63
+ ## Metrics
64
+
65
+ - Measures are done with default STEdgeAI Core configuration with enabled input / output allocated option.
66
+ - All the models are trained from scratch on Imagenet dataset
67
+
68
+ ### Reference **NPU** memory footprint on Imagenet dataset (see Accuracy for details on dataset)
69
+ | Model | Dataset | Format | Resolution | Series | Internal RAM (KiB) | External RAM (KiB) | Weights Flash (KiB) | STEdgeAI Core version |
70
+ |-------|---------|--------|------------|--------|--------------|--------------|---------------|----------------------|
71
+ | [proxylessnas_pt_224](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/proxylessnas_pt/Public_pretrainedmodel_public_dataset/Imagenet/proxylessnas_pt_224/proxylessnas_pt_224_qdq_int8.onnx) | Imagenet | Int8 | 224×224×3 | STM32N6 | 1372 | 0 | 4233.20 | 3.0.0 |
72
+
73
+
74
+ ### Reference **NPU** inference time on food101 and imagenet dataset (see Accuracy for details on dataset)
75
+ | Model | Dataset | Format | Resolution | Board | Execution Engine | Inference time (ms) | Inf / sec | STEdgeAI Core version |
76
+ |--------|---------|--------|--------|-------------|------------------|------------------|---------------------|-------------------------|
77
+ | [proxylessnas_pt_224](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/proxylessnas_pt/Public_pretrainedmodel_public_dataset/Imagenet/proxylessnas_pt_224/proxylessnas_pt_224_qdq_int8.onnx) | Imagenet | Int8 | 224×224×3 | STM32N6570-DK | NPU/MCU | 27.65 | 36.17 | 3.0.0 |
78
+
79
+
80
+ ### Accuracy with Imagenet dataset
81
+
82
+ | Model | Format | Resolution | Top 1 Accuracy |
83
+ | --- | --- | --- | --- |
84
+ | [proxylessnas_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/proxylessnas_pt/Public_pretrainedmodel_public_dataset/Imagenet/proxylessnas_pt_224/proxylessnas_pt_224.onnx) | Float | 224x224x3 | 74.85 % |
85
+ | [proxylessnas_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/proxylessnas_pt/Public_pretrainedmodel_public_dataset/Imagenet/proxylessnas_pt_224/proxylessnas_pt_224_qdq_int8.onnx) | Int8 | 224x224x3 | 74.25 % |
86
+
87
+
88
+ | Model | Format | Resolution | Top 1 Accuracy |
89
+ | --- | --- | --- | --- |
90
+ | [proxylessnas_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/proxylessnas_pt/Public_pretrainedmodel_public_dataset/Imagenet/proxylessnas_pt_224/proxylessnas_pt_224.onnx) | Float | 224x224x3 | 74.85 % |
91
+ | [proxylessnas_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/proxylessnas_pt/Public_pretrainedmodel_public_dataset/Imagenet/proxylessnas_pt_224/proxylessnas_pt_224_qdq_int8.onnx) | Int8 | 224x224x3 | 74.25 % |
92
+
93
+
94
+
95
+ ## Retraining and Integration in a simple example:
96
+
97
+ Please refer to the stm32ai-modelzoo-services GitHub [here](https://github.com/STMicroelectronics/stm32ai-modelzoo-services)
98
+
99
+
100
+
101
+ # References
102
+
103
+ <a id="1">[1]</a> - **Dataset**: Imagenet (ILSVRC 2012) — https://www.image-net.org/
104
+
105
+ <a id="2">[2]</a> - **Model**: ProxylessNAS — https://github.com/MIT-HAN-LAB/ProxylessNAS