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
Baby Detector is an application developed to sense the presence of babies in a small environment. The idea is to face the problem of babies forgotten inside cars, that can lead to their death especially on hot summer days.The core elements of the system are: a MP23ABS1 analog MEMS microphone, able to detect sound made by these babies; a STM32F4 micro-controller able to process the audio data and several different motion/environmental sensors from ST portfolio checking the environment conditions, that can raise the danger for the baby if too harsh. Here the LINK to the full article.Enjoy it!
I would like to compare a lot of CNN models in terms of RAM usage.If I analyze a single model the important result I am interested in is the ram (total) usage. As that practically defines, if the model fits into the RAM. weights (ro) : 1,544 B (1.51 KiB) activations (rw) : 134,964 B (131.80 KiB) ram (total) : 397,108 B (387.80 KiB) = 134,964 + 131,072 + 131,072However, I don't quite understand how the total RAM is calculated.The input buffer is 1x256x64x2 32-bit floating-point values large => 131072BThe same goes for the output buffer => 131072B.The weights are also pretty clear to me. (1,544)What I don't understand is, how the maximum ram for the activations is calculated.In that example 134,964 For
..
Hi Gln,Am trying to modify the ASC code for keyword spotting. I can see the ASC dataset which is 30sec audio data with sample rate 44.1khz whereas am using 1 sec audio dataset with sample rate 16khz. After feature extraction, am getting value "0". Should I change anything in the logmel spectrogram code? Please help.ASC code links:https://colab.research.google.com/drive/1lBca6J1kUTNG8MmaM_TTPV8M-5IXdy7Y#scrollTo=1pZBm4W3khO8https://gist.githubusercontent.com/glegrain/13276fb57007905180f5455be7a3d6cd/raw/tutacousticscenes2016.pyhttps://gist.githubusercontent.com/glegrain/bebc5a801c0896c9429dab9cb4dfaaf1/raw/LogMelSpectrogram.py
I have a STEVALSTWINK1TB board which I am trying to connect to Unico so that I can program the ml core in the ISM 330DHC chip. However, I cannot find the option for ISM330DHC chip on UNICO and the closest I can find is ISM330DHCX, but when I try to connect to it, an error message appears saying that the board does not respond. Is STEVALSTWINK1TB compatible with UNICO? If so, how should I go about connecting it to UNICO?
So I have a .ucf file which I would like to upload to the ISM330DHC sensor inside the STEVALSTWINK1TB board. I am trying to use the ST BLE APP to do this, but when I connect my board to the ST BLE APP it does not show any of the accelerometer and gyroscope readings. I flashed the sample predictive maintenance program in order to establish this BT connection. Is what I am trying to accomplish possible? If so how should I do it?
I'm trying to validate on target the example proposed in https://www.youtube.com/watch?v=k8AAr84z27s concerning the asc NN implementation with X-CUBE AI.My target is the NUCLEO-F401RE instead.After generating code I try to build and I get the warnings:............................................................................................/Core/Src/main.c:179:13: warning: 'MX_GPIO_Init' defined but not used [-Wunused-function] 179 | static void MX_GPIO_Init(void) | ^~~~~~~~~~~~../Core/Src/main.c:146:13: warning: 'MX_USART2_UART_Init' defined but not used [-Wunused-function] 146 | static void MX_USART2_UART_Init(void) | ^~~~~~~~~~~~~~~~~~~../Core/Src/main.c:120:13: warning: 'MX_CRC_Init' defined but not used [-Wunused-function] 120 | static void MX_CRC_Init(void)............c:\st\stm32cubeide_1.6.1\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltoo
Dear ST Engineer,I use CubeMX. AI debugging the AER applications downloaded from https://github.com/Shahnawax/AER-CNN-KERAS, need RAM 9.31 MiB, no matter use what kind of compression is so big, that is to say there is no that kind of MCU can adapt to this kind of use,What can be done to reduce RAM consumption?Or is there any MCU that has that much RAM?
I've tried to analyze a network *.h5 with X-CUBE-AI 7.0.0, but I get this warning:E010(InvalidModelError): Model saved with Keras 2.6.0 but <= 2.5.0 is supportedDid you fix it ?The analysis of the corresponding TFLite network gives just a warningWARNING: nl_7 (SOFTMAX) in SIGNED not supported. Falling back to floatThanksM
Dear ST Engineer,AER applications downloaded from https://github.com/Shahnawax/AER-CNN-KERAS, because librosa version upgrade to 0.8.1, some functions have been replaced, where is the new application download?
Questions:1. When do I use FSM and when do I use Decision Trees? Can I use both?2. Do you call ML the use of decision trees and NOT FSM?3. What I want is to detect gestures like if the sensor was in a pen and I wrote letters, let's say E, M, V, etc. (not necessarily all but as many as I can). Can the ML in this sensor do that? Decision Trees? FSM?4. I tried to (almost) reproduce one of your videos for my purpose, so I did multiple captures of moving in the shape of E, and many moving like M. I used ODR52 and started capture before moving sensors in shape of letter then stopped capture. Again and again. Each movement was just above 1s so I got about 80 samples, I chose to use 52 of them.QA: Should the many E captures be in ONE file (E.txt) as Unico appends new captures to same file, or in MANY (E1.txt, E2.txt, etc) files? It seems I can load them either way but I fear if I have multiple captures/file only first n samples from first capture may be used.QB: Can I choose any valu
We have AI model data that has been acquired from Thermal sensor that gives 64 pixel output.The output that we got has been converted into .bmp image with some colors based on the density at each pixel. We need to find how to feed the input data to AI code, we couldn't understand the code properly, So need some here
Dear ST Engineer, I have downloaded the AER audio recognition AI app from Github. There are about 50 kinds of audio in the app for training convolutional neural network (CNN). If I need to train a specific audio that I have customized, what should I do?For example, I collected a frame of 20ms data with 48K sampling rate and stored it in array X[960], with 960 data points in total. How do I use this array X to train convolutional neural network (CNN)?In addition, where is the interface function after the trained model is compiled into the project by CUBE.AI?
I am linking the Stm32airuntime library and have include the header files in my compiler search directory as well as the static library. I get no errors while building the project but when I debug it it gets stuck at the entry point of a function from the static library and pausing debugging throws a error static no source code found for function. Can you please guide?
I have a project running with X-CUBE-AI version 5.2 and I have trouble generating new network with old version, however I have also found updating very complicated since the way of calling NN changed. Should I just stick to older version and find a way to generate model with it? Or should I rebuild whole project to work with 7.0? If so how should I approach it?
I naively imported the well known [YAMNet](https://github.com/tensorflow/models/tree/master/research/audioset/yamnet) - .tflite version found [here](https://tfhub.dev/google/lite-model/yamnet/tflite/1) for audio classification to the X Cube AI analyzer. I expected it to run into a problem because of YAMNet's dynamic input size, which I would have fixed by converting a version of YAMNet with a fixed input size (number of samples), taking away its dynamic capabilities. What followed was a different error, which i didn't expect:Neural Network Tools for STM32AI v1.5.1 (STM.ai v7.0.0-RC8) NOT IMPLEMENTED: Shape with 1 dimensions not supported: (1,)Sorry for the provocative question; I'm not too familiar with the tf-vocabulary yet; but if a 1-D input is not supported, then what is? Only single values? This is quite confusing to me as a 1-D input seems the most useful and most used to me.
Calling the ai_instrumodel_data_weights_get() function has problems with the AI_BUFFER_OBJ_INIT struct in "ai_platform.h". I'm following this guide exactly step by step: https://www.digikey.com/en/maker/projects/tinyml-getting-started-with-stm32-x-cube-ai/f94e1c8bfc1e4b6291d0f672d780d2c0What I don't understand is the fact that an initialization tells me that it has no members. What is this based on to claim this error? It's defined right there, i should be able to define whatever I want. That's like saying "int i = 0; is undefined". No, it's defined right here. To reproduce, copy the code in the link and run it with Cube IDE 1.7.0 and X Cube AI 7.0.0
Hi everyone,For the command line interface of stm32ai, it has three commands of analyze, validate, and generate. Therefore, I can use the command to generate network and data C-files. However, for the command line interface of stm32tflm, it can only analyze RAM and Flash usage of the input model. My question is how to use command line interface to generate network and data C-files based on TFLM runtime? And these generated files can be used for the following compilation process like stm32ai. Besides, how can I use the tag to on/off the usage of CMSIS-NN?Thank you very much for your reply!Best regards,Jeff
Hello there! I am trying to edit the USB_WEBCAM example application provided under FP_AI_VISION1 package for STM32CubeAI on STM32H747I-DISCO development kit. I want to add debug logs using the STLink Virtual com port UART interface, which as per the user manual is connected to USART1 of the MCU. Since the Example application doesn't come with a CubeMX .ioc file, I had to add the related initialization and handling code manually. Therefore, I created another standalone project using CubeMX and configured the USART1 for the same and I was able to print logs using the STLink Virtual com port. Then I tried adding the same generated code and included the required stm32h7xx_hal_uart.c, stm32h7xx_hal_uart_ex.c and related header files to the USB_WEBCAM example application. I also tried to adjust the previous clock configuration of the example by adding the missing settings as in the standalone project, but I kept the PLL multipliers as is. With these changes the USB_WEBCAM examp
The driver is working and I am reading accelerometer data.I also found the guide: https://www.st.com/content/st_com/en/ecosystems/MEMS-Sensors-Ecosystem-for-Machine-Learning.htmlBut I cant connect the board from Unicleo-GUI.
I have a model with 14 float inputs in a single array and 3 array output each with a size of 4 float numbers. However the AI_input_size is ((1*1*14)*4) when I need it to be ((1*1*14)*1) and the AI_output_size is ((1*1*3)*4)#define AI_NN1_IN_NUM (1) #define AI_NN1_IN { \ AI_BUFFER_OBJ_INIT(AI_BUFFER_FORMAT_FLOAT, 1, 1, 14, 1, NULL), \ } #define AI_NN1_IN_SIZE { \ (1 * 1 * 14), \ } #define AI_NN1_IN_1_SIZE (1 * 1 * 14) #define AI_NN1_IN_1_SIZE_BYTES ((1 * 1 * 14) * 4) #define AI_NN1_OUT_NUM (3) #define AI_NN1_OUT { \ AI_BUFFER_OBJ_INIT(AI_BUFFER_FORMAT_FLOAT, 1, 1, 3, 1, NULL), \ AI_BUFFER_OBJ_INIT(AI_BUFFER_FORMAT_FLOAT, 1, 1, 3, 1, NULL), \ AI_BUFFER_OBJ_INIT(AI_BUFFER_FORMAT_FLOAT, 1, 1, 3, 1, NULL), \ } #define AI_NN1_OUT_SIZE { \ (1 * 1 * 3), \ (1 * 1 * 3), \ (1 * 1 * 3), \ } #define AI_NN1_OUT_1_SIZE (1 * 1 * 3) #define AI_NN1_OUT_2_SIZE (1 * 1 * 3) #define AI_NN1_OUT_3_SIZE (1 * 1 * 3) #define AI_NN1_OUT_1_SIZE_BYTES ((1 * 1 * 3) * 4) #define AI
I have trained a neural network model and trying to implement it using STM32L476RG Nucleo board. I have generated an application template and the input to the neural network is 32 X 32 X 1. I'm trying to understand below parameters in network_audio_ai.h.#define AI_NETWORK_AUDIO_AI_IN_1_HEIGHT (32)#define AI_NETWORK_AUDIO_AI_IN_1_WIDTH (32)#define AI_NETWORK_AUDIO_AI_IN_1_CHANNEL (1)#define AI_NETWORK_AUDIO_AI_IN_1_SIZE (32 * 32 * 1)#define AI_NETWORK_AUDIO_AI_IN_1_SIZE_BYTES (AI_NETWORK_AUDIO_AI_IN_1_SIZE * 4) The AI_NETWORK_AUDIO_IN_1_SIZE matched my trained model. My question is what is AI_NETWORK_AUDIO_AI_IN_SIZE_BYTES? Why do we need to multiply 4? Are there any documents about this? Thank you very much!
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.