FBAGSTM commited on
Commit
2992947
·
verified ·
1 Parent(s): d95fcae

Release AI-ModelZoo-4.0.0

Browse files
Files changed (1) hide show
  1. README.md +164 -6
README.md CHANGED
@@ -1,6 +1,164 @@
1
- ---
2
- license: other
3
- license_name: sla0044
4
- license_link: >-
5
- https://github.com/STMicroelectronics/stm32ai-modelzoo/blob/main/image_classification/squeezenetv11/ST_pretrainedmodel_public_dataset/LICENSE.md
6
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: sla0044
4
+ license_link: >-
5
+ https://github.com/STMicroelectronics/stm32ai-modelzoo/blob/main/image_classification/squeezenetv11/ST_pretrainedmodel_public_dataset/LICENSE.md
6
+ pipeline_tag: image-classification
7
+ ---
8
+ # Squeezenet v1.1
9
+
10
+ ## **Use case** : `Image classification`
11
+
12
+ # Model description
13
+ SqueezeNet is a convolutional neural network that uses design strategies to reduce the number of parameters, particularly with the use of fire modules that "squeeze" parameters using 1x1 convolutions.
14
+ SqueezeNet 1.1 has 2.4x less computation and slightly fewer parameters than SqueezeNet 1.0, without sacrifying accuracy.
15
+
16
+ The model is quantized in int8 using tensorflow lite converter.
17
+
18
+
19
+ ## Network information
20
+
21
+
22
+ | Network Information | Value |
23
+ |---------------------|----------------------------------------|
24
+ | Framework | TensorFlow Lite |
25
+ | MParams | 725,061 |
26
+ | Quantization | int8 |
27
+ | Provenance | https://github.com/forresti/SqueezeNet |
28
+ | Paper | https://arxiv.org/pdf/1602.07360.pdf |
29
+
30
+ The models are quantized using tensorflow lite converter.
31
+
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 | Optimized |
51
+ |----------|-----------|-----------|
52
+ | STM32L0 |[]|[]|
53
+ | STM32L4 |[x]|[]|
54
+ | STM32U5 |[x]|[]|
55
+ | STM32H7 |[x]|[x]|
56
+ | STM32MP1 |[x]|[]|
57
+ | STM32MP2 |[x]|[]|
58
+ | STM32N6 |[x]|[]|
59
+
60
+ # Performances
61
+
62
+ ## Metrics
63
+
64
+ - Measures are done with default STM32Cube.AI configuration with enabled input / output allocated option.
65
+ - `tfs` stands for "training from scratch", meaning that the model weights were randomly initialized before training.
66
+
67
+
68
+ ### Reference **NPU** memory footprint on food101 dataset (see Accuracy for details on dataset)
69
+ |Model | Format | Resolution | Series | Internal RAM | External RAM | Weights Flash | STEdgeAI Core version |
70
+ |----------|--------|-------------|------------------|------------------|---------------------|---------------|-------------------------|
71
+ | [SqueezeNet v1.1 tfs ](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenetv11/ST_pretrainedmodel_public_dataset/food101/squeezenetv11_128_tfs/squeezenetv11_128_tfs_int8.tflite) | Int8 | 128x128x3 | STM32N6 | 240.25 | 0.0 | 753.38 | 3.0.0 |
72
+ | [SqueezeNet v1.1 tfs ](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenetv11/ST_pretrainedmodel_public_dataset/food101/squeezenetv11_224_tfs/squeezenetv11_224_tfs_int8.tflite) | Int8 | 224x224x3 | STM32N6 | 803.52 | 0.0 | 753.38 | 3.0.0 |
73
+
74
+ ### Reference **NPU** inference time on food101 dataset (see Accuracy for details on dataset)
75
+ | Model | Format | Resolution | Board | Execution Engine | Inference time (ms) | Inf / sec | STEdgeAI Core version |
76
+ |--------|--------|-------------|------------------|------------------|---------------------|-----------|-------------------------|
77
+ | [SqueezeNet v1.1 tfs ](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenetv11/ST_pretrainedmodel_public_dataset/food101/squeezenetv11_128_tfs/squeezenetv11_128_tfs_int8.tflite) | Int8 | 128x128x3 | STM32N6570-DK | NPU/MCU | 3.82 | 261.78 | 3.0.0 |
78
+ | [SqueezeNet v1.1 tfs ](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenetv11/ST_pretrainedmodel_public_dataset/food101/squeezenetv11_224_tfs/squeezenetv11_224_tfs_int8.tflite) | Int8 | 224x224x3 | STM32N6570-DK | NPU/MCU | 7.97 | 125.47 | 3.0.0 |
79
+
80
+
81
+ ### Reference **MCU** memory footprint based on Flowers dataset (see Accuracy for details on dataset)
82
+ | Model | Format | Resolution | Series | Activation RAM | Runtime RAM | Weights Flash | Code Flash | Total RAM | Total Flash | STEdgeAI Core version |
83
+ |-------------------------------------------------------------------------------------------------------------------------------------|--------|------------|---------|----------------|-------------|--------------|------------|-------------|-------------|-----------------------|
84
+ | [SqueezeNet v1.1 tfs ](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenetv11/ST_pretrainedmodel_public_dataset/tf_flowers/squeezenetv11_128_tfs/squeezenetv11_128_tfs_int8.tflite) | Int8 | 128x128x3 | STM32H7 | 271.84 KiB | 3.72 KiB | 716.71 KiB | 45.79 KiB | 275.56 KiB | 762.5 KiB | 3.0.0 |
85
+ | [SqueezeNet v1.1 tfs ](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenetv11/ST_pretrainedmodel_public_dataset/tf_flowers/squeezenetv11_224_tfs/squeezenetv11_224_tfs_int8.tflite) | Int8 | 224x224x3 | STM32H7 | 829.09 KiB | 3.72 KiB | 716.71 KiB | 45.85 KiB | 832.81 KiB | 762.56 KiB | 3.0.0 |
86
+
87
+
88
+ ### Reference **MCU** inference time based on Flowers dataset (see Accuracy for details on dataset)
89
+
90
+
91
+ | Model | Format | Resolution | Board | Execution Engine | Frequency | Inference time (ms) | STEdgeAI Core version |
92
+ |-------------------------------------------------------------------------------------------------------------------------------------|--------|------------|------------------|---------------|-----------|---------------------|-----------------------|
93
+ | [SqueezeNet v1.1 tfs ](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenetv11/ST_pretrainedmodel_public_dataset/tf_flowers/squeezenetv11_128_tfs/squeezenetv11_128_tfs_int8.tflite) | Int8 | 128x128x3 | STM32H747I-DISCO | 1 CPU | 400 MHz | 218.97 ms | 3.0.0 |
94
+ | [SqueezeNet v1.1 tfs ](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenetv11/ST_pretrainedmodel_public_dataset/tf_flowers/squeezenetv11_224_tfs/squeezenetv11_224_tfs_int8.tflite) | Int8 | 224x224x3 | STM32H747I-DISCO | 1 CPU | 400 MHz | 704.22 ms | 3.0.0 |
95
+
96
+
97
+ ### Reference **MPU** inference time based on Flowers dataset (see Accuracy for details on dataset)
98
+
99
+ | Model | Format | Resolution | Quantization | Board | Execution Engine | Frequency | Inference time (ms) | %NPU | %GPU | %CPU | X-LINUX-AI version | Framework |
100
+ |-------------------------------------------------------------------------------------------------------------------------------|--------|------------|----------------|-----------------|------------------|-----------|---------------------|------|-------|------|--------------------|-----------------------|
101
+ | [SqueezeNet v1.1 tfs ](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenetv11/ST_pretrainedmodel_public_dataset/tf_flowers/squeezenetv11_128_tfs/squeezenetv11_128_tfs_int8.tflite) | Int8 | 128x128x3 | per-channel** | STM32MP257F-DK2 | NPU/GPU | 800 MHz | 9.41 | 9.70 | 90.30 | 0 | v6.1.0 | OpenVX |
102
+ | [SqueezeNet v1.1 tfs ](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenetv11/ST_pretrainedmodel_public_dataset/tf_flowers/squeezenetv11_224_tfs/squeezenetv11_224_tfs_int8.tflite) | Int8 | 224x224x3 | per-channel** | STM32MP257F-DK2 | NPU/GPU | 800 MHz | 30.93 | 8.45 | 91.55 | 0 | v6.1.0 | OpenVX |
103
+ | [SqueezeNet v1.1 tfs ](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenetv11/ST_pretrainedmodel_public_dataset/tf_flowers/squeezenetv11_128_tfs/squeezenetv11_128_tfs_int8.tflite) | Int8 | 128x128x3 | per-channel | STM32MP157F-DK2 | 2 CPU | 800 MHz | 45.27 | NA | NA | 100 | v6.1.0 | TensorFlowLite 2.18.0 |
104
+ | [SqueezeNet v1.1 tfs ](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenetv11/ST_pretrainedmodel_public_dataset/tf_flowers/squeezenetv11_224_tfs/squeezenetv11_224_tfs_int8.tflite) | Int8 | 224x224x3 | per-channel | STM32MP157F-DK2 | 2 CPU | 800 MHz | 145.33 | NA | NA | 100 | v6.1.0 | TensorFlowLite 2.18.0 |
105
+ | [SqueezeNet v1.1 tfs ](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenetv11/ST_pretrainedmodel_public_dataset/tf_flowers/squeezenetv11_128_tfs/squeezenetv11_128_tfs_int8.tflite) | Int8 | 128x128x3 | per-channel | STM32MP135F-DK2 | 1 CPU | 1000 MHz | 71.93 | NA | NA | 100 | v6.1.0 | TensorFlowLite 2.18.0 |
106
+ | [SqueezeNet v1.1 tfs ](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenetv11/ST_pretrainedmodel_public_dataset/tf_flowers/squeezenetv11_224_tfs/squeezenetv11_224_tfs_int8.tflite) | Int8 | 224x224x3 | per-channel | STM32MP135F-DK2 | 1 CPU | 1000 MHz | 235.63 | NA | NA | 100 | v6.1.0 | TensorFlowLite 2.18.0 |
107
+
108
+ ** **To get the most out of MP25 NPU hardware acceleration, please use per-tensor quantization**
109
+
110
+ ** **Note:** On STM32MP2 devices, per-channel quantized models are internally converted to per-tensor quantization by the compiler using an entropy-based method. This may introduce a slight loss in accuracy compared to the original per-channel models.
111
+
112
+ ### Accuracy with Flowers dataset
113
+
114
+
115
+ Dataset details: [link](http://download.tensorflow.org/example_images/flower_photos.tgz) , License [CC BY 2.0](https://creativecommons.org/licenses/by/2.0/) , Quotation[[1]](#1) , Number of classes: 5, Number of images: 3 670
116
+
117
+ | Model | Format | Resolution | Top 1 Accuracy |
118
+ |---------|--------|------------|--------------|
119
+ | [SqueezeNet v1.1 tfs ](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenetv11/ST_pretrainedmodel_public_dataset/tf_flowers/squeezenetv11_128_tfs/squeezenetv11_128_tfs.keras) | Float | 128x128x3 | 80.93 % |
120
+ | [SqueezeNet v1.1 tfs ](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenetv11/ST_pretrainedmodel_public_dataset/tf_flowers/squeezenetv11_128_tfs/squeezenetv11_128_tfs_int8.tflite) | Int8 | 128x128x3 | 80.93 % |
121
+ | [SqueezeNet v1.1 tfs ](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenetv11/ST_pretrainedmodel_public_dataset/tf_flowers/squeezenetv11_224_tfs/squeezenetv11_224_tfs.keras) | Float | 224x224x3 | 85.29 % |
122
+ | [SqueezeNet v1.1 tfs ](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenetv11/ST_pretrainedmodel_public_dataset/tf_flowers/squeezenetv11_224_tfs/squeezenetv11_224_tfs_int8.tflite) | Int8 | 224x224x3 | 83.24 % |
123
+
124
+ ### Accuracy with Food-101 dataset
125
+
126
+ Dataset details: [link](https://data.vision.ee.ethz.ch/cvl/datasets_extra/food-101/), Quotation[[3]](# 3) , Number of classes: 101 , Number of images: 101 000
127
+
128
+
129
+ | Model | Format | Resolution | Top 1 Accuracy |
130
+ |---------|--------|------------|----------------|
131
+ | [SqueezeNet v1.1 tfs ](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenetv11/ST_pretrainedmodel_public_dataset/food101/squeezenetv11_128_tfs/squeezenetv11_128_tfs.keras) | Float | 128x128x3 | 60.28 % |
132
+ | [SqueezeNet v1.1 tfs ](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenetv11/ST_pretrainedmodel_public_dataset/food101/squeezenetv11_128_tfs/squeezenetv11_128_tfs_int8.tflite) | Int8 | 128x128x3 | 60.17 % |
133
+ | [SqueezeNet v1.1 tfs ](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenetv11/ST_pretrainedmodel_public_dataset/food101/squeezenetv11_224_tfs/squeezenetv11_224_tfs.keras) | Float | 224x224x3 | 68.08 % |
134
+ | [SqueezeNet v1.1 tfs ](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenetv11/ST_pretrainedmodel_public_dataset/food101/squeezenetv11_224_tfs/squeezenetv11_224_tfs_int8.tflite) | Int8 | 224x224x3 | 67.3 % |
135
+
136
+
137
+ ### Accuracy with Plant-village dataset
138
+
139
+
140
+ Dataset details: [link](https://data.mendeley.com/datasets/tywbtsjrjv/1) , License [CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/), Quotation[[2]](#2) , Number of classes: 39, Number of images: 61 486
141
+
142
+ | Model | Format | Resolution | Top 1 Accuracy |
143
+ |---------|--------|------------|---------------|
144
+ | [SqueezeNet v1.1 tfs ](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenetv11/ST_pretrainedmodel_public_dataset/plant_leaf_diseases/squeezenetv11_128_tfs/squeezenetv11_128_tfs.keras) | Float | 128x128x3 | 99.77 % |
145
+ | [SqueezeNet v1.1 tfs ](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenetv11/ST_pretrainedmodel_public_dataset/plant_leaf_diseases/squeezenetv11_128_tfs/squeezenetv11_128_tfs_int8.tflite) | Int8 | 128x128x3 | 99.69 % |
146
+ | [SqueezeNet v1.1 tfs ](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenetv11/ST_pretrainedmodel_public_dataset/plant_leaf_diseases/squeezenetv11_224_tfs/squeezenetv11_224_tfs.keras) | Float | 224x224x3 | 99.88 % |
147
+ | [SqueezeNet v1.1 tfs ](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/squeezenetv11/ST_pretrainedmodel_public_dataset/plant_leaf_diseases/squeezenetv11_224_tfs/squeezenetv11_224_tfs_int8.tflite) | Int8 | 224x224x3 | 99.74 % |
148
+
149
+
150
+ ## Retraining and Integration in a simple example:
151
+
152
+ Please refer to the stm32ai-modelzoo-services GitHub [here](https://github.com/STMicroelectronics/stm32ai-modelzoo-services)
153
+
154
+
155
+ # References
156
+
157
+ <a id="1">[1]</a>
158
+ "Tf_flowers : tensorflow datasets," TensorFlow. [Online]. Available: https://www.tensorflow.org/datasets/catalog/tf_flowers.
159
+
160
+ <a id="2">[2]</a>
161
+ J, ARUN PANDIAN; GOPAL, GEETHARAMANI (2019), "Data for: Identification of Plant Leaf Diseases Using a 9-layer Deep Convolutional Neural Network", Mendeley Data, V1, doi: 10.17632/tywbtsjrjv.1
162
+
163
+ <a id="3">[3]</a>
164
+ L. Bossard, M. Guillaumin, and L. Van Gool, "Food-101 -- Mining Discriminative Components with Random Forests." European Conference on Computer Vision, 2014.