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
Hi,I have just opened my new STEVAL-PROTEUS1 evaluation kit for my project. I tried to connect it with the STBLE sensor app, but I realized that it does not appear on the Bluetooth search. Then I tried my STEVAL-STWINKT1B sensor kit, and it connected, so I assume that the issue is not related to the cable. Do you have any solution for this problem? I would appreciate it very much if you could help with this.
I want to call an AI model in the main.c to show the result of the prediction in a serial monitor, but I can't find out what functions in the X-CUBE-AI folder to use and how to use them.
I want to extract accuracy via "Cubeai". I can give multiple inputs and observe the results, but I cannot determine accuracy. What should the "Validation outputs" file look like? What should it contain and how should it be organized?
My use case is about computer vision (yolo model preferably) and how to monitor its inference in order to have an idea of its carbon footprint when running on the chip. I heard that stm32-zoo has a yolo model available, so it is possible to use it on the chip (correct me if I am wrong :D).Would you have any useful tips for such a case regarding the monitoring part? Is there a dedicated software available from ST?Thanks in advance ST Community!
Hello everyone,I'm working on an N classification project using the NanoEdge AI library on an STM32 microcontroller. My databases contain data on diabetes (diabetic or non-diabetic) with 8 different parameters.Objective: I want to integrate the deployed files (.a and .h) of NanoEdge AI into STM32CubeIDE and configure communication with a serial monitor (Serial Monitor). The idea is to capture inputs through the serial monitor, process them in STM32CubeIDE with the NanoEdge AI Studio classification model, and then display the classification results (diabetes or non-diabetes) on the serial monitor.Need Help For:Integration of NanoEdge AI deployed files into STM32CubeIDE.Configuring serial communication to receive user input.Processing input data and calling the NanoEdge AI classification model.Displaying classification results (diabetes or non-diabetes) on the serial monitor.Any assistance, advice, code samples or documentation would be greatly appreciated!Thanks a lot for your help.
I have created my own cnn model and want to run it on STMH753ZI board using X-CUBE-AI. I have executed all the steps to run the inference. The inference is also running but the output is always 0. With my fixed input of sample shape (1,50,12). I cannot understand the problem. I attaching the code script and the terminal output.
hello everyone , i'm a newbie at edge ai in stm32 and i'm using cube ai 9.0 .i want to get information in how to use "MX_X_CUBE_AI_Process() " and "MX_X_CUBE_AI_init()" , i didn't find documentation or something about what the function does , what's to give as input and what/where do i get the output. i'm prediction an image and the output is 2 classes.thanks for any information.
I have deployed the example of HAR on the STM32F407 Discovery board. I have followed all the steps in the 'Getting Started with X-CUBE-AI Expansion Package for Artificial Intelligence (AI).' In the end, the validation was completed as shown in the attached figure. Now, I would like to test my model with new inputs and hope to find the output, but I don't know how to do that. I couldn't find any documentation or videos showing how to do this.
I am trying to get the accuracy of the model by validating of desktop. But when I provide npz files for Validation inputs and outputs it gives me an error as shown in the screenshot. When I give only one1 npz file validates successfully but cannot give accuracy because of no output data.
I'm a newbie and trying to create a use case with Cube AI 9.0. I'm having trouble understanding how to use the predefined functions Mx-cube-process(), Mx cube init. Could you explain how i need to use this function in my project or there is another method wich i can use it?
Hello, I am developing a Dog Activity Recognition app with CubeAI on STM32WB55 usign AI Core 9.0.0. So far, I have been following https://wiki.st.com/stm32mcu/wiki/AI:How_to_perform_motion_sensing_on_STM32L4_IoTnode . I am using the same sensor and ODR, same AI input size, same Model structure, but my own dataset from Google Colab. Model Structure: Accuracy in Google Colab: 94 %. After getting almost always the same "wrong" result in STMCubeIDE, I did the following: I performed validation on target in STMCubeIDE (the accuracy is similar to Google Colab, which is good:(acc=95.13%, rmse=0.145657539, mae=0.044287317, l2r=0.261498094, nse=0.905, cos=0.968 I tested a couple of inputs manually to compare with result in Colab and this is where the problem seems to be (Test1 is OK), the results do not match quite a lot: How this can be? The model in Colab is the same as STMCubeIDE. Side question: does AI Core transform Conv1D layers into Conv2D, as seen in the first picure
Hi,I am trying to deploy a network based on LSTM created with pytorch. The model is analysed correctly but validation on Desktop gives the following error: LOAD ERROR: exception: access violation reading 0x0000000000000004 In the MCU a hardfault raises at inference.I noticed that the error happens because I am accessing the 'hidden_state' of the first LSTM layer to feed it to the second one.Any ideas about why is this happening?This is a simple version of the model that reproduces the problem: import torch from torch import nn class LSTMModel(nn.Module): def __init__(self, input_size, hidden_size, output_size): super(LSTMModel, self).__init__() self.lstm1 = nn.LSTM(input_size, hidden_size, batch_first=True) self.lstm2 = nn.LSTM(hidden_size, hidden_size, batch_first=True) self.linear = nn.Linear(hidden_size, output_size) def forward(self, x): out, (hidden_state, _) = self.lstm1(x) out, _ = self.lstm2(hidden_state) out = self.linear(out[:, -1, :]) return out i
Does anyone knows how to open the .ioc file of Image classification example from Model Zoo? Where is the location of this ioc file as I couldn't found it and is there anyway for me to obtain the ioc file? Thanks
Hello, I tried to convert my model using STM32Cube.AI Developer Cloud and on my pc STM32Cube AI at CubeMx. However, I got following error from stm32ai. Then I debug model with netron and realize that sizes are not matching with stm32ai library. How can i solve that issue? The layer image is And output from STM32Cube.AI Developer:>>> stm32ai analyze --model nanodet.onnx --allocate-inputs --allocate-outputs --compression none --optimization balanced --series stm32f4 --target stm32f4 --name network --workspace workspace --output outputNeural Network Tools for STM32 family v1.7.0 (stm.ai v8.1.0-19520)INTERNAL ERROR: Inconsistent in/out tensor shapes in _head_Reshape_output_0_to_chlast_output: ['H: 32', 'W: 52', 'CH: 52'] and ['H: 33', 'CH: 2622'].
Hello,I am developing an AI classification model based on LSM6DSOX sensor data. Before adding the X-CUBE-AI software pack to Cube IDE, I was firstly developing the data acquisition code with the driver from X-CUBE-MEMS1, which I managed to do. After adding the Cube AI software pack, I uploaded my .h5 file, analyzed and validated the model (both on desktop & target) and I didn't get any errors, so everything was fine. However, after the generated code was integrated into the project, I started to get several build errors. I didn't change anything in my main.c or in any generated file, so I don't understand why this is happening. For further information, my MCU is a STM32U585CIU6, and I attached a .txt file with the errors I had.Could anyone help me, please? Thank you!
I uploaded my ONNX model, and using the AI developer cloud, I downloaded the result as STM32CubeIDE Project. I successfully deployed it on the NUCLEO-F401RE board and I can see the analysis of the model on the terminal using Putty. Now, as the next step, I want to send a webcam image continuously from the laptop via the serial port to the board and read the output of the network. I use Python to preprocess the image and send it. My question is where should I modify the generated code to achieve my goal? Is there a template for this? I am using STM32CubeIDE 1.12.
"I'm facing a challenge with implementing a model on my STM32 board. While the model works flawlessly on some boards, it encounters issues on others. I've verified the hardware compatibility, software configuration, and resource constraints across all boards, but the problem persists. It seems that the model's behavior varies depending on the board, and I'm struggling to identify the root cause. Any insights or suggestions from the community would be greatly appreciated. Thank you!"
good morning, I'm trying to import a neural network for NILM (non-intrusive load monitoring) in the stm32 environment, but I can't complete the analysis due to the presence of the error: INTERNAL ERROR: unpack_from requires a buffer of at least 122836864 bytes for unpacking 4 bytes at offset 122836860 (actual buffer size is 1654784) The network is CNN type and I'm working with xcube ai v. 9.0.0 and stm32cubeide 1.15.1I'm asking anyone if they know how I can solve the problem of the buffer size.Belolw I share the link for the TFlite model (seq2point_CNN_converted_model.tflite), thanks in advantace.https://drive.google.com/file/d/1FhDdYCNd0y86SptZ5FHCSjpUQdkdxXZ9/view?usp=drive_link
Hello,I am currently working on a project to recognize and classify pet dogs using the H747I-DISCO board. So far, I have successfully deployed both an object detection model and an image classification model on the board using the resources from the stm32aimodelzoo on GitHub, and they are working well individually. However, to improve the accuracy of the model, I would like to combine the two models.The specific method I am considering involves first using the object detection model to process the detected image information. Then, based on the output of the object detection model, I will crop and resize the image. Finally, the processed image will be handled by the image classification model.I have the IDE files for both models, and they both run correctly. However, I am unsure how to merge them. Should I simply copy some files from the object detection model to the image classification model? Do I need to adjust any additional parameters, such as the addresses where the model weights
helloim trying to deploy an AI model in the stm32f407 board that predict if its gonna rain or not based on the current temperature and humidity(either from a sensor or data given through teh serial monitor) (led on if its gonna rain and vice versa) with stm32 cube AI . i followed your tutorial(getting started with cube AI) i installed it ,created a little model and downloaded it as an .h5 file . i followed every other step in the video from project configuration to validate on target . generated the code and everything . now the problem i dont know how to use the model implimented to manipulate the leds through the model results. is there some includes i need to add to the generated code. or some functions i need to call . i didnt know how to give the model inputs and show his outputs. i coudn't know even in which file the model was implimenetd . it seems for me that this part is still a little bit unclear "how to exploit and manipulate the model". so is there ani gui
I am trying to run an ONNX model trained using Scikit Learn on the STM32H735G-DK board. I am using STM32 cube IDE with X-CUBE-AI 9.0.0 enabled. I entered the model path, clicked the 'Analyze' button, and got an error
helloI have a question related to the title.The input data is as follows, // 13 x 15 int new_data[195] = { /* fill with your sensor data */ 440, 501, 743, 479, 546, 658, 596, 523, 493, 684, 855, 3, 2, 536, 605, 743, 576, 664, 791, 728, 523, 591, 799, 993, 4, 2, 536, 605, 743, 576, 664, 791, 728, 523, 591, 799, 993, 4, 2, 659, 735, 924, 707, 664, 965, 728, 651, 722, 961, 1184, 4, 2, 659, 735, 924, 707, 827, 965, 901, 651, 722, 961, 1184, 4, 2, 826, 735, 1168, 887, 827, 965, 901, 827, 901, 961, 1446, 4, 2, 826, 920, 1168, 887, 1059, 1198, 1128, 827, 901, 1192, 1446, 5, 2, 826, 920, 1480, 887, 1059, 1198, 1128, 1084, 901, 1192, 1736, 5, 2, 1067, 1174, 1480, 1130, 1395, 1507, 1407, 1084, 1151, 1519, 1736, 4, 2, 1067, 1174, 1480, 1130, 1395, 1507, 1407, 1084, 1151, 1519, 1736, 4, 2, 1413, 1510, 1765, 1443, 1395, 1790, 1663, 1437, 1480, 1778, 1950, 4, 2, 1413, 1510, 1765, 1443, 1686, 1790, 1663, 1437, 1480, 1778, 1950, 4, 2, 1711, 1510, 1996, 1730, 1686, 2009, 1663, 1714, 1746, 1778, 2
I am testing DL model on different MCU platform. Is it possible to get the power consumption information?And is there any option to change the clock frequency of MCU? Ritesh
I am trying to make a voice controller light with the help of STM32F411RE. I have trained a model with the help of google colab and imported it in both the format that is .h5 and .tflite but initially it was showing that the space is full and then after the compression of model this issue was resolved. The issue that I m facing now is that nothing is printing on the console and without the usage of CubeAI my code is running smoothly but if i try to deploy my model on it then nothing is showing so what to do? I have attached the code below please refer to it
Hello, I am trying to build a simple AI app on my stm32f7 discovery board.In VSCode when I try to build my cmake project (simple hello world DNN) generated with STM32CubeMX and TFlite Micro runtime (application template), I get a lot of linker errors: [build] C:/ST/STM32CubeCLT_1.15.1/GNU-tools-for-STM32/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: CMakeFiles/ai_app2_tfruntime.dir/X-CUBE-AI/App/app_x-cube-ai.c.obj: in function `ai_boostrap':[build] C:/projects/ml/st_trials/ai_app2_tfruntime/X-CUBE-AI/App/app_x-cube-ai.c:77: undefined reference to `tflm_c_create'[build] C:/ST/STM32CubeCLT_1.15.1/GNU-tools-for-STM32/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/projects/ml/st_trials/ai_app2_tfruntime/X-CUBE-AI/App/app_x-cube-ai.c:87: undefined reference to `tflm_c_operators_size'[build] C:/ST/STM32CubeCLT_1.15.1/GNU-tools-for-STM32/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/projects/ml
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.