This page contains application examples, document references, tips and tricks and so on related to STM32 artificial intelligence.
1. What is AI at the edge
Smart objects are changing nearly every aspect of our daily lives, helping in our homes, workplaces, cities and factories. STMicroelectronics has been investing in AI for many years, recognizing that microcontrollers provide enough processing power to run AI software on smart objects and enable AI at the edge.
To simplify the development of AI algorithms on STM32 microcontrollers, STMicroelectronics has developed a solution called STM32Cube.AI.
2. STM32Cube.AI overview
STM32Cube.AI solution brings the following:
- An STM32CubeMX extension called X-CUBE-AI to convert a Neural Network into optimized code for an STM32 microcontroller.
- Software examples on STMicroelectronics development hardware boards are available for quick prototyping:
- Audio and motion sensing with the FP-AI-SENSING1 function pack working in combination of Bluetooth® Low Energy smart sensor application and supported on the following development boards:
- STM32 Nucleo-64 development board with STM32L476RG MCU NUCLEO-L476RG + Bluetooth® Low Energy expansion board X-NUCLEOIDB05A1 + Motion MEMS and environmental sensor expansion board X-NUCLEO-IKS01A2
- SensorTile development kit STEVALSTLKT01V1
- SensorTile.box multisensor kit with portable sensor box STEVAL-MKSBOX1V1
- STM32L4 Discovery kit IoT node B-L475E-IOT01A
- Vision on MCUs with the FP-AI-VISION1 function pack supported on the following development board:
- STM32H747I-DISCO Discovery kit connected to the B-CAMS-OMVS camera daughterboard
- AI on Linux for MPU with the X-LINUX-AI expansion pack supported on the following development board:
- Discovery kit with STM32MP157C MPU STM32MP157C-DK2 with a USB camera
- Evaluation board with STM32MP157A MPU STM32MP157A-EV1
- Evaluation board with STM32MP157C MPU STM32MP157C-EV1 with their built-in camera module
- Avenger96 board from Arrow using Linaro™ 96Boards format based on the STM32MP157A microprocessor, either with a USB camera or the DesignCore® OV5640 camera mezzanine board from D3 Engineering
- Audio and motion sensing with the FP-AI-SENSING1 function pack working in combination of Bluetooth® Low Energy smart sensor application and supported on the following development boards:
- STM32 community with dedicated Neural Networks topic
- AI Partner Program that brings expertise in Machine Learning and STM32 solutions
Check our list of resources for detailed information.
4. STM32 supported by STM32Cube.AI
STM32Cube.AI supports all Arm® Cortex®-M4, Cortex®-M33 and Cortex®-M7-based MCUs, as well as STM32 MP1. Other MCUs are supported in our partner ecosystem or can be added on-demand.
STM32Cube.AI supports the following deep learning frameworks:
Supported versions and layers for each framework are detailed in X-CUBE-AI release note. This documentation is available in X-CUBE-AI local installation folder at this location:
STM32Cube/Repository/Packs/STMicroelectronics/X-CUBE-AI/5.0.0/Documentation/faqs.html
5. X-CUBE-AI overview
X-CUBE-AI is a tool provided to help users to:
- Generate STM32 code from a Python™ Neural Network described in supported AI frameworks. It supports quantization scheme and optimizations for STM32, reducing memory requirement up to a factor of 4 and decreasing latency and power consumption up to a factor of 3.
- Analyze the network and see if it fits on the target
- Validate the generated C code on the PC or on the target against the original model
It is available through STM32CubeMX Graphical User Interface, or via Command Line Interface.
Software requirements
Supported operating systems and architectures
- Windows® 10 64-bit (x64)
- Linux® (tested on Red Hat®, Fedora® and Ubuntu® 16.04) 64 bits
- macOS® (minimum version High Sierra)
Prerequisite
- STM32CubeMX: 5.1.0 or higher is required
License
STM32CubeMX and X-CUBE-AI extension are delivered under the Mix Ultimate Liberty+OSS+3rd-party V1 software license agreement SLA0048.
6. STMicroelectronics Resources
All resources are gathered on STM32Cube.AI web page.
7. How to and Examples
7.1. STM32 MCU
- STM32Cube.AI
- X-CUBE-AI expansion package for artificial intelligence user manual
- X-CUBE-AI documentation
- X-CUBE-AI support of ONNX and TensorFlow quantized models
- Getting started with STM32Cube.AI Developer Cloud
- STM32Cube.AI model performances
- How to install STM32 model zoo
- How to install X-CUBE-AI through STM32CubeMX
- How to automatize code generation and validation with X-CUBE-AI CLI
- How to measure machine learning model power consumption with STM32Cube.AI generated application
- How to run larger models on STM32H747I-DISCO
- Deep Quantized Neural Network support
- NanoEdge AI Studio
- NanoEdge AI Studio
- NanoEdge AI Studio: CLI
- NanoEdge AI Library for anomaly detection (AD)
- NanoEdge AI Emulator for anomaly detection (AD)
- NanoEdge AI Library for n-class classification (nCC)
- NanoEdge AI Emulator for n-class classification (nCC)
- NanoEdge AI Library for 1-class classification (1CC)
- NanoEdge AI Emulator for 1-class classification (1CC)
- NanoEdge AI Library for extrapolation (E)
- NanoEdge AI Emulator for extrapolation (E)
- NanoEdge AI Anomaly Detection library for ISPU
- Datalogging guidelines for a successful NanoEdge AI project
- How to create a dual-tone multi-frequency classifier using NanoEdge AI Studio
- How to create a multi-state vibrations classifier using NanoEdge AI studio
- How to create a current sensing classifier using NanoEdge AI Studio
- Vision
- FP-AI-FACEREC1 getting started
- How to use Teachable Machine to create an image classification application on STM32
- How to add AI model to OpenMV ecosystem
- How to use transfer learning to perform image classification on STM32
- How to perform people counting using FP-AI-VISION1 and STM32H747XI
- Capture an Image Dataset with STM32
- Sensing
- FP-AI-MONITOR2 getting started
- FP-AI-MONITOR2 user manual
- FP-AI-MONITOR1 getting started
- FP-AI-MONITOR1 user manual
- FP-AI-MONITOR1 an introduction to the technology behind
- FP-AI-MONITOR1 how to integrate a different AI Model for Human Activity Recognition (HAR)
- FP-AI-NANOEDG1 V1.0 getting started
- FP-AI-NANOEDG1 V2.0 getting started
- FP-AI-NANOEDG1 V2.0 user manual
- How to perform anomaly detection using FP-AI-MONITOR1
- How to perform condition monitoring on STM32
- How to perform motion sensing on STM32L4 IoTnode
7.2. STM32 MPU
- Getting started with X-LINUX-AI
- Vision
8. References