Рет қаралды 40,194
In this tutorial, Shawn shows you how to use the STMicroelectronics X-CUBE-AI add-on package to perform machine learning tasks in an STM32 microcontroller. Specifically, he shows you how to install and use the add-on in STM32CubeIDE.
You will first need to train a sample neural network by following the steps in this video: • Intro to TinyML Part 1... . Download all three model files (.h5, .tflite, .h).
If you are not familiar with STM32CubeIDE, we recommend watching this video first: • Getting Started with S...
First, we show you how to download and enable the X-CUBE-AI add-on package from within STM32CubeIDE. Note that this package is part of the STM32Cube.AI suite. From there, you can load your trained neural network (we will use the TensorFlow Lite, .tflite, file).
X-CUBE-AI offers a number of tools to help you evaluate and test your model. Some of these can be run on your desktop, but others require a special program to be uploaded to your microcontroller first.
Please note that we are using the Nucleo-L432KC for this demonstration, which can be found here: www.digikey.co...
The CubeMX software can then be used to auto-generate a number of source code files used to initialize your peripherals and inference engine. We then demonstrate how to interact with the X-CUBE-AI library to perform inference with a simple neural network. All of which is done in C.
Finally, we measure the required flash and RAM used to run our basic neural network as well as the time it takes to run inference. These numbers can be used to compare against other machine learning frameworks, such as TensorFlow Lite for Microcontrollers.
Before starting, we recommend you watch the following videos:
What is Edge AI • Intro to Edge AI: Mach...
Getting Started with Machine Learning Using TensorFlow and Keras • Getting Started with T...
Intro to TinyML Part 1: Training a Neural Network for Arduino in TensorFlow • Intro to TinyML Part 1...
Getting Started with TensorFlow Lite for Microcontrollers • TinyML: Getting Starte...
Product Links:
Nucleo-L432KC www.digikey.co...
Related Videos:
Intro to Edge AI
• Intro to Edge AI: Mach...
Getting Started with Machine Learning Using TensorFlow and Keras
• Getting Started with T...
Intro to TensorFlow Lite Part 1: Wake Word Feature Extraction
• Intro to TensorFlow Li...
Intro to TensorFlow Lite Part 2: Speech Recognition Model Training
• Intro to TensorFlow Li...
Intro to TensorFlow Lite Part 3: Speech Recognition on Raspberry Pi
• Intro to TensorFlow Li...
Low-Cost Data Acquisition (DAQ) with Arduino and Binho for Machine Learning
• Low-Cost Data Acquisit...
Intro to TinyML Part 1: Training a Neural Network for Arduino in TensorFlow
• Intro to TinyML Part 1...
Intro to TinyML Part 2: Deploying a TensorFlow Lite Model to Arduino
• Intro to TinyML Part ...
Edge AI Anomaly Detection Part 1: Data Collection
• Edge AI Anomaly Detect...
Edge AI Anomaly Detection Part 2: Feature Extraction and Model Training
• Edge AI Anomaly Detect...
Edge AI Anomaly Detection Part 3: Deploy Machine Learning Models to Raspberry Pi
• Edge AI Anomaly Detect...
Edge AI Anomaly Detection Part 4: Deploy TinyML Model in Arduino to ESP32
• Edge AI Anomaly Detect...
Related Project Links:
TinyML: Getting Started with STM32 X-CUBE-AI www.digikey.co...
Related Articles:
What is Edge AI?
www.digikey.co...
Getting Started with Machine Learning Using TensorFlow and Keras
www.digikey.co...
TensorFlow Lite Tutorials: www.digikey.co...
Low-Cost Data Acquisition (DAQ) with Arduino and Binho for ML
www.digikey.co...
Intro to TinyML: www.digikey.co...
Edge AI Anomaly Detection: www.digikey.co...