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
..
Dear STM community,I am trying to deploy a simple tflite model on my STM32, but I can't get through the analyze step. I got the following error:TOOL ERROR: Unknown layer type SHAPE, stopping.If I convert the model to Keras (model and topology), it works fine, I can run the generated code, but I want to use tflite model.I attached the keras and the tflite files.Thanks,Titusz
Hello dear Engineers,I have a system with 3 inputs and 3 outputs. The system outputs are completely coupled with its input, but the system is supposed to be LTI. This leads me to a simple feed-forward neural network since modeling and controlling from input to output using ARMAX, ARX, STR (Self-tuning Regulator) or other methods are really hard. Now I have stocked in the implementation of a simple feed-forward AI. Is there any handy library available, or should I implement them in simple matrixes?Is there any easy to implement decoupling method available that would be model-free? The processor I have selected is STM32f407vgt6, (The STM32f4 discovery board)Any help would be appreciated.
Hello, I have a STM32F746G-DISCO which has a microcontroller with 1 Mbytes of Flash memory and 340 Kbytes of RAM. However, I would need more space for my bigger Keras models. I have seen examples of code in the new function pack FP-AI-VISION1 which is providing a Computer Vision AI example of food classification. It is also providing different memory configurations : use of internal Flash vs external Flash, internal RAM vs external SDRAM. However, since i am a beginner, it's difficult to write code from scratch and access and use external memory, and all these processes are not well understood.Are there any easier examples or tutorials for loading the pre-trained model to external memory? Best regards,
I'm using a Nucleo-144 and have not been able to get X-CUBE-AI working in TrustZone. I'm using STM32CubeIDE and trying to add X-CUBE-AI with the software component manager (with the integrated STM32CubeMX).Interestingly, before a recent update (so STM32CubeIDE 1.5.1, STM32L5 package version 1.3.1, and I think STM32CubeMX 6.1.1), adding X-CUBE-AI wasn't even an option in the component manager with TrustZone applications, I just tried to manually add the code but it would hang once it entered the X-CUBE-AI library (NetworkRuntime520_CM33_GCC.a). After an update (STM32Cube IDE 1.6.0, STM32L5 package version 1.4.0, and STM32CubeMX 6.2.0) it's an option in the component manager but STM32CubeMX fails to generate the code (FreeMarker template error).Anyways, I'm just wondering if there are any known reasons why X-CUBE-AI should or shouldn't work in a TrustZone application. It's hard to tell if the component "support" in the latest version was on accident or if there's just a bug in the code g
I loaded my mobilenetv3 model in STM32CubeAI but when I tried to choose the compression ratio of 4 and 8 to reduce size, the RAM and FLASH requirements are still the same.Also, I optimized my model in tensorflow lite which results in ~2MB, but when I load it into STM32CubeAI, it still reads the original size which is 6MB?Please help.
Hello,I'm interested on the FP-AI-VISION1 sample but it runs on a STM32H747I-DISCO. I personnally have the STM32F746G-DISCO. Is it possible to build the application for it ? Is there some documentation explaining how to build for another board ?Moreover, I've got a OSD32MP1-RED (https://octavosystems.com/octavo_products/osd32mp1-red). Is it possible to run for example X-LINUX-AI on it ? Another question for my comprehension : here, it's written that All BSP components provided by STM32Cube MCU Package are not compatible with MPU environment as they are managed by Linux OS on main processor Cortex ADoes it mean that I don't have the BSP driver for the camera for example ? Can't I take the camera source's code from STM32CubeF7 and add to MPU environment ? How are tasks splitted between the Cortex-A and Cortex-M in this sample ?Best regards
I trained a model which includes my custom layer, but I met a error that says "unknown layer" when analysizing th model. Thansk a lot.
I've been watching the project creation of an AI application in STM32Cube.AI. What I am looking for is a tutorial on how to use the X-CubeAIto run inference on data that are feed to the GPIO pins of STM32 MCU's. So far, I did not see STM giving tutorial on how to do this. Especially on how to use the function generated by X-CubeAI. Can someone give an example on how to do this?
Hi,I am working for a ‘Digit detection’ project using STM32CubeIDE 1.5.1 (X-CUBE-AI.5.20) and STM32H743. I have created Keras Model with 28x28 pixel size grey scale image for training. Every thing work as expected with CubeIDE. I am looking a right solution to identify the detected digit position or bounding box coordinates. Any sample available for the same ? Any body tried the same with X-Cube-AI ? Thanks in advance..
Hi,I would like to ask whether it is possible to put multiple models into an MCU using x-cube ai. The first model would generate one output which will be one of the inputs for another model with 13 inputs and 3 outputs.If you could provide steps as to how to achieve this, it would also be very helpful.Kind regards,Jona
Hi All,I am developing product using LSM6DSOX and plan to use MCL for classification. Current process of development is following: 1 gathering raw data2 generating ARFF file with features using Unico GUI3 generating decision trees using our py code4 generate MLC configuration using Unico GUII want to void Unico GUI on second step. Do you have python or any other language libraries to generate ARFF file with features?As for 4th step, as I understood MLC configuration can be done only in Unico GUI. Is it possible to run it in shell mode? The reason that I want to make precess seamless and as less as possible related to user-driven actions.
Join our one-hour webinar with live Q&A on the IIS2ICLX (2021 CES Innovation Awards Honoree) inclinometer for angle measurement in Industry 4.0 and Smart City scenarios ranging from robotics to solar panel pointing applications, and even mention Structural Health Monitoring.We will also take you through Machine Learning and how you can implement advanced AI to monitor and interpret angle displacements and vibration patterns.You will learn:• The theory and formulas behind angular measurement• How the inclinometer works and which parameters affect accuracy• Why you should use our development tools• How to set up the internal Machine Learning CoreRegister now
I'm trying to deploy an object detection system on the STM32H743ZI2 board using CubeIDE and X-CUBE AI. For my evaluation process, I want to load images (stored as flattened text file arrays) from a USB flash drive.To be clear, the USB appears to be set up properly as I can read/write and mount/unmount the USB flash drive without any issues. However, if I mount the USB, it causes the following line of code to hard fault:nbatch = ai_sine_model_run(sine_model, &ai_input[0], &ai_output[0]); I've reproduced the rest of the main() code below:int main(void) { /* USER CODE BEGIN 1 */ char buf[50]; int buf_len = 0; ai_error ai_err; ai_i32 nbatch; uint32_t timestamp; float y_val; // Chunk of memory used to hold intermediate values for neural network AI_ALIGNED(4) ai_u8 activations[AI_SINE_MODEL_DATA_ACTIVATIONS_SIZE]; // Buffers used to store input and output tensors AI_ALIGNED(4) ai_i8 in_data[AI_SINE_MODEL_IN_1_SIZE_BYTES]; AI_ALIGNED(4) ai_i8 out_data[AI
Hello,We are running a tflite model (generated from tf.Keras) following the example here : https://www.digikey.in/en/maker/projects/tinyml-getting-started-with-stm32-x-cube-ai/f94e1c8bfc1e4b6291d0f672d780d2c0While running "Validate on Desktop", we are getting the above mentioned TOOL ERROR. The generated report has been attached. Thanks in advance.
Is there any example of a CNN used in CubeIDE? Let me explain better, among the various video tutorials on the ST website and on youtube the demonstrations end with the loading of the neural network and their validation through the functions made available by the IDE.I need to understand how to manage the network call then inside main.c. On the web I found only one example of how a mono-input and mono-output neural network can be applied, but everything becomes more complicated now that I have to implement a CNN that has a two-dimensional array (spectrogram) at the input.Can anyone point me to an example or tutorial to follow?
Condition monitoring is a major component of the predictive maintenance systems, allowing production performance improvement, maintenance cost reduction and a drastic decrease of the downtime due to routine maintenance, especially in an Industry 4.0 framework.Since few weeks, a new firmware package developed by ST and Cartesiam is available: the FP-AI-NANOEDG1. It helps to jump-start the implementation and development of condition monitoring applications designed with the NanoEdgeAI Studio solution from Cartesiam: this tool simplifies the creation of autonomous Machine Learning libraries with the possibility of running not just inference but also training on the edge. It facilitates the integration of predictive maintenance capabilities as well as the security and detection with sensor patterns self-learning and self-understanding, exempting users from advanced skills in mathematics, Machine Learning, data science, or creation and training of Neural Network.Have a look at the Cartesiam
In the project, the input data of keras model is a 2-d vector consisted of float x1 and float x2. But in the cubemx.ai generated application template code, the data type is ai_u8 as follows: ai_u8 *in_data = NULL; ai_u8 *out_data = NULL;Then ,I modified it as follows : ai_float *in_data = NULL; ai_float *out_data = NULL; in_data[0]=0.1; in_data[1]=-0.1;But it will got errors as follows while ai_run(in_data, out_data) executed.TEMPLATE -Error (ai_network_run) -type=0x12 code=0x17Then How to set input data in application template, and where can I got the codes details of the error, I look forward to your reply.Thanks a lot!
Hi everybody,I'm currently working with STM32CubeMX on manjaro linux. I downloaded the X-CUBE-AI Artificial Intelligence v5.2.0 package directly from the Embedded Software Packages Manager. I'm primarily interested in the stm32ai command-line interface, problem is, it just isn't there. According to the documentation in command_line_interface.html, the stm32ai application should be found in X-CUBE-AI/5.2.0/Utilities/linux. However, the Utilities/ folder is missing. I tried installing older versions of X-CUBE-AI (5.1.2 and 5.0.0) and I also tried downloading the extension from the website instead of STM32CubeMX: nothing!Any hint will be appreciated.Michele
--- This article may help you during future lockdown ---1 - IntroductionThe Yoga Pose recognition algorithm described here is intended for wearable devices, since all the data logs have been acquired with the device placed on the left leg, with the orientation described in section 2. Fourteen different classes are recognized, as described in the comment to this post.The Machine Learning Core (MLC) is configured to run at 104 Hz, features are extracted using windows of 52 samples, therefore the Decision Tree classifier output is updated two times per second (104 Hz / 52 = 2 Hz).Only accelerometer data is used. The full-scale is set to 2 g. Three different features are computed:Mean on accelerometer X axisMean on accelerometer Y axisMean on accelerometer Z axis2 - Device orientationThe SensorTile.Box is placed on the left leg (see picture below). Other devices can be used as well, provided that the orientation of sensor axes is correct.X axis parallel to the leg, poin
Hi everyone. I'm writing a machine learning application for a master degree thesis. I would like to work with C++ but, for some reason, when the Cube.AI software pack is included in the project, the compiler doesn't recognize C++ keyword, such as "class". Does anyone know why this happen ?
I am developing an autonomously navigating robot that uses IMU for Localization and Mapping... a typical ML/Self-driving car application. I was looking for IMUs having accelerometer with +-2g sensitivity. The [INEMO-M1](http://www.digikey.in/product-detail/en/stmicroelectronics/INEMO-M1/497-14191-ND/4542053?_ga=2.141927986.1620169342.1599042795-1084286621.1599042795) was great as its packaging was easy to interface with our processing unit: the NViDIA Jetson Xavier AGX. But it seems that it is obsolete now. I would like alternatives to it. On looking at inertial modules like ISM330DHCX, that come with MLC, I am doubtful the packaging can be a trouble for my strict timeline. Can a get a simpler packaging for it, that has pins ?Also, even if that is too much to ask, what are good alternatives for my application (that finally uses an extended Kalman Filter for sensor fusion)
I wanted to classify gas sensors data which is acquired through industrial sensors using Machine learning algorithm on STM board. Any idea which variant of STM32" will work best for this application?
Hi, when I was validating an ONNX model on target (STM32F769I-DISCO), I got the following error:-- Running STM32 C-model - done (elapsed time 5.952s) -- Running original model TOOL ERROR: cannot import name 'get_all_providers'What does "running original model" mean? How to fix this?My understanding is that the model ran well on STM32. If this is the case, is there any way to skip "running original model" and see my validation results?(The ONNX model passed "analyze" in CubeMX. OS Windows 10, STM32CubeMX 6.1.1.)Any help?
I was following the ST video course on Cube-AI https://www.youtube.com/watch?v=6oTkHylHssQ&list=PLnMKNibPkDnFiQd11pDFtDL2aqUZHTjto&index=5&t=0sIn this video, Can you share this code if you have it please? I have noe idea how to get the dataset using the example code mentioned in the video, 'import tutacousticscenes2016'
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.