No video

TinyML: Getting Started with STM32 X-CUBE-AI | Digi-Key Electronics

  Рет қаралды 40,194

DigiKey

DigiKey

Күн бұрын

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...

Пікірлер: 38
@TheCarmacon
@TheCarmacon 4 жыл бұрын
THANK you so much - incredibly helpful video, especially liked the comparison to TensorFlow Lite.
@ShawnHymel
@ShawnHymel 4 жыл бұрын
Glad it helped!
@whliao98
@whliao98 3 жыл бұрын
Thank you so much!!! I am trying to use CubeAI for my Graduation Project, and your amazing video help me a lot !!! Thanks again!!!
@Electronzap
@Electronzap 4 жыл бұрын
That's a really cool microcontroller. It's a great time to be learning electronics :D
@HendricAlbertein
@HendricAlbertein 2 жыл бұрын
Thank you so much. I am trying to use Cube AI ,and your amazing video help me a lot.
@apoorvsinghnegi6729
@apoorvsinghnegi6729 3 жыл бұрын
did anyone faded issue of "TOOL ERROR Didn't find op for built-in opcode "FULLY_CONNECTED" for version '9' Registration failed" while validating the model
@sailfromsurigao
@sailfromsurigao 3 жыл бұрын
I can't find the code that you mentioned you provided in the description? Can I ask for it?
@petercheung63
@petercheung63 11 ай бұрын
great video, thanks
@rickpandey8963
@rickpandey8963 3 жыл бұрын
I also got into an infinite loop while debugging. I checked whats going on. I found it is due to the for loop structure that causes problem. In the for loop condition you are writing "AI_SINE_MODEL_1_SIZE" and its value is a positive integer. For loop will go into an infinite loop if the condition is just an integer. I just replaced it by a condition lets say "i
@unhandledexception5988
@unhandledexception5988 Жыл бұрын
I think XCube ai tool is no longer proprietary. 1:16 great explanation btw. Thanks
@ZebroLebro
@ZebroLebro 3 жыл бұрын
Is there a video explaining how to set up the serial debugger?
@ButilkaRomm
@ButilkaRomm 3 жыл бұрын
I am always imperssed with how much things are packed in 15 minutes.
@eduardojreis
@eduardojreis 7 ай бұрын
6:58 - What is this pre-made validation program showed earlier? I got a bit lost. 8:23 - Coding with the model in `main.c`
@adaminsanoff
@adaminsanoff 3 жыл бұрын
Amazing!
@farouktilaoui7489
@farouktilaoui7489 2 жыл бұрын
can you make a video about face recognition
@tomatosmusic2525
@tomatosmusic2525 2 жыл бұрын
Hey there! I'm having an "invalid initializer error" on my sine_model.h code. It says the error is here, but I don't understand what's wrong. The error is both here: AI_DEPRECATED #define AI_SINE_MODEL_IN \ ai_sine_model_inputs_get(AI_HANDLE_NULL, NULL) And here: AI_DEPRECATED #define AI_SINE_MODEL_OUT \ ai_sine_model_outputs_get(AI_HANDLE_NULL, NULL) It was a code generated by the X-Cube-AI so I don't understand what's happening.
@nassimrami4651
@nassimrami4651 2 жыл бұрын
me too. have you fixed the problem ?
@tomatosmusic2525
@tomatosmusic2525 2 жыл бұрын
@@nassimrami4651 Hi, Nassim. I think it's because you're using a new version of X-Cube-AI. Try installing the same version he uses in the video and it'll work. I think version 7.0+ changed the way inputs and outputs are generated.
@027_lakshaynegi6
@027_lakshaynegi6 Жыл бұрын
@@tomatosmusic2525 So you have any idea how new one works?
@mohammadbasilfaruqui3503
@mohammadbasilfaruqui3503 Жыл бұрын
​@@tomatosmusic2525 You can't use previous version of library with the latest STMCubeMX firmware, and there's no way to use the previous version of firmware😢
@amiraaouadi7657
@amiraaouadi7657 11 ай бұрын
@@mohammadbasilfaruqui3503 So what to do ??
@poneetrahul
@poneetrahul 2 жыл бұрын
This video looks like it took a lot of work to put together. I have a question about MVC: main.c looked to be written as a controller (interface between a model and the hardware), but I believe you referred to it as a model. Can you explain this to someone who would have taken some computer science courses at the college/university level?
@POLIVERITO
@POLIVERITO 2 ай бұрын
Hi! Could I apply your awesome video using a STM32F103C8T6 board? (Help please)
@thornkylefourwalkmans2068
@thornkylefourwalkmans2068 Ай бұрын
i think F1 series does not support CubeAI
@carlosfreitas1836
@carlosfreitas1836 3 жыл бұрын
Very nice!!!!! I'm changing this code for STM32F4Discovery, but I have doubt, How to adapt this code for 3 inputs and 1 output? Thank you?
@baichuan9777
@baichuan9777 2 жыл бұрын
what do you mean ' pre-made validation program' ?
@blahman442
@blahman442 3 жыл бұрын
I got too many errors. Can I get a download link for the stm32 cube ide project?
@shawntaylor9509
@shawntaylor9509 3 жыл бұрын
Are you turning grey?
@zgczmonkey165
@zgczmonkey165 2 жыл бұрын
点赞
@MrWATCHthisWAY
@MrWATCHthisWAY 4 жыл бұрын
It’s not IF they will drop support in the future for ASTM32, but WHEN they will? Right after the money runs out! Happy Hacking!
@jaybee1359
@jaybee1359 4 жыл бұрын
Are you referring to STM going under or AI support for the STM32's? Not entirely sure what you're referring to here
@MrWATCHthisWAY
@MrWATCHthisWAY 4 жыл бұрын
Jay Bee - I was making a joke to the fact that, divisions of companies usually stop providing support when it’s no longer financially profitable to do so. When the money runs out! Sorry I was not explicit enough in my last comment and left you guessing what the hell I’m taking about??
Getting Started with STM32Cube.AI
13:58
STMicroelectronics
Рет қаралды 49 М.
WORLD'S SHORTEST WOMAN
00:58
Stokes Twins
Рет қаралды 194 МЛН
WHO CAN RUN FASTER?
00:23
Zhong
Рет қаралды 42 МЛН
Harley Quinn's plan for revenge!!!#Harley Quinn #joker
00:49
Harley Quinn with the Joker
Рет қаралды 33 МЛН
#345 ESP32 vs STM32: Which one is better (Bluepill)?
15:37
Andreas Spiess
Рет қаралды 238 М.
The moment we stopped understanding AI [AlexNet]
17:38
Welch Labs
Рет қаралды 938 М.
STM32 + LCD TFT = Display Any Data
17:28
Nick Electronics
Рет қаралды 13 М.
PlatformIO: All you need to know in 10 Minutes!
10:56
J's e-shack
Рет қаралды 304 М.
Top Fifteen Mistakes People Make When Designing Prototype PCBs
12:26
Cosplay Light and Sound
Рет қаралды 145 М.
WORLD'S SHORTEST WOMAN
00:58
Stokes Twins
Рет қаралды 194 МЛН