Image Classification
FBAGSTM commited on
Commit
ef60e7d
·
verified ·
1 Parent(s): 64ea03c

Release AI-ModelZoo-4.0.0

Browse files
Files changed (1) hide show
  1. README.md +101 -3
README.md CHANGED
@@ -1,3 +1,101 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ pipeline_tag: image-classification
4
+ ---
5
+ # DarkNetTiny
6
+
7
+ ## **Use case** : `Image classification`
8
+
9
+ # Model description
10
+
11
+
12
+ DarkNet is a convolutional neural network architecture that serves as the backbone for the YOLO (You Only Look Once) object detection series. It is designed for **efficient feature extraction with a focus on real-time object detection applications**.
13
+
14
+ DarkNetTiny is the compact version designed for embedded deployment. It features **Leaky ReLU activations**, **batch normalization** after every convolutional layer, and uses **global average pooling** instead of fully connected layers to reduce parameter count.
15
+
16
+ The straightforward stack of convolutional layers makes it easy to implement and modify, while maintaining competitive performance on edge devices.
17
+
18
+ (source: https://arxiv.org/abs/1804.02767)
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.04 M |
29
+ | Quantization | Int8 |
30
+ | Provenance | https://github.com/pjreddie/darknet |
31
+ | Paper | https://arxiv.org/abs/1804.02767 |
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
+ | [darknettiny_pt_224](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/darknet_pt/Public_pretrainedmodel_public_dataset/Imagenet/darknettiny_pt_224/darknettiny_pt_224_qdq_int8.onnx) | Imagenet | Int8 | 224×224×3 | STM32N6 | 539 | 0 | 1067.11 | 3.0.0 |
71
+
72
+ ### Reference **NPU** inference time on Imagenet dataset (see Accuracy for details on dataset)
73
+ | Model | Dataset | Format | Resolution | Board | Execution Engine | Inference time (ms) | Inf / sec | STEdgeAI Core version |
74
+ |-------|---------|--------|--------|------------|-------|-----------------|-------------------|---------------------|
75
+ | [darknettiny_pt_224](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/darknet_pt/Public_pretrainedmodel_public_dataset/Imagenet/darknettiny_pt_224/darknettiny_pt_224_qdq_int8.onnx) | Imagenet | Int8 | 224×224×3 | STM32N6570-DK | NPU/MCU | 7.54 | 132.63 | 3.0.0 |
76
+
77
+ ### Accuracy with Imagenet dataset
78
+
79
+ Dataset details: [link](https://www.image-net.org)
80
+ Number of classes: 1000.
81
+ To perform the quantization, we calibrated the activations with a random subset of the training set.
82
+ For the sake of simplicity, the accuracy reported here was estimated on the 50000 labelled images of the validation set.
83
+
84
+ | model | Format | Resolution | Top 1 Accuracy |
85
+ | --- | --- | --- | --- |
86
+ | [darknettiny_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/darknet_pt/Public_pretrainedmodel_public_dataset/Imagenet/darknettiny_pt_224/darknettiny_pt_224.onnx) | Float | 224x224x3 | 60.34 % |
87
+ | [darknettiny_pt](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/image_classification/darknet_pt/Public_pretrainedmodel_public_dataset/Imagenet/darknettiny_pt_224/darknettiny_pt_224_qdq_int8.onnx) | Int8 | 224x224x3 | 52.64 % |
88
+
89
+
90
+
91
+ ## Retraining and Integration in a simple example:
92
+
93
+ Please refer to the stm32ai-modelzoo-services GitHub [here](https://github.com/STMicroelectronics/stm32ai-modelzoo-services)
94
+
95
+
96
+
97
+ # References
98
+
99
+ <a id="1">[1]</a> - **Dataset**: Imagenet (ILSVRC 2012) — https://www.image-net.org/
100
+
101
+ <a id="2">[2]</a> - **Model**: DarkNet — https://github.com/pjreddie/darknet