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
Hello, everyone. I had a problem with version 7.1.0 of X-CUBE-AI. When I load the TFlite model of the neural network and generate the code I have problems initializing the input and output buffers. In particular I have a problem with this assignment: ai_buffer ai_input[AI_NETWORK_IN_NUM] = AI_NETWORK_IN;The compiler gives me a problem with the AI_NETWORK_IN macro, which is listed as deprecated and returns ai_buffer*. Has anyone else encountered the same problem? How can it be solved?In version 5.20.0, I had no problems with initialisation and already evaluated many different examples.Thank you,Davide
The information I find on the community and wiki* refers to old versions of X-Cube and files that have been generated in my case do not appear in the examples, so I have not been able to create the network and run it to obtain predictions. Where can I find an updated example to guide me?Ide: 1.8.0X-Cube-AI: 7.1.0*https://wiki.st.com/stm32mcu/wiki/AI:How_to_perform_motion_sensing_on_STM32L4_IoTnode#Create_an_STM32Cube-AI_application_using_X-CUBE-AI
I want to try and get more information about x-cube-ai. I have prepared the neural network and I want to run it on STM Nucleo board (nucleo L476RG) but unfortunately I have an error during building the project in STMCubeIDE.I got this error:Could someone can explain me what is wrong with that?I have attached the project files and neural network file.
It seams that I have some troubles using a NanoEdgeAI library on an STEVAL-STWINKT1A. I got BOARD ERROR for all the NanoEdgeAI functions. Any idea? Thank you
https://www.st.com/content/st_com/en/campaigns/nanoedgeaistudio.html Part4 - Development Boards: Which development boards are supported by NanoEdge AI? > For the Trial version: all STM32 demo boards listed in the Studio (not the generic ones) (see doc) For the Paid version: all STM32 dev boards What was the hardware used in the webinar? > STEVAL STWINKT1B : https://www.st.com/en/evaluation-tools/steval-stwinkt1b.html 3 speed USB fan (https://www.amazon.fr/RATEL-Ventilateur-ventilateur-Utiliser-personnel/dp/B07R5HKSYL/) Does It work also with stm32f429I discovery? > Works with any STM32 dev board listed in the studio May NanoEdge AI be used on a STM32L4 board? E.g., the B-L475E-IOT01A kit? > Works with any STM32 dev board listed in the studio Sensors: What sensor do work with NanoEdge AI? > Any sensor, but bear in mind that MCUs are resource-constrained by nature. So HD image recognitio
https://www.st.com/content/st_com/en/campaigns/nanoedgeaistudio.html Part2 - NanoEdge AI Studio: Hi, can the model be saved locally to allow power failure on the sensing device and restart with known model? > Dynamic model knowledge (Anomaly Detection) is allocated in RAM and it is possible to backup the model in the non-volatile memory as: EEPROM, Flash, etc. Please see: https://wiki.st.com/stm32mcu/wiki/AI:NanoEdge_AI_Library_for_anomaly_detection_(AD)#Backing_up_and_restoring_the_library_knowledge Does the library support fixed point arithmetic for speeding up processing? > We don't support it yet, but R&D is working on it. Could NanoEdge AI studio be used if we are not able to generate "abnormal" signals? > Yes, it is possible, please see https://wiki.st.com/stm32mcu/wiki/AI:NanoEdge_AI_Library_for_1-class_classification_(1CC) How long will the selection take in a real application, for example a pump? > In practice it var
https://www.st.com/content/st_com/en/campaigns/nanoedgeaistudio.html Part3 - NanoEdge AI Studio: Can NanoEdge AI undertake dynamic learning? for example swerve detection in a vehicle travelling over a random selection of road surfaces and weather? > Yes, it is possible for Anomaly Detection use case, please see: https://wiki.st.com/stm32mcu/wiki/AI:NanoEdge_AI_Emulator_for_anomaly_detection_(AD) Are your models all proprietary? > Part of the models are proprietary and developed by ST R&D. Is there any practical difference between an Anomaly detector and a binary classifier? (1 input with GOOD and BAD values) > Anomaly Detection model output it is the similarity [%] and adding threshold (boundary) e.g., 90%, it is possible to implement binary classifier. How can you reset the model once it has accumulated knowledge? > It is possible to call relevant “neai_anomalydetection_init�? function, please see: https://wiki.st.com/
About the function "validate on target", I don't understand what X-cross is.And when I clicked this button , I saw the X-cross accuracy is n.a., I don't know what this means and how to solve. Can you give me some suggestions?
I tried to compress a keras model. It is a versy simple Neural network model with just fully connected (dense) layers. I converted it to tflite and compressed the weight to tf.float16 which was originally tf.float32. When I upload the model, it gave me error Neural Network Tools for STM32AI v1.6.0 (STM.ai v7.1.0-RC3) INTERNAL ERROR: 'FLOAT16'Is it that STM doesnot support float16 formats ?More Info: Its a tflite model and I used STM32Cube.AI.runtime
https://www.st.com/content/st_com/en/campaigns/nanoedgeaistudio.html Part5 - NanoEdge AI licensing: Is NanoEdge AI Studio free? or do I need a license? > The full version of the Nanoedge AI Studio is not free and there is also a trial version of up to 6 months for limited supported Boards. https://www.st.com/content/st_com/en/campaigns/nanoedgeaistudio.html What kind of limitation has "NanoEdge AI Studio Free software evaluation" respect to the commercial version? > The Trial version of NanoEdge AI Studio allows you to generate a library only for the STM32 Demo Boards for development purposes only. Are there any runtime licenses or royalties? >Yes, a runtime licenses and royalties. Can I buy a 1-year license and still use the FW developed with the completed library after the license has expired? > Yes, you can still use the FW developed with the completed library after the license expired but you will still have the royaltie
https://www.st.com/content/st_com/en/campaigns/nanoedgeaistudio.html Part1 - NanoEdge AI Studio: What input formats does NanoEdge AI support for data sets for the classification use case? > NEAI Studio supports: File (.txt / .csv), Serial Port (USB VCP) of datalogger, SD card of datalogger (.dat) Please see: https://wiki.st.com/stm32mcu/wiki/AI:NanoEdge_AI_Studio#Signals What if NanoEdge AI Studio cannot find an adequate algorithm? Is there a process for adding new algorithms? > No, for the user it is impossible It is covered by ST R&D What is the average RAM/flash size for an algorithm? > It is Highly depending on use case, size of input data, type of model selected, and so on. It is in the range of several KB of RAM/Flash usually, please see: https://wiki.st.com/stm32mcu/wiki/AI:NanoEdge_AI_examples How does the algorithm determine what is nominal and what is abnormal in the field? > U
hello,i have a keras model generated on google colab, i have test on google colab and it works fine, i wanted to export it on cubemx and when i start teh validation on desktop process i'am having an accurancy that is n.a here is the output of my cubemx c_id m_id desc output ms % -------------------------------------------------------------------------- 0 0 Dense (0x104) (1,1,1,1)/float32/4B 0.004 10.6% 1 1 Dense (0x104) (1,1,1,30)/float32/120B &
..
Using X-CUBE-AI 6.0.0, trying to import a tflite model of a RNN network, with both dense and LSTM layers, this error is returned. I can't find any information on that. Is there something that can be done?Thank you very much
As the title states is the Tensorflow 2.7 support by X-Cube-AI?If not when is it going to and is there a workaround for implementing the 2.7's functionalities on previous versions?
Dear support-team,I've encountered quite some problems when loading a pre-trained Pytorch mobilenetv2 model in Xcube-AI. I have tried the following with the app stm32ai located in the installation repository of X-Cube-AI/7.0.0. torch fp32 --> onnx_fp32 --> onnx_int8 (external)torch fp32 --> onnx fp32 --> keras (h5) fp32converted keras (h5) fp32 --> tflite_fp32I found that:quantized onnx model cannot be ported and analyzed directly in Xcube-AI. The quantization tool is only aimed at keras model. Does it mean that we cannot use quantized int8 ONNX model on STM32 platform? since only channel-last (NHWC) model is supported in STM32 MCU, the torch model has to be converted from NCHW to NHWC. But the Transposition operator does not seem to supported in Xcube-AI. If that is case, how would you recommend to port pytorch to STM32 platform? Should we use directly the torch JIT format? Is torchscript model supported on STM32 platform?Looking forward to your answer,Best regards,Zhen
I've followed the example on Embedded Inference Client API. However when I run the model I get the error code 23 and type 19 which is the AI_ERROR_CODE_INVALID_FORMAT.I've checked the type with the following code and both the input and output return 1 for float_stat, this shows that it is a float type /* Extract format of the first input tensor (index 0) */ volatile const ai_buffer *ai_input_1 = &ai_input[0]; /* Extract format of the tensor */ fmt_1 = AI_BUFFER_FORMAT(ai_input_1); //Extract the float value 1 = float type float_stat = AI_BUFFER_FMT_GET_FLOAT(fmt_1);I've included my code to see if there is something obvious. I have used the API reference that is accessed through CubeIDE but I have found no help. I'm unsure of any other documentation that may help either or examples. I've removed the default code to make it easier to read.An Onnx model was used which is a sklearn model that has been converted. I was able to upload, analyse, graph and vali
I've been working with the Cube AI package recently and I think it is amazing and has got soo much potential. I find for most ML it is done on a computer or cloud but STM has given us another approach that I think will work very well. My issue with Cube AI is that all videos online are >1 year old and use older versions. As well non-show how to use Onnx format ML models as examples just use TensorFlow lite. As well I've really struggled to find good documentation and examples for Cube AI, and the examples in the repository are OK but don't work and I feel like need more explanation.Will there be more videos, documents coming in the future?Are there any documents, websites or videos I should watch to help me as I may have missed them?Thanks to anyone who directs me in the right direction :)
Hi,When I try to load the Validation Template from de .ioc inside the IDE or from CubeMX the software gets stuck.A small window which says "Please wait, configuring [...]" appears and dissapears. After some minutes, an out of memory error occurs.The Core loads without problems and network analysis and validation on desktop or target also work fine.I'm using STM32CubeIDE 1.7 and X-CUBE-AI 7.1.0.Project is for STM32479I-EVAL board.
Hi,I am using Stm32cubeide for creating a tinyml project for sinewave-tensorflow example. For this I used xubeAI software manager and loaded my tflite file with stm32Ai runtime.In the main file I am facing issue when I run the following initialisationai_buffer ai_input[AI_NETWORK_IN_NUM] = AI_NETWORK_IN; while building the project I get error saying invalid identifier.
I am using the STM32L476RG with its respective NUCLEO board. I want to experiment with object detection and edge ML on this device so I am using STMCube AI package. I want to use the efficientdet/lite0/detection quantization-trained model but when I import this into STM32CubeMX and attempt to analyze with the TF Micro Runtime, I get this error message:[AI:efficientdet] input->type == kTfLiteFloat32 || input->type == kTfLiteInt16 || input->type == kTfLiteInt8 was not true. [AI:efficientdet] Node QUANTIZE (number 0f) failed to prepare with status 1 [AI:efficientdet] Analyze fail on the AI modelAdditionally, when analyzing with the STM32Cube AI runtime, I get this error:INTERNAL ERROR: 'TFLite_Detection_PostProcess'The beginning quantize node transforms 2D image of uint8 into an int8 type. It says in the documentation of my version of Cube AI (7.0.0) that it supports TFLite quantization operations with input type of float32, int8, and uint8. Why
Hi,I've made a custom board where I followed the schematics of the STM32H747I-DISCO board. Instead of the stm32h747 I use the stm32h743 microcontroller, because of the availability. I'm working on the 'FoodReco' project and modified it to my needs (changed the pinouts for the SDRAM/DCMI etc). When I cover the camera with my finger, the camera frame buffer on my custom PCB looks really similar as the camera frame buffer on the disco board:For the DISCO board:I believe the camera frame buffer is used to perform the image classification model on. The output however, is not the same at all. When it is pitch black it should output 'floor', when it isn't pitchblack it should output 'ceil'. The DISCO board, as expected, outputs 'floor 100%'. My PCB however reports a random value 'ceil 96 %'..I haven't changed the functions APP_FramePreprocess, APP_NetworkInference and APP_Postprocess. How is it possible that the result of the model is not the same? Am I misconfiguring something?Thanks in adva
Hi, I have installed STM32 cube IDE and the latest version of CUBE AI software pack to convert a pretrained neural nework implemented and trained with Keras/TF. After creating a project, when I try to add a network from a saved model.h5 from the file system, when I try to analyze it I have the following error:Analyzing model C:/Users/<username>/STM32Cube/Repository/Packs/STMicroelectronics/X-CUBE-AI/6.0.0/Utilities/windows/stm32ai analyze --name network -m C:/Users/<username>/facedetection/pnet.h5 --type keras --compression 1 --verbosity 1 --workspace C:\Users\<username>\AppData\Local\Temp\mxAI_workspace85208706500011701743944848630527 --output C:\Users\<username>\.stm32cubemx [456] Failed to execute script stm32ai Traceback (most recent call last): File "tensorflow\python\pywrap_tensorflow.py",&n
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.