Get ready for the STM32 Summit 2026 | Online, November 3
Ask questions and find answers on how to deploy, debug, and optimize AI models on ST microcontrollers, microprocessors, and smart sensors.
Most recent activity
I am looking for a way to convert from Tensorflow trained models to STM32 AI, which the release blog entry makes me believe is possible. However, when looking at the tool, this doesn't appear to be an option. Is Keras the only Tensorflow related tool it is possible to convert from? I am working with a system trained directly in TF and the conversion of all of the models would be a significant amount of work.
I am trying to deploy a pre-trained Mobilenet model using STMCubeMX.ai, but I am facing some issue that I want to report.Here the link of the projecthttps://github.com/alessandrocapotondi/mobilenet_stmcube_aiHere the model I am using:https://github.com/alessandrocapotondi/mobilenet_stmcube_ai/blob/master/keras_model/mobilenet_160_0_25.h5For the model that I am using, the compression seems to have no effect:None (1.79MB)Compression 4 (1.79MB)Compression 8 (1.79MB)Is it normal? There are any log that I can inspect to check what is going wrong?PS: i will report another issue regarding the activation size on another topic.
Dear Community,I am trying to import a standard Mobilenet Model from Keras.Unfortunally I am getting this error during the load of the model inside cubemx.ai: [AI:Generator] Command ***/STM32Cube/Repository//Packs/STMicroelectronics/X-CUBE-AI/3.4.0/Utilities/windows/generatecode --auto -c C:/Users/ALESSA~1/AppData/Local/Temp/mxAI256000625112004454394714515898287/config.ai [AI:Generator] NOT IMPLEMENTED: Unsupported layer type: ReLU [AI:Generator] Python generation ended [AI:Generator] Invalid networkAccording to the user manual UM2526 (Page 46) https://www.st.com/resource/en/user_manual/dm00570145.pdf should be supported.Activation: nonlinear activation layer, decoded also when part of Conv2D, DepthwiseConv2D, SeparableConv2D, or Dense. The following attributes are supported:– nonlinearity: type of nonlinear activation; the following functions are supported: linear, relu, relu6, softmax, tanh, sigmoid, and hard_sigmoid.Some of you has some insight about the problem
..
Hi,I made a small Python script that allows to convert models from the commandline. Wraps the same tools used by STM32CubeMX but can be integrated into build scripts and similar, without having to go through the GUI.It also outputs the resources used (RAM,FLASH,CPU) . There are options for the compression settings, see `--help` for details.Tested with Keras on Linux, but should work on other platforms too.Example usage:$ XCUBEAI_VERSION=3.4.0 python3 stm32convert.py mobilenet.hdf5 ./out/ Wrote model to ./out/ Model status: {"maccs_frame": 1639034, "flash_usage": 31150.0, "ram_usage_max": 216820.0, "ram_usage_min": 216820.0} $ ls -a out/ . .. config.ai network.c network_data.c network_data.h network.h network.hdf5 network.json network.pngHope this can be useful to others as well.Regards, Jon NordbyMachine Learning Engineer & Consultant
Hi,I am using NUCLEO-L476RG for artificial intelligence purpose. I made my model in STM32CUBEMX.AI and generated my code. Now i want to download it in micro controller.But i am student and unfortunately, KEIL IDE is not support codes more than 32kb.Could you please let me know what the solution is for me? and how can i download my code in micro controller?regards
Hi I am trying to validate the custom data from .txt file over desktop but the process of validation is not able to complete.. it just continues. Can you please suggest me solution for this. Also while creating the validation model even with random data I am getting error of 'wish' not selected , please select manually.
Can you please tell me why it have three files included network1 , 2 , 3?. I have only created one network in the cubemx
Hello, https://www.youtube.com/watch?v=grgNXdkmzzQ in this video, your collegue describes how to implement a keras model into the STM32Cube A.I and a STM32F7. My further step: assuming i measure further values with the same accelerometer with the pretrained NN programmed STM32F7 via I2C. Now this model is trained via Keras for different classes (sitting, jogging, running, walking etc.) . When i measure values via I2C through the pretrained Microcontroller through the model, how can i distinguish between these different classes within the microcontroller?. Because i think this pretrained NN which is into the microcontroller should recognize these classes, isnt it?. For example i would express through a Uart-port these classes to a terminal. How should that work?
Hello to all, I'm very new to AI and I tried different Keras model with Cube.AI to test my knowledge. In particular this one generate an "Invalid Network" error and more esplicely I see on the log this error:2019-02-20 15:25:35,946 [INFO] AIPython:108 - Choose CNN input representation: 2019-02-20 15:25:35,946 [INFO] AIPython:108 - Set model name [network]: network 2019-02-20 15:25:35,946 [INFO] AIPython:108 - 1. Keras (Tensorflow) 2019-02-20 15:25:35,947 [INFO] AIPython:108 - 2. Lasagne (Theano) 2019-02-20 15:25:35,947 [INFO] AIPython:108 - 3. Caffe 2019-02-20 15:25:35,947 [INFO] AIPython:108 - 4. ConvNetJs 2019-02-20 15:25:35,947 [INFO] AIPython:108 - 2019-02-20 15:25:35,947 [INFO] AIPython:108 - Choose your option [1]: 1 2019-02-20 15:25:35,947 [INFO] AIPython:108 - 2019-02-20 15:25:35,947 [INFO] AIPython:108 - Provide Keras model parameters [C:/Users/c.dicaprio/Dropbox/Deep Learning on MCU/Mnist_Keras2.h5]: C:/Users/c.dicaprio/Dropbox/Deep Learning on MCU/Mnist_Keras2.h5 2019-
Hello, my model uses 2 SeparableConv2D, I am getting high error values when running validation : Ref layer 0 matched with C layer 1, error: 0.63482046 Ref layer 1 matched with C layer 3, error: 0.58572435 Ref layer 4 matched with C layer 5, error: 0.474215 Ref layer 5 matched with C layer 6, error: 1.0003685I made sure my model is using float32 so there should not be any precision errors.I does not depend on precision levelI get the same error level with data coming from my actual datasetCould it be a problem in C implementation of those SeparableConv2D layers ?Could it be possible to get the code of the .a library for debugging purpose ?thanks by advanceJulien
I have successfully replicated the example shown in the video: https://www.youtube.com/watch?v=grgNXdkmzzQNow I was trying to run cifar10 using keras on STM32F769I-DISCO board.After successfully compliling the code generated from STM32CubeMX, I tried to use "validate on target", but was met with an error, "ERROR: no connected board(s) or invalid firmware or the board should be re-started".I tried the solution proposed in the already asked question, https://community.st.com/s/question/0D50X0000AIdxgaSQB/getting-error-in-stm32cubemx-when-trying-to-validate-on-targetto connect to the STM32 via an serial terminal like Putty/Termite/TeraTerm... and I was able to get the prints in TeraTerm. But still validate on target returns error.What else could possibly be wrong.FW version: V2J32M22Regards,Mansi
Hello!!When I was learning the CubeMX.AI I could not find additional software's contains in my window.I have followed every step what the teaching video shows.But I can't see the contains !!!If you have figured that question,please tell me the way.Thank you!!!!
Can you please elaborate what is playback mode with test vectors a little? there is limited information in the document about it and how can i use it?
Posted on June 18, 2018 at 16:23I saw about the STM32cubeMX.AI development tool for implementing a pre-trained model in tensorflow on STM32 microcontrollers. I would like to know more about that and if the development tool is already available
HelloI am a bit confused about how to make artificial intelligence work.On this link on pages 4 and 5:https://www.st.com/content/ccc/resource/sales_and_marketing/presentation/product_presentation/group0/5e/79/f6/51/0a/2b/47/81/STM32CubeAI_press_pres/files/STM32CubeAI_press_pres.pdf/jcr: content / translations / en.STM32CubeAI_press_pres.pdfand on the following youtube link: https://www.youtube.com/watch?v=GGlPmuZBmdcdo you need the STEVAL-STLKT01V1 every time you want to create an artificial intelligence?Can I use only the B-L475E-IOT01A card to create an artificial intelligence?I tried the demo: https://www.youtube.com/watch?v=grgNXdkmzzQ&t=140son the STM32F746 Discovery board but I get the following message when I press Analyse:Command: C: /Users/dell/STM32Cube/Repository//Packs/STMicroelectronics/X-CUBE-AI/3.3.0/Utilities/windows/generatecode --auto -c C: / Users / dell / AppData / Local /Temp/mxAI51319793914639675789424336410389/config.aiPython generation ended Invalid net
Hello,My name is Huseyin Kilic.i want to use STM32Cube A.I. I have obtained various documents. I already installed STM32Cube with the A.I extension. Now I would like to use an ultrasonic sensor for it. Currently I am running Tensorflow. How do I have to import the measured data into Tensorflow, so that I can train the neural network? How do I create a model data set for STM32Cube via Tensorflow and then import it into my microcontroller?. Because STM32Cube A.I needs a model...3. do you have any documents or examples on how to do this?Best regards,Hüseyin Kilic
I have been evaluating X-CUBE-AI with NUCLEO-F401RE over the last week, and it is working with an infrared array sensor for hand gesture recognition.There are a few questions and comments on X-CUBE-AI with TrueSTUDIO:(1) Can X-CUBE-AI add "network_runtime.a" and its library path to "Paths and Symbols" setting on TrueSTUIDIO automatically? (I manually added them).(2) I tested "Application Template" on TrueSTUDIO, and I faced a lot of "undefined reference..." error messages. It seems like a linker problem, but I am not so familiar with it...(3) Is "app_x-cube-ai.c" a right place to add my code for inference? I want to add header files to "app_x-cube-ai.c" , but there is no /* USER CODE BEGIN includes */ comment.(the work on my github account) https://github.com/araobp/stm32-mcu/tree/master/NUCLEO-F401RE/AI
Posted on June 01, 2018 at 19:01Hello, when is the CubeMx.AI going to be released ? are there any online course coming up for neural networks with stm32 ?Thanks in advance.#cubemx.ai
Hi. See some articles and documents discussing the STM32CubeMX.AI tool. Any ETA on this tool chain? We are reviewing some pending designs that could potentially use this as a solution. Thanks.
Posted on March 10, 2018 at 20:25Hi.I watched CES 2018 Demo on youtube https://youtu.be/pLGeGYQcUWUI'm very interested in STM32CubeMX.AI.How much ROM/RAM size are needed in library for neulral network?How much CPU clock are needed for Inference in real time processing?Is it possible to use for MCU which don't have FPU?Can I try it?Thanks.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.