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,I am developing a model for human activity recognition on NEAI based on LSM6DSOX module. I managed to deploy a vanilla version using gyroscope data only, and now I'm creating a new project to deal with 6 axis (3 from gyroscope + 3 from accelerometer). However, I am not managing to add the signals to my project, because the import signal functionality identifies a problem in my data acquisition. My input sequence via Serial is in the following shape:acc_x acc_y acc_z rot_x rot_y rot_z, all of them separated by space.NEAI says there's a problem with the data basically in every row, starting from the column 7 (where I start to collect this sequence of 6-axis for a second time). I am not experienced with NEAI, and probably this might be related to the way I'm sending the data, but I can't find the solution.In my vanilla version, my print was in the shape "rot_x rot_y rot_z" and it worked fine. I'm using a buffer of size 64 (per axis).How should I format the data in the serial exactly
I have a TFLite that I can successfully analyze (targeting NUCLEO-L4R5ZI-P board) with X-CUBE-AI. I then quantize the TFLite model using the "full integer quantization" method from the docs. However, when I analyze this quantized model, I'm met with "TOOL ERROR: cannot reshape array". I validate using random numbers. I don't understand the problem as the quantized version runs absolutely fine on my laptop (with the exact same input + dataloader as the un-quantized version).I'd be really grateful for any help with this - thanks!
Hii! I'm trying to implement a tensorflow ML model in NUCLEOF401RE Board using XCube.AI and stm32CubeMX. when i download the XCube.AI package and try to add the zipper file in CubeMX im facing an error that "file cannot be deflated". how to solve this error. The zipper file is installed in proper location ""C:\Users\Lakshana\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\8.1.0\stm32ai-windows-8.1.0.zip" please help me resolve this error
I have a LSTM model which was quantized using TensorFlow dynamic, full and float16 quantization. After that, I wanted to benchmark these three quantized models on the STM32AI model zoo. But after importing these models into the web UI and pressing "Start", I get the following error message: >>> stm32ai analyze --model dummy_model_0_stateful_int.tflite --allocate-inputs --allocate-outputs --compression none --optimization balanced --series stm32f4 --target stm32f4 --name network --workspace workspace --output output Neural Network Tools for STM32 family v1.7.0 (stm.ai v8.1.0-19520) NOT IMPLEMENTED: Unsupported layer types: READ_VARIABLE, VAR_HANDLE, ASSIGN_VARIABLE, CALL_ONCE, WHILE, stopping. I would be really grateful for ideas or insides on the problem :)
Hello everyone,I'm currently facing an issue while working with the LSM6DSOX accelerometer.In my setup, the LSM6DSOX accelerometer is not consistently triggering an interrupt on INT1 when the specified threshold is exceeded. Code, connections, and power supply: everything appears to be in order. I am trying to implement a wake-up feature similar to the example in AN5273 but with a different threshold (1.0g +/- 0.1g). The FSM operates at an ODR of 104 Hz, and the accelerometer shares the same ODR with a full-scale range of 4g. I used the Unico tool to generate the .ufc file for configuration, imported it into my code, and also experimented with the UNICLEO tool and an eval-board for DIP24 on a different setup, encountering the same issue.Config:FSM ODR: 104 HzAccelerometer ODR: 104 HzGyro OFFFull-Scale: 4gThreshold: 1.0g +/- 0.1gFSM as per wakeup example in application noteInterrupt routed to INT1Non-latched interruptsFor each data point (checked using the DRDY bit with BDU enabled), I
In the STM32Cube.AI workshop - 6 Neural Network (NN) Model creation - YouTube, tutacousticscenes2016 does not work. librosa returns an error message: ModuleNotFoundError: No module named '_soundfile_data'. Please suggest a workaround.
Hello, I have a question regarding the evaluation parameters for decision tree results. As you can see in the picture below, the Mean Absolute Error and Root Mean Squared Error are high, but the accuracy is also high. I am confused because I thought that low error and high accuracy are supposed to go hand in hand. Can you please clarify this for me? Kindly,Fehmi
I am curious about these parameters,I don`t konw where they are used.These are auto generated by following the official guide, but if I want to build a project with x-cube-ai and CubeMX my own and still use the model from model zoo, how shoul i deal with these two parameters.I dont`t see anything about this in code that auto generated by CubeMX with x-cube-ai.I just know the input of model is int8 as follow,but i see these two parameters in stm32ai-modelzoo official guideI am learning quantization, but still not familiar with it, shoul i do smething in my own project generated by CubeMX?I just give my model input image data [0:255] now and it works,but after reading the modelzoo guide I don`t know if it`s right.Thank you!!!!!
Hi STM Community-Context: X-Nucleo-53L8A1 / Nucleo-L476RG16 zones per line of distance measurements are being captured by NanoEdgeAI in an attempt to generate an anomaly detection AI model. 16 axes correlate to 16 measurement zones. Measurements are in mm. The data seems to be properly formatted; however, when the "Signal" is added, NanoEdgeAI indicates there are not sufficient values for FFT to be performed. MIN, MAX, & MEANS are calculated.Files attached. Pls advise.Thanks in advance,Kelly
Which software is best to do tiny ML and other algorithm for ISPU ?How can we implement our model in to it ?How can we create our model ?
The following is the code generated by X-CUBE-AI of STM32CubeIDE ,but I can't understand it. /** Array declarations section **********************************************/ /* Array#0 */ AI_ARRAY_OBJ_DECLARE( input_1_output_array, AI_ARRAY_FORMAT_FLOAT|AI_FMT_FLAG_IS_IO, NULL, NULL, 4096, AI_STATIC) /** Tensor declarations section *********************************************/ /* Tensor #0 */ AI_TENSOR_OBJ_DECLARE( input_1_output, AI_STATIC, 0, 0x0, AI_SHAPE_INIT(4, 1, 1, 64, 64), AI_STRIDE_INIT(4, 4, 4, 4, 256), 1, &input_1_output_array, NULL) DER
Hi!I have generated an n-Class Classification static library with NanoEdge AI Studio using data from ISM330ISN. I want to use this library in the ISPU template project that comes with X-CUBE-ISPU (X-CUBE-ISPU\1.1.0\Ispu\ism330is_lsm6dso16is\template\ispu). I have pasted the .h files (NanoEdgeAI.h and knowledge.h) and the static library (libneai.a) in the ispu_utils folder and have linked the static library by going to Properties > C/C++ Build > Settings > Tool Settings > GNU STRED Cross C Linker > Libraries and inserting the following information:But after hitting "Apply", "Rebuild Index" and "Apply and Close", when I try to build the project, I get the following errors: 07:30:02 **** Incremental Build of configuration release for project ispu_basic **** make all Building target: ispu_basic.elf Invoking: GNU STRED Cross C Linker reisc-gcc -mcpu=reiscl -mfp32-format=ieee -Os -ffunction-sections -fdata-sections -Wall -Wextra -Wdouble-promotion -fno-strict-al
Hi, im using the FP-SNS-DATALOG1 firmware for measuring sensor data and another custom firmware for other ML tasks. Furthermore, i am implementing a bootloader to switch between both softwares. I want to measure automaticaly and in order to do so i need to trigger the sampling via software (not with pushing the USR button). How can i implement that? I compiled the Project file from your github repository and i would now try to create a new binary (.elf) to use as firmware on my evaluation board. Is there an easier/quicker way?
Hi everyone, I am working on an extrapolation task as part of a research project at the university and I compare the different models, in this case random forest models. I assume that the model complexity of the model is related to the size of the knowledge array. How can it be that the execution speed of the models on the microcontroller does not increase with increasing model size? Are calculations performed in parallel? For example, models with a size of 200 kB can be executed much faster than models with a size of 80 kB. I work with STM32 Nucleo-144 development board with STM32H723ZG MCU.Thanks in advance.
Hi,I am currently working on my Final Year Project, which involves implementing a plant disease detection model on the STM32H747i-Disco board. My project is inspired by an image classification example from the model zoo.Back in October 2023, I successfully deployed the sample model (specifically, the provided flower model) on the STM32H747i-Disco board, using the B-CAMS-OMV camera. However, I have recently encountered an issue where I am unable to replicate this deployment.Although the CMD window indicates that the model is deployed successfully (figure 1), the LCD screen on the board remains blank (figure 2). This issue persists despite the fact that there are no error warnings in the CMD window.I am aware that there have been updates to the LCD screen of the board. My LCD screen is the A03 model, which, to my understanding, should not be affected by these updates. In an effort to troubleshoot, I followed the steps provided in a helpful guide by KDJEM.1. This guidance allowed me
I am using the STEVAL-STWINKT1B evaluation board to gather microphone data with a 192kHz sampling rate. The data is saved in a .dat file which i want to read and process. However, when reading the IMP23ABSU_MIC.dat file i get completely different results. Using a freeware hex editor i opened the .dat file and this is how it looks: As the samples are saved in a 16-bit integer (according to the mic's datasheet), which corresponds to 2 bytes, im expecting to read 0x31FF. This is valid since the HSDatalog software also presents the same value in int16 (e.g. -207). This is what i have tried so far in STM32CubeIDE: DIR dir; FILINFO fno; FATFS uSDFatFs; FIL MyFile; UINT br; FRESULT res; char uSDPath[3] = "/"; static int16_t data_storage[48000] = { }; /* Working with ...\raw_data\192kHz\1bar (for evaluation)\phi_1_l_20*/ if (BSP_SD_Init() == MSD_OK) { if (f_mount(&uSDFatFs, (TCHAR const*) uSDPath, 0) == FR_OK) { res = f_opendir(&dir,
Hello everyone, I have a pytorch model (mymodel.pth) obtained by running the mixed-precision quantization of this algorithm: * https://github.com/eml-eda/q-ppg. I followed the instructions in the readme section.Python models are not natively supported by X-CUBE-AI so I convert mymodel.pth to ONNX.But if I open mymodel.onnx with Netron, I can see that each convolutional layer has 2 inputs (see image) and STM32CubeIDE doesnt' support this. * Reading the paper, I know that the quantized model obtained by Q-PPG has been deployed on STM32WB55. So how can I deploy the model on the embedded platform?I use Windows 10 Home 64 bit (10.0, build 19045), STM32CubeIDE 1.13.1 and X-Cube-AI 8.1.0 (I've also tried 8.0.1).Could anyone please help me?
Hi, I have a self-trained image classification model with two classes with dynamic range quantization(unquantized model is about 1.5mb and it is 500kb after quantization). And this model takes too much flash and ram after benchmarking. Is there any method for reducing the flash and ram consumption? The model I am using is mobilenet, should I use other model for image classification? Or is there any other model for recommendation?Also note that STM32 developer cloud does not support quantization for my self-trained model so that I quantize the model by myself(using dynamic range quantization). Thank you!
Hi, I am trying to create an STM32Cube.AI application using X-Cube-AI. I am following the documentation under Content 6. I trained my own model and configure the .ioc file as shown below. I wanted to get input from the ADC and feed directly into the model to perform classification. I am using the latest X-Cube-AI version 8.1.0. Under my X-Cube-AI folder, this is what I got:I imported my libraries as shown in the documentation. #include "ai_platform.h" #include "emotion_model.h" #include "emotion_model_data.h" Then, I created the functions following the documentation. static void AI_Init(void) { ai_error err; // char buf[50]; // buffer for serial output string // int buf_len = 0; /* Create a local array with the addresses of the activations buffers */ const ai_handle act_addr[] = { activations }; /* Create an instance of the model */ err = ai_emotion_model_create_and_init(&emotion_model, act_addr, NULL); if (err.type != AI_ERROR_NONE) { // buf_
Hi folks,I gently ask you some help related to a computer vision application, based in artificial inteligence, that I have been developed at STM32H747i-DISCO. I am developing my code following the steps presented in a stm tutorial that is available in this link : https://www.youtube.com/watch?v=NDshmSH7WnA . The code that I am using is the same presented in the tutorial and available to download from STM website, in the following link: https://www.st.com/en/embedded-software/fp-ai-vision1.html I followed all the steps of this tutorial and, in the last ones, it is necessary to convert a neural network tensor flow file into a C file. This conversion is made by Cube AI software pack and it has to run in the STM32CubeMX. But, in order to open STM32CubeMX, it is necessary an .ioc file integrated into the project . This app is shown bellow : But, none of the projects available from the STM webiste have have the .ioc file. Particularly, I am usin
Hello, I have implemented https://wiki.st.com/stm32mcu/wiki/AI:How_to_perform_motion_sensing_on_STM32L4_IoTnode this project. When I run the program I had a hard fault error when function enters ai_platform_network_process(). I have incremented the heap and stack sizes. I don't know what else I can do to run properly. As below, after ai_network_run() it enters ai_platform_network_process(). This function is source coded and cannot see the content of this function. If you can help me, I will be very grateful...Regards. static void AI_Run(float *pIn, float *pOut){ai_i32 batch;ai_error err; /* Update IO handlers with the data payload */ai_input[0].data = AI_HANDLE_PTR(pIn);ai_output[0].data = AI_HANDLE_PTR(pOut); batch = ai_network_run(network, ai_input, ai_output);if (batch != 1) {err = ai_network_get_error(network);printf("AI ai_network_run error - type=%d code=%d\r\n", err.type, err.code);Error_Handler();}}
Hi, I am currently using SensorTile.box Pro with FP-SNS-DATALOG2 FW. After acquisition, I would need to convert the data from the microphone from .dat to .wav and to do this I am using the hsdatalog_to_wav.py example provided. Unfortunately, the resulting .wav seems to be empty. Duration is correct but no sound is present. Attached a picture of the .dat file converted to .csv (phases with no sound and with sound are visible) and the .wav file. Thank you for the support
Hi, I am using NanoEdgeAIStudio to detect anomalies on microphone signal. I am particularly interested in logging ultrasounds (from 20kHz to 100kHz). I used the Datalogger tool (in NanoEdgeAIStudio) to set up the datalogger and generate the neai_datalog.bin file. In this tool, I have noticed the only microphone available is "MP23ABS1" (see the screenshot below). I have read MP23ABS1's doc, though it is not clear to me if it is able to log ultrasounds ? Can you clarify this pls ? Also, I have read STWINKT1B's doc and I know there is also microphone IMP23ABSU (for ultrasounds, with a bandwidth up to 80kHz, as indicated in the doc). I would prefer to use IMP23ABSU instead of MP23ABS1 to log the data in NanoEdgeAIStudio. Is that possible ?To clarify, I would like to collect data from microphone IMP23ABSU (using the tool "import signal" and "from serial (USB)", as below). So far, I set up a project using sensor type "Microphone sensor 1 axis", ODR=10
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.