Skip to content

STMicroelectronics/stm32ai-modelzoo

Repository files navigation

STMicroelectronics – STM32 model zoo

Welcome to STM32 model zoo!

The STM32 AI model zoo is a collection of reference machine learning models that are optimized to run on STM32 microcontrollers. Available on GitHub, this is a valuable resource for anyone looking to add AI capabilities to their STM32-based projects.

  • A large collection of application-oriented models ready for re-training
  • Pre-trained models on reference datasets

Scripts to easily retrain, quantize, evaluate or benchmark any model from user datasets as well as application code examples automatically generated from user AI model can be found in the stm32ai-modelzoo-services GitHub

These models can be useful for quick deployment if you are interested in the categories that they were trained. We also provide training scripts to do transfer learning or to train your own model from scratch on your custom dataset.

The performances on reference STM32 MCU, NPU and MPU are provided for float and quantized models.

What's new in releases :

3.0:
  • Included additional models compatible with the STM32N6570-DK board.
  • Expanded models in all use cases.
  • Expanded use case support to include Instance Segmentation and Speech Enhancement.
  • Added Pytorch support through the speech enhancement Use Case.
  • Model Zoo hosted on Hugging Face
2.1:
  • Included additional models compatible with the STM32MP257F-EV1 board.
  • Expanded use case support to include Pose Estimation and Semantic Segmentation.
2.0:
  • An aligned and uniform architecture for all the use case

Find below a summary of available use cases

Use Case Quick definition Suitable Targets for deployment Smart example
Image Classification Classifies the content of an image within a predefined set of classes. STM32H747I-DISCO
NUCLEO-H743ZI2
STM32MP257F-EV1
STM32N6570-DK
plot
Object Detection Detects, locates and estimates the occurences probability of predefined objects from input images. STM32H747I-DISCO
STM32MP257F-EV1
STM32N6570-DK
plot
Pose Estimation Detects key points on some specific objects (people, hand, face, ...). STM32MP257F-EV1
STM32N6570-DK
plot
Semantic Segmentation Associates a label to every pixel in an image to recognize a collection of pixels that form distinct categories. STM32MP257F-EV1
STM32N6570-DK
plot
Instance Segmentation Associates a label to every pixel in an image to recognize a collection of pixels that form distinct categories or instances of each category. STM32N6570-DK
plot
Audio Event Detection Detection of a specific audio events. B-U585I-IOT02A ThreadX
B-U585I-IOT02A FreeRTOS
STM32N6570-DK
plot
Speech Enhancement Enhancement of the audio perception in a noisy environment. STM32N6570-DK
plot
Human Activity Recognition Recognizes various activities like walking, running, ... B-U585I-IOT02A
plot
Hand Posture Recognition Recognizes a set of hand postures using Time of Flight (ToF) sensor NUCLEO-F401RE
plot

The Model Zoo Dashboard is hosted in a Docker environment under the STMicroelectronics Organization. This dashboard is developed using Dash Plotly and Flask, and it operates within a Docker container. It can also run locally if Docker is installed on your system. The dashboard provides the following features:

• Training: Train machine learning models. • Evaluation: Evaluate the performance of models. • Benchmarking: Benchmark your model using ST Edge AI Developer Cloud • Visualization: Visualize model performance and metrics. • User Configuration Update: Update and modify user configurations directly from the dashboard. • Output Download: Download model results and outputs.

You can also find our models on Hugging Face under the STMicroelectronics Organization. Each model from the STM32AI Model Zoo is represented by a model card on Hugging Face, providing all the necessary information about the model and linking to dedicated scripts.

Before you start

The model zoo repo is using the git lfs, so the users need to install and set up the git lfs before cloning the repo. This can be done by following the instructions below.

  • On Ubuntu:

    sudo apt-get install git-lfs
  • On Windows: Download the Git LFS extension here.

Once downloaded and installed, set up Git LFS for your user account by running the following command:

git lfs install

You should see the message Git LFS initialized. if the command runs successfully.

NOTE: If you do not see the message Git LFS initialized., visit the GitHub documentation page for more details and support.

Clone the Repository

git clone https://github.com/STMicroelectronics/stm32ai-modelzoo.git