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 trying to use STm32H7 with special camera to do image classification.What AI techniques and what features are used in FP-AI-FACEREC? and if CNN is used, I would like to know what kind of CNN is used for FP-AI-FACEREC.Is it MobileNet or something else?
..
Hi,I've some questions about validation on target, we meet some issues.Two ways are offer to do that, with or without automatic generate, compile, etc.1 - We tried the second method, and code generation stop due to not enough internal RAM. We are not able to modify STM32H745XI.ld to change AXI-SRAM lenght from 256KB to 512KB due to automatic code generation and we don't know local directory used for this method.Can we make a workarround if we decide to use external SRAM for neural network ?2 - We tried first method and build, program targets following AN5361 for configuration.We build project as debug application, however CubeMX can't find eval board for validation on target. 3 - Last question about performance validation, we only select "Performance" on X-Cube-AI Device Application menu ? Thanks you for your support,BRBenjamin
I have followed this link https://wiki.st.com/stm32mcu/wiki/How_to_use_Teachable_Machine_to_create_an_image_classification_application_on_STM32 for image classification using teachable machine ,after model is created, in inspecting the model using netron my model is converted in MLIR converter, as in the above link model is converted in TOCO converter. how to convert the model in TOCO converter ? After model is created in MLIR converter I run the module in stm32ai-windows-5.2.0 to get optimized c code, but I’m getting error in the shell while analysing .tflite model The error:Error : INTERNAL ERROR: bad number -53706645 for type uint32
The model I've been using for a year in CubeIDE 1.6.0 on a laptop cannot be analyzed now on a PC in the latest CubeIDE 1.6.1 while using the same X-Cube-AI v5.1.2. (I've tried the most recent v6.0.0 - the same error.)Ubuntu 20.04 (both laptop and PC).Model: https://github.com/Shahnawax/HAR-CNN-Keras/blob/master/model.h5Error log on a PC:Analyzing model /home/dizcza/STM32Cube/Repository/Packs/STMicroelectronics/X-CUBE-AI/5.1.2/Utilities/linux/stm32ai analyze --name network -m /home/dizcza/Downloads/model.h5 --type keras --compression 1 --verbosity 1 --workspace /tmp/mxAI_workspace505704300370625560993010444853274 --output /home/dizcza/.stm32cubemx/stm32ai_output Neural Network Tools for STM32 v1.3.0 (AI tools v5.1.0)It does not produce a log file (the command ends with a nonzero exit code), therefore I cannot post it.The same model has been successfully analyze
Although the documentation seems to support layers such as Unsqueeze and LogSoftMax for ONNX models, the X-Cube AI software gives errors such as1) INTERNAL ERROR - Unexpected layer type Unsqueeze2) TOOL ERROR - Unsupported layer type LogSoftmaxwhen an onnx model is input to be analyzed.Would like to find out why this is so.
Hi, Am trying to do image classification on STM32H747I- Disco. I got some ideas in St Wiki page. I have created the quantized model using some images. Now I need to work in Stm32ai shell. I really don't have any idea about how to work in stm32ai tool. Also its mentioned that we need to use 5.1.0 version for stm32ai but I don't see such version, only 5.2.0 is available.Please help me how to work in the stm32ai tool to analyze my model and get the C code.If I try to analyze the model in CubeMX, am getting error. Internal error is coming and my model is not analyzed.Please help me to resolve this issue to proceed further for my project.Thanks,shankari
Hi community,I meet an issue when I try to build my project.I'm trying to implement a tflite ANN on STM32H745XI disco board, and validate him on target.My model is too heavy to embedded FLASH, so I configure for an external FLASH use thanks to QSPI.I let ANN model on M4 core, FMC & QSPI on M4 runtime.Same think for clock configuration, I let M4 & M7 Core clock to 64MHz.When I build project, compiler found many errors due to FMC and QSPI definition...Someone have already meet the same situation ?I tried to move FMC, QSPI & ANN on M7 runtime but fail again...BR,Benjamin
Hi,i'm trying to analyze a neural network on STM32CubeIDE. With this tool in analyze mode i've got an error message. So i tried to do the same using command line and the message error is: "TOOL ERROR: not enough values to unpack" (expected 4 got 3)We have yet tried to change one parameter inside the network (SCALE parameter) but it doesn't work.Could enyone help me with this problem? Thanks
Hi, I wan't update X-CUBE-AI from 5.0.0 to 6.0.0 package in STM32CubeIDE 1.6.1 from local. So I've downloaded en.en.x-cube-ai-v6-0-0-windows.zip on my desktop. When I try to Load Froma Local the package "This file is either corrupted or not a recognized...."Below the part of error log:!SESSION 2021-05-20 10:31:46.058 -----------------------------------------------eclipse.buildId=Version 1.6.1java.version=11.0.9.1java.vendor=AdoptOpenJDKBootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_USCommand-line arguments: -os win32 -ws win32 -arch x86_64!ENTRY com.st.stm32cube.ide.mcu.informationcenter 4 4 2021-05-20 10:31:56.491!MESSAGE CubeMX plugin appears to be active, Log4j initialization might be too late.!ENTRY com.st.stm32cube.ide.mcu.informationcenter 1 1 2021-05-20 10:31:56.644!MESSAGE Log4j initialized with config file C:\Users\andrea spiezia\STM32CubeIDE\workspace_1.6.1\.metadata\.log4j.xml!ENTRY com.st.stm32cube.ide.mcu.ide 1 1 2021-05-20 10:32:09.376!MESSAGE Started RMI Se
Analyzing model C:/Users/Hector Gonzalez/STM32Cube/Repository/Packs/STMicroelectronics/X-CUBE-AI/5.1.1/Utilities/windows/stm32ai analyze --name network -m C:/Users/Hector Gonzalez/Desktop/classification_model.h5 --type keras --compression 1 --verbosity 1 --workspace C:\Users\HECTOR~1\AppData\Local\Temp\mxAI_workspace11378610577003599069257813762485 --output C:\Users\Hector Gonzalez\.stm32cubemx\stm32ai_output Neural Network Tools for STM32 v1.3.0 (AI tools v5.1.1) TOOL ERROR: Nor Keras nor tf.keras installed. Creating report file C:\Users\Hector Gonzalez\.stm32cubemx\stm32ai_output\network_analyze_report.txt IO ERROR: Nor Keras nor tf.keras installed. Exec/report summary (analyze dur=-0.00s err=-1) ----------------
Help! I am trying to port CubeAI from an STMCubeMX generated demo (System Performance) to a production app, but the call to ai_platform_network_create never returns.I can see the code is stuck in the function CRC_Lock but this is internal to the pre-compiled library so I do not know what it is trying to do.I have the CRC initialised by MX_CRC_Init which contains identical code generated by my Cube reference code and although there are very few difference between the demo code and my production code I feel that I must be missing something which is preventing the AI libs from running smoothly.The demo code runs beautifully on my target hardware so it is not hardware related. The production code also runs on my target hardware, but only if I comment out the attempts to initialise my ML models.I've checked Stack, Heap, memory locations, clock configurations etc. everything I can think of is setup very similarly if not identically to the demo code.Can anyone shed any light on what the AI li
Hello I am trying to implement an RNN which contains a lambda layer. It works perfectly on keras but gives me an error in STM32CubeIDE I have read in the documentation that it should be possible to implement a lambda layer in the X-CUBE-AI 6.0.0 and followed the advice there but nothing works.The lambda layer I am trying to implement is:x2=layers.Lambda(lambda q: q[:, -1])(x) Which basically takes just one column from another layer. Do you know how can I implement this layer or maybe a workaround using another kind of trick?Thanks
Steps to reproduce:1. Enable X-CUBE-AI core and add a network model.2. Go back into main.c and setup the calls to feed and run the model with data.3. Build the project.Upon build, produces the following errors:arm-none-eabi-gcc -o "NUCLEO-L476RG-Vibration_detect1.elf" @"objects.list" -larm_cortexM4lf_math -l:NetworkRuntime600_CM4_GCC.a -mcpu=cortex-m4 -T"C:\Users\feist\git\ROW_stationary_sensors\NUCLEO-L476RG-Vibration_detect1\STM32L476RGTX_FLASH.ld" --specs=nosys.specs -Wl,-Map="NUCLEO-L476RG-Vibration_detect1.map" -Wl,--gc-sections -static -Wl,--start-group -larm_cortexM4lf_math -l:NetworkRuntime600_CM4_GCC.a -Wl,--end-group -L../Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Lib/GCC -L../Middlewares/ST/AI/Lib -Wl,--wrap=malloc -Wl,--wrap=free -u _printf_float --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-groupc:\st\stm32cubeid
https://wiki.st.com/stm32mcu/wiki/How_to_perform_motion_sensing_on_STM32L4_IoTnode
I create a capsule layer for my capsule network, as follows.#A Capsule Implement with Pure Kerasclass Capsule(Layer): def __init__... def build(....): def call(...): ...model = Model(...)model.compile(...)model.fit(...)model.save('***.h5')But cubemx.ai reported errors while analyzing the model: INVALID MODEL: Couldn't load Keras model ***.h5,[AI: network] Unknown layer: CapsuleThanks a lot!
Hey Community,did anyone run a X-Cube-AI project using C++ successfully?I get undefined reference errors when adding X-Cube-AI via CubeMX to my perfectly running cpp project in CubeIDE.steps to reproduce: create new project with cubemx, specified as cpp!rename generated main.c to main.cpp, convert project to cpp in CubeIDE build an run worksadd X-Cube-AI Application template via CubeMXbuilding project failsmake -j4 all arm-none-eabi-g++ -o "stm32_cubeai_apply_model.elf" @"objects.list" -l:NetworkRuntime600_CM4_GCC.a -mcpu=cortex-m4 -T"C:\Users\[...]\stm32_cubeai_apply_model\STM32L475VGTX_FLASH.ld" -Wl,-Map="stm32_cubeai_apply_model.map" -Wl,--gc-sections -static -Wl,--start-group -l:NetworkRuntime600_CM4_GCC.a -Wl,--end-group -L../Middlewares/ST/AI/Lib --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -lstdc++ -lsupc++ -Wl,--end-group c:\st\stm32cubeide_1.5.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2
With a fresh installation of STM32CubeIDE 1.6.1 on a clean WIndows 10 Pro 20H2, after adding X-CUBE-AI 6.0.0 to a new STM32 project, Analyze fails with:ImportError: cannot import name 'get_all_providers' from 'onnxruntime.capi._pybind_state' (C:\Users\Utilisateur\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\6.0.0\Utilities\windows\onnxruntime\capi\_pybind_state.pyc)On ArchLinux (not a clean installation), the error does not seem to occur.How to reproduce:Create a new STM32 project.In the board selector choose (for example) Nucleo-L452RE-P, validate project creation.Add the X-CUBE-AI 6.0.0 software pack to the project with the Validation application template.Create a new network and import your model (Keras used here).Try to AnalyzeActual behaviour:Analyze fails with:Analyzing model C:/Users/Utilisateur/STM32Cube/Repository/Packs/STMicroelectronics/X-CUBE-AI/6.0.0/Utilities/windows/stm32ai analyze --name network -m&
I'm trying to use STM32AI quantize -q .json to quantize a Keras .H5. However, I never got it working.Version: STM32 XCUBE-AI 6.0.0tensorflow: I tried tf 2.0 and tf 1.15 installed Platform. tried on both window and Linux (ubuntu 18.04)Command line:C:\Users\****\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\6.0.0\Utilities\windows\stm32ai quantize -q cfg_mnist_ss_sa_pc.json Error message:Neural Network Tools for STM32AI v1.4.1 (STM.ai v6.0.0-RC6)INTERNAL ERROR: 'Flags' object has no attribute 'module_directory'
I am trying to follow the DM00570145 and validate on target (STM32F746 Discovery Board, XCUBE-AI 6.0.0, toolchain: STM32CUBE IDE), I cannot get the output listed on Figure 61. "Layer by layer results - Validation on target", especially the "ms" running time on each layer. I also tried Keil MDK toolchain, no luck. I opened the ai_stm32_msg.txt, no such information. Not on the terminal (I used putty) output.
Hello,I am trying to generate the code for a neural network with STCubeMX, and I'm following the manual you have posted here (https://www.st.com/resource/en/user_manual/dm00570145-getting-started-with-xcubeai-expansion-package-for-artificial-intelligence-ai-stmicroelectronics.pdf). I follow all the steps, but, when I have to select the USART3 on the "Platform Settings" configuration tab of X-CUBE-AI, there is no "Plarform Settings" tab. I attach some images. This is how it is supposed to be: This is what I have: As you can see, the USART3 is correctly configured: I am using version 6.2.0 of STM32CubeMX and version 6.0.0 of X-CUBE-AI. Could you give me any help?Thanks.
I use x-cube-ai 6.0 version & stm32h747i-disco board.By clicking on the [Advanced Settings] button, i use external flash memory for the weights and it works well.However, when [Use external RAM] button & copy weight to RAM , there's some problem and i didn't know why it doesn't work.error descriptions are belowDescription Resource Path Location Typeundefined reference to `HAL_SDRAM_Init' stm32h747i_discovery_sdram.c /hello_h7_sdram_CM7/Drivers/BSP/STM32H747I-DISCO line 229 C/C++ ProblemDescription Resource Path Location Typeundefined reference to `IS42S32800J_Init' stm32h747i_discovery_sdram.c /hello_h7_sdram_CM7/Drivers/BSP/STM32H747I-DISCO line 150 C/C++ ProblemDescription Resource Path Location Typemake: *** [makefile:70: hello_h7_sdram_CM7.elf] Error 1 hello_h7_sdram_CM7 C/C++ ProblemDescription Resource Path Location TypeDrivers/BSP/STM32H747I-DISCO/stm32h747i_discovery_sdram.o: in function `MX_SDRAM_Init': hello_h7_sdram_CM7 C/C++ ProblemDescription Resource Path Location
Hi,I am wondering does ST Micro provides any example around unsupervisory Machine learning examples to implement on board learning using ST MEMS vibration sensor and STM32.As I can see Cartesiam provides some examples and the tools to does this work but, need to purchase their libraries /tools.It would be great help if some one have any suggestions on above topic.Thanks,Naveen
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.