Release AI-ModelZoo-4.0.0
Browse files
README.md
CHANGED
|
@@ -1,6 +1,129 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: other
|
| 3 |
-
license_name: sla0044
|
| 4 |
-
license_link: >-
|
| 5 |
-
https://github.com/STMicroelectronics/stm32ai-modelzoo/blob/main/re_identification/mobilenetv2/ST_pretrainedmodel_public_dataset/DeepSportradar/LICENSE.md
|
| 6 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: sla0044
|
| 4 |
+
license_link: >-
|
| 5 |
+
https://github.com/STMicroelectronics/stm32ai-modelzoo/blob/main/re_identification/mobilenetv2/ST_pretrainedmodel_public_dataset/DeepSportradar/LICENSE.md
|
| 6 |
+
---
|
| 7 |
+
# MobileNet v2
|
| 8 |
+
|
| 9 |
+
## **Use case** : `Re-Identification`
|
| 10 |
+
|
| 11 |
+
# Model description
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
MobileNet v2 is very similar to the original MobileNet, except that it uses inverted residual blocks with bottlenecking features.
|
| 15 |
+
|
| 16 |
+
It has a drastically lower parameter count than the original MobileNet.
|
| 17 |
+
|
| 18 |
+
MobileNet models support any input size greater than 32 x 32, with larger image sizes offering better performance.
|
| 19 |
+
Alpha parameter: float, larger than zero, controls the width of the network. This is known as the width multiplier in the MobileNetV2 paper, but the name is kept for consistency with applications.
|
| 20 |
+
|
| 21 |
+
If alpha < 1.0, proportionally decreases the number of filters in each layer.
|
| 22 |
+
|
| 23 |
+
If alpha > 1.0, proportionally increases the number of filters in each layer.
|
| 24 |
+
|
| 25 |
+
If alpha = 1.0, default number of filters from the paper are used at each layer.
|
| 26 |
+
|
| 27 |
+
(source: https://keras.io/api/applications/mobilenet/)
|
| 28 |
+
|
| 29 |
+
The model is quantized in int8 using tensorflow lite converter.
|
| 30 |
+
|
| 31 |
+
## Network information
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
| Network Information | Value |
|
| 35 |
+
|-------------------------|-----------------|
|
| 36 |
+
| Framework | TensorFlow Lite |
|
| 37 |
+
| MParams alpha=0.35 | 1.66 M |
|
| 38 |
+
| Quantization | int8 |
|
| 39 |
+
| Provenance | https://www.tensorflow.org/api_docs/python/tf/keras/applications/mobilenet_v2 |
|
| 40 |
+
| Paper | https://arxiv.org/pdf/1801.04381.pdf |
|
| 41 |
+
|
| 42 |
+
The models are quantized using tensorflow lite converter.
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
## Network inputs / outputs
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
For an image resolution of NxM and P classes
|
| 49 |
+
|
| 50 |
+
| Input Shape | Description |
|
| 51 |
+
| ----- | ----------- |
|
| 52 |
+
| (1, N, M, 3) | Single NxM RGB image with UINT8 values between 0 and 255 |
|
| 53 |
+
|
| 54 |
+
| Output Shape | Description |
|
| 55 |
+
| ----- | ----------- |
|
| 56 |
+
| (1, P) | Per-class confidence for P classes in FLOAT32|
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
## Recommended platforms
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
| Platform | Supported | Recommended |
|
| 63 |
+
|----------|-----------|-----------|
|
| 64 |
+
| STM32L0 |[]|[]|
|
| 65 |
+
| STM32L4 |[x]|[]|
|
| 66 |
+
| STM32U5 |[x]|[]|
|
| 67 |
+
| STM32H7 |[x]|[x]|
|
| 68 |
+
| STM32MP1 |[x]|[x]|
|
| 69 |
+
| STM32MP2 |[x]|[x]|
|
| 70 |
+
| STM32N6 |[x]|[x]|
|
| 71 |
+
|
| 72 |
+
# Performances
|
| 73 |
+
|
| 74 |
+
## Metricss
|
| 75 |
+
|
| 76 |
+
- Measures are done with default STM32Cube.AI configuration with enabled input / output allocated option.
|
| 77 |
+
- `tfs` stands for "training from scratch", meaning that the model weights were randomly initialized before training.
|
| 78 |
+
- `tl` stands for "transfer learning", meaning that the model backbone weights were initialized from a pre-trained model, then only the last layer was unfrozen during the training.
|
| 79 |
+
- `fft` stands for "full fine-tuning", meaning that the full model weights were initialized from a transfer learning pre-trained model, and all the layers were unfrozen during the training.
|
| 80 |
+
|
| 81 |
+
|
| 82 |
+
### Reference **NPU** memory footprint on DeepSportradar dataset (see Accuracy for details on dataset)
|
| 83 |
+
|Model | Dataset | Format | Resolution | Series | Internal RAM | External RAM | Weights Flash | STEdgeAI Core version |
|
| 84 |
+
|----------|------------------|--------|-------------|------------------|------------------|---------------------|---------------|-------------------------|
|
| 85 |
+
| [MobileNet v2 0.35 fft](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/re_identification/mobilenetv2/ST_pretrainedmodel_public_dataset/DeepSportradar/mobilenetv2_a035_256_128_fft/mobilenetv2_a035_256_128_fft_int8.tflite) | DeepSportradar | Int8 | 256x128x3 | STM32N6 | 480 | 0.0 | 553.58 | 3.0.0 |
|
| 86 |
+
| [MobileNet v2 1.0 fft](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/re_identification/mobilenetv2/ST_pretrainedmodel_public_dataset/DeepSportradar/mobilenetv2_a100_256_128_fft/mobilenetv2_a100_256_128_fft_int8.tflite) | DeepSportradar | Int8 | 256x128x3 | STM32N6 | 1440 | 0.0 | 2786.52 | 3.0.0 |
|
| 87 |
+
|
| 88 |
+
|
| 89 |
+
### Reference **NPU** inference time on DeepSportradar dataset (see Accuracy for details on dataset)
|
| 90 |
+
| Model | Dataset | Format | Resolution | Board | Execution Engine | Inference time (ms) | Inf / sec | STEdgeAI Core version |
|
| 91 |
+
|--------|------------------|--------|-------------|------------------|------------------|---------------------|-----------| -----------------------|
|
| 92 |
+
| [MobileNet v2 0.35 fft](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/re_identification/mobilenetv2/ST_pretrainedmodel_public_dataset/DeepSportradar/mobilenetv2_a035_256_128_fft/mobilenetv2_a035_256_128_fft_int8.tflite) | DeepSportradar | Int8 | 256x128x3 | STM32N6570-DK | NPU/MCU | 4.15 | 241 | 3.0.0 |
|
| 93 |
+
| [MobileNet v2 1.0 fft](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/re_identification/mobilenetv2/ST_pretrainedmodel_public_dataset/DeepSportradar/mobilenetv2_a100_256_128_fft/mobilenetv2_a100_256_128_fft_int8.tflite) | DeepSportradar | Int8 | 256x128x3 | STM32N6570-DK | NPU/MCU | 13.37 | 74.8 | 3.0.0 |
|
| 94 |
+
|
| 95 |
+
|
| 96 |
+
### Reference **MCU** memory footprint based on DeepSportradar dataset (see Accuracy for details on dataset)
|
| 97 |
+
|Model | Dataset | Format | Resolution | Series | Internal RAM | External RAM | Weights Flash | STEdgeAI Core version |
|
| 98 |
+
|----------|------------------|--------|-------------|------------------|------------------|---------------------|---------------|-------------------------|
|
| 99 |
+
| [MobileNet v2 0.35 fft](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/re_identification/mobilenetv2/ST_pretrainedmodel_public_dataset/DeepSportradar/mobilenetv2_a035_256_128_fft/mobilenetv2_a035_256_128_fft_int8.tflite) | DeepSportradar | Int8 | 256x128x3 | STM32H7 | 461.32 | 0.0 | 400.59 | 3.0.0 |
|
| 100 |
+
| [MobileNet v2 1.0 fft](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/re_identification/mobilenetv2/ST_pretrainedmodel_public_dataset/DeepSportradar/mobilenetv2_a100_256_128_fft/mobilenetv2_a100_256_128_fft_int8.tflite) | DeepSportradar | Int8 | 256x128x3 | STM32H7 | 398.25 | 804.38 | 2205.06 | 3.0.0 |
|
| 101 |
+
|
| 102 |
+
### Reference **MCU** inference time on DeepSportradar dataset (see Accuracy for details on dataset)
|
| 103 |
+
| Model | Dataset | Format | Resolution | Board | Execution Engine | Inference time (ms) | Inf / sec | STEdgeAI Core version |
|
| 104 |
+
|--------|------------------|--------|-------------|------------------|------------------|---------------------|-----------| -----------------------|
|
| 105 |
+
| [MobileNet v2 0.35 fft](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/re_identification/mobilenetv2/ST_pretrainedmodel_public_dataset/DeepSportradar/mobilenetv2_a035_256_128_fft/mobilenetv2_a035_256_128_fft_int8.tflite) | DeepSportradar | Int8 | 256x128x3 | STM32H747I-DISCO | 1 CPU | 190.3 | 5.3 | 3.0.0 |
|
| 106 |
+
| [MobileNet v2 1.0 fft](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/re_identification/mobilenetv2/ST_pretrainedmodel_public_dataset/DeepSportradar/mobilenetv2_a100_256_128_fft/mobilenetv2_a100_256_128_fft_int8.tflite) | DeepSportradar | Int8 | 256x128x3 | STM32H747I-DISCO | 1 CPU | 729.45 | 1.37 | 3.0.0 |
|
| 107 |
+
|
| 108 |
+
|
| 109 |
+
|
| 110 |
+
### Performance with DeepSportradar ReID dataset
|
| 111 |
+
|
| 112 |
+
|
| 113 |
+
Dataset details: [link](https://github.com/DeepSportradar/player-reidentification-challenge) , License [Apache-2.0](https://github.com/DeepSportradar/player-reidentification-challenge?tab=Apache-2.0-1-ov-file#readme) , Number of identities: 486 (train: 436, test: 50), Number of images: 9529 (train: 8569, test_query: 50, test_gallery: 910)
|
| 114 |
+
|
| 115 |
+
| Model | Format | Resolution | mAP | rank-1 accuracy |rank-5 accuracy |rank-10 accuracy |
|
| 116 |
+
|-------|--------|------------|----------------|-----------------|----------------|-----------------|
|
| 117 |
+
| [MobileNet v2 0.35 fft](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/re_identification/mobilenetv2/ST_pretrainedmodel_public_dataset/DeepSportradar/mobilenetv2_a035_256_128_fft/mobilenetv2_a035_256_128_fft_int8.tflite) | Int8 | 256x128 | 73.43 % | 96.0 % | 96.0 % | 98.0 % |
|
| 118 |
+
| [MobileNet v2 1.0 fft](https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/re_identification/mobilenetv2/ST_pretrainedmodel_public_dataset/DeepSportradar/mobilenetv2_a100_256_128_fft/mobilenetv2_a100_256_128_fft_int8.tflite) | Int8 | 256x128 | 72.5 % | 94.0 % | 98.0 % | 98.0 % |
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
## Retraining and Integration in a simple example:
|
| 122 |
+
|
| 123 |
+
Please refer to the stm32ai-modelzoo-services GitHub [here](https://github.com/STMicroelectronics/stm32ai-modelzoo-services)
|
| 124 |
+
|
| 125 |
+
|
| 126 |
+
# References
|
| 127 |
+
|
| 128 |
+
<a id="1">[1]</a>
|
| 129 |
+
The DeepSportradar Player Re-Identification Challenge (2023) [Online]. Available: https://github.com/DeepSportradar/player-reidentification-challenge.
|