Image Classification
FBAGSTM commited on
Commit
be6bb12
·
verified ·
1 Parent(s): a077a31

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
+ # SqueezeNet
6
+
7
+ ## **Use case** : `Image classification`
8
+
9
+ # Model description
10
+
11
+
12
+ SqueezeNet is a pioneering compact architecture that achieves **AlexNet-level accuracy with 50x fewer parameters**. It introduced the "Fire module" combining squeeze and expand operations.
13
+
14
+ The architecture features **Fire Modules** with squeeze (1x1) followed by expand (1x1 + 3x3) layers, employing **delayed downsampling** to maintain larger activation maps longer. It uses **no fully connected layers**, relying on global average pooling, resulting in an **extremely compact** model (<0.5MB original size).
15
+
16
+ SqueezeNet is ideal for extremely constrained deployment scenarios, model compression research, and applications where model size is critical.
17
+
18
+ (source: https://arxiv.org/abs/1602.07360)
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.24 M |
29
+ | Quantization | Int8 |
30
+ | Provenance | https://github.com/DeepScale/SqueezeNet |
31
+ | Paper | https://arxiv.org/abs/1602.07360 |
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
+ | [squeezenetv10_pt_224](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenet_pt/Public_pretrainedmodel_public_dataset/Imagenet/squeezenetv10_pt_224/squeezenetv10_pt_224_qdq_int8.onnx) | Imagenet | Int8 | 224×224×3 | STM32N6 | 2278.12 | 6683.06 | 1266.61 | 3.0.0 |
71
+
72
+
73
+ ### Reference **NPU** inference time on Imagenet dataset (see Accuracy for details on dataset)
74
+
75
+ | Model | Dataset | Format | Resolution | Board | Execution Engine | Inference time (ms) | Inf / sec | STEdgeAI Core version |
76
+ |--------|---------|--------|--------|-------------|------------------|------------------|---------------------|-------------------------|
77
+ | [squeezenetv10_pt_224](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenet_pt/Public_pretrainedmodel_public_dataset/Imagenet/squeezenetv10_pt_224/squeezenetv10_pt_224_qdq_int8.onnx) | Imagenet | Int8 | 224×224×3 | STM32N6570-DK | NPU/MCU | 121.20 | 8.25 | 3.0.0 |
78
+
79
+
80
+ ### Accuracy with Imagenet dataset
81
+
82
+ | Model | Format | Resolution | Top 1 Accuracy |
83
+ | --- | --- | --- | --- |
84
+ | [squeezenetv10_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenet_pt/Public_pretrainedmodel_public_dataset/Imagenet/squeezenetv10_pt_224/squeezenetv10_pt_224.onnx) | Float | 224x224x3 | 62.11 % |
85
+ | [squeezenetv10_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenet_pt/Public_pretrainedmodel_public_dataset/Imagenet/squeezenetv10_pt_224/squeezenetv10_pt_224_qdq_int8.onnx) | Int8 | 224x224x3 | 58.43 % |
86
+
87
+
88
+ | Model | Format | Resolution | Top 1 Accuracy |
89
+ | --- | --- | --- | --- |
90
+ | [squeezenetv10_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenet_pt/Public_pretrainedmodel_public_dataset/Imagenet/squeezenetv10_pt_224/squeezenetv10_pt_224.onnx) | Float | 224x224x3 | 62.11 % |
91
+ | [squeezenetv10_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenet_pt/Public_pretrainedmodel_public_dataset/Imagenet/squeezenetv10_pt_224/squeezenetv10_pt_224_qdq_int8.onnx) | Int8 | 224x224x3 | 58.43 % |
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**: SqueezeNet — https://github.com/DeepScale/SqueezeNet