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
I’m currently testing my own quantized model on the STM32N6570-DK, using the official X-CUBE-AI application example.All Model Zoo examples (e.g. SSD, image classification) run perfectly with the same firmware and codebase.However, when I replace the model with my own quantized TensorFlow Lite model (Zero-DCE, converted with ST Edge AI Developer Cloud), the inference process freezes — even though the conversion and compilation complete without errors.I’m wondering if there is a hard restriction that prevents models from running when used RAM exceeds the on-chip SRAM (≈ 4.2 MB), even though the report shows that part of the activations are mapped to external HyperRAM.Here are the key parts of my Edge AI Core 2.2.0 generation report:ST Edge AI Core v2.2.0-20266Model name: zerodce_int8_192Total memory usage:----------------------------------------------Total: 11.643 MBWeights: 78.751 KBActivations: 11.566 MBMemory mapping:cpuRAM2 [0x34100000 - 0x34200000]: 1.000 MBnpuRAM3 [0x34200000 - 0x3
Hi all,I'm training a ST_yolox model to detect car. In my user_config.yaml i tried to use this : pretrained_weights: coco When i launch the training script i got this errorraise ValueError("\nUnknown or unsupported attribute. Received `{}`{}".format(attr, message))ValueError:Unknown or unsupported attribute. Received `pretrained_weights`Please check the 'training.model' section of your configuration file.But if i understand correctly we can use this variablehttps://github.com/STMicroelectronics/stm32ai-modelzoo-services/blob/main/object_detection/docs/README_TRAINING.md#2-7If someone can give me some explanation
Hello community,I am currently working on deploying a full YOLOv8n (80-class COCO) model on the STM32N6570-DK and integrating it with the Object Detection example from the STM32 AI Model Zoo Service.I closely followed this tutorial:How to deploy YOLOv8/YOLOv5 Object Detection modelsand used the official quantization scripts here:YOLOv8 Quantization ScriptsModel & Quantization SetupBase model: yolov8n.pt (Ultralytics official)Exported to: SavedModel formatQuantization: done per STM32AI model zoo tutorialInput: uint8 (0–255)Output tested as:uint8 input / float outputuint8 input / int8 outputCase Input Type Output Type Result(1)uint8floatIncorrect inference — bounding boxes & class scores both wrong(2)uint8int8Bounding boxes coordinates always same (incorrect), classification correctAfter debugging case (2), I found:The bounding box coordinates remain constant across frames and detections, even before post-processing.The output tensors are quantized correctly, but the model’s raw
Hi all, According to the STM32N6 reference manual (see attached figure), both the diagram and the text description state that the ConvAcc should support 16-bit input × 16-bit weight (16×16) operations.To verify this, I designed a simple test model(see attached files): Input: 4×4 tensor (all ones)Kernel: 3×3 (all ones)Expected output: 2×2 tensor When I set the SIMD field to 1, the ConvAcc performs 8-bit input × 8-bit weight (8×8) operations, and the output results are correct as expected.When I set the SIMD field to 2, the ConvAcc performs 16-bit input × 8-bit weight (16×8) operations, and the results are also correct.My questions are:Does the ConvAcc really support 16×16 convolution (16-bit input × 16-bit weight) as described in the reference manual?If yes, how should I correctly configure the fields of LL_Convacc_InitTypeDef to enable 16×16 operation? (e.g., simd, inbytes_f, outbytes_o, kseten, etc.)
Hi,Is there a way to enable weights compression while also using the STM32N6 NPU ?I saw there is Decompression unit in the reference manual where it tells the NPU compiler is the tool that generate codebooks offline (there is also mention of it in lib_aton.h too):This would help to reduce the model size in RAM. I've tried with models using a single channel in 1x1 Conv, but maybe this feature can only be used with some specific conditions ? Thanks!Alexis Murzeau
Hi!It might be a *** beginners question but I'm quite lost...I'm trying to deploy my .ONNX model on my new NUCLEO-N657X0-Q board. The MCU on it STM32N657X0H3Q, seems to have 4Mb of RAM and no flash, but the board itself has 512Mb octaflash memory on it. My model is calculated as 2.71 MB of flash memory and 402 Kb of RAM. The ST edge developer tool claims that my board doesn't have enough resources and it won't create a suitable STM project for the IDE.My question is - is there a way to work with the board on AI models? is it a bug in the software or am I doing something wrong?Thank you!Amir
I am currently running the head_landmarks model from the official STM32 Model Zoo:https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/pose_estimation/head_landmarksThe ONNX model I used is face_landmarks_v1_192_int8_pc.onnx (downloaded directly from the github.The model can be successfully executed on the STM32N6570-DK board using the NPU, and the output results are correct.However, the inference speed is much slower than expected:Actual inference time on N6570-DK: ~3.6 seconds per frameReported time in the Model Zoo README: ~20.52 milliseconds per frameI would like to confirm:Is there any specific optimization or configuration (e.g., memory placement, quantization format, build options, or runtime parameters) required to achieve the published 20 ms performance?Could this large gap indicate that part of the model is running on the CPU instead of the NPU?Is there a way to check, from the generated ai_network_report or logs, which layers are accelerated by the NPU and which
I tried to use YOLOv8n instead of YOLOX in the people detection and tracking project. However, after modifying the related files (app_config.h, postprocess_conf.h, and main.c) and generating the model weights for YOLOv8n, the people detection and tracking demo does not work as expected. I can build and boot the program through dev mode, but no tracking boxes or text overlays (e.g. inference speed) are displayed—only raw camera capture is shown.What is the possible issue that happened, and how should I debug? What addtional infromation should i provide?
Hello,I’m currently exploring the STM32N6570 MCU for an embedded AI/computer vision application.I would like to know how to port OpenCV or other AI inference frameworks to this device.Could you please guide me on:Whether OpenCV is already supported on the STM32N6570 (or within the STM32N6 MPU/MCU ecosystem)?Recommended toolchain or SDK to build and deploy OpenCV (STM32MPU SDK / Cube.AI integration)?Any available examples or reference projects combining camera input + AI processing on this MCU?Thank you in advance for your help.Best regards,Bobban K. S.
I porting yolov11 model to stm32mp257. and The target detection model I use ,The output tensor is a combination of [1x7x8400] and [1x4x8400]. [1x7x8400] should be our classification because I have set 7 categories, and [1x4x8400] should be our positional information. 1. best.pt changed to best.onnxfrom ultralytics import YOLO# Load the YOLO11 modelmodel = YOLO("best.pt")# Export the model to ONNX formatmodel.export(format="onnx") # creates 'yolo11n.onnx' 2. best.onnx changed to best.nb./stedgeai generate -m path/to/onnx/model --target stm32mp25 3. into broad stm32mp257 ,and get output shape. #C++float *pfloatdata = static_cast<float*>(nn_model->get_output(0));std::vector<ObjDetect_Results> returnx = parseModelOutput(pfloatdata); std::vector<ObjDetect_Results> parseModelOutput(float* output, int num_classes = 7, float confidence_threshold = 0.55f){std::vector<ObjDetect_Results> detections;float *data = output;const int num_boxes = 8400
Hi,I'm trying to deploy a quantized ONNX neural network on a STM32N6-Nucleo and inference on board returns clipped values (see clipped-output.png). Previously, I've exported and quantized my torch neural network to onnx using the following configuration (the same is used in this end-to-end notebook example) torch.onnx.export( model, inputs, str(onnx_path), input_names=input_names, output_names=output_names, opset_version=15, export_params=True, do_constant_folding=True, ) quantize_static( str(onnx_path), str(int8_path), CalibReader(str(calib_path)), calibrate_method=CalibrationMethod.MinMax, quant_format=QuantFormat.QDQ, per_channel=True, weight_type=QuantType.QInt8, activation_type=QuantType.QInt8, reduce_range=True, extra_options={'WeightSymmetric': True, 'ActivationSymmetric': False})I've generated c-files related to this ONNX model using the following command : stedgeai generate --target stm32n6 --model "int8.onnx" \--st
Hey I am very new to this world. I study Data science and AI and I am currently writing my thesis on Federated Learning on Edge Devices.I am currently really really struggling on the device side. I have a quantized Yolov8n model fine tuned on weed detection dataset. My goal is to first upload the model onto my board which is a NUCLEO-U575ZI-Q with STM32U575ZIT6QU mcu. I tried the systemPerformance template from X-Cube-AI it works but I can not manage to run my code (mostly ChatGPTs). I tried a lot of different things but could only make the device print over UART for now. I need someone who is familiar with the app and mcu programming. Here is the code of my last attempt which failed. I tried to follow DigiKey's X-Cube-AI tutorial. The device seems to crash into the void HardFault_Handler(void).Here is my main.c :/* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ********
Hello,I'm following the instructions here: https://github.com/STMicroelectronics/stm32ai-modelzoo-services/blob/main/object_detection/docs/README_DEPLOYMENT_STM32N6.md after creating a virtual environment and installed all the packages from requirements.txt, but after running this command:python stm32ai_main.py --config-path ./src/config_file_examples/ --config-name deployment_n6_ssd_mobilenet_v2_fpnlite_config.yamlI am getting this error:STM32CubeIDE build failed: ""Error executing job with overrides: []Traceback (most recent call last):File "C:\Users\devan\Desktop\dev\STM32ModelZoo\stm32ai-modelzoo-services\object_detection\stm32ai_main.py", line 234, in <module>main()File "C:\Users\devan\Desktop\dev\STM32ModelZoo\stm32ai-modelzoo-services\st_zoo\lib\site-packages\hydra\main.py", line 94, in decorated_main_run_hydra(File "C:\Users\devan\Desktop\dev\STM32ModelZoo\stm32ai-modelzoo-services\st_zoo\lib\site-packages\hydra\_internal\utils.py", line 394, in _run_hydra_run_a
hi,all. I used “best_saved_model/best_integer_quant.tflite” to perform inference on the PC,it's looks success!tflite_model = YOLO("/home/alientek/best_saved_model/best_integer_quant.tflite") # Run inference results = tflite_model("/home/alientek/hander1_1.jpg") and output like this.(yolov11) alientek@ubuntu:~/yolov11$ python test1.py /home/alientek/.conda/envs/yolov11/lib/python3.10/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer). warnings.warn( WARNING ⚠️ Unable to automatically guess model task, assuming 'task=detect'. Explicitly define task for your model, i.e. 'task=detect', 'segment', 'classify','pose' or 'obb'. Loading /home/alientek/best_saved_model/best_integer_quant.tflite for TensorFlow Lite inference... INFO: Created TensorFlow Lite XNNPACK delegate for CPU. image 1/1 /home/alientek/hander1_1.jpg: 640x640 1 handler1, 1760.9ms Speed: 38.9ms preprocess, 1760
this is issue when i porting yolov11 to stm32mp257. # Reading input image input_width = input_tensor_shape[1] print(input_width) input_height = input_tensor_shape[2] print(input_height) input_image = Image.open(args.image).resize((input_width,input_height)) input_data = np.expand_dims(input_image, axis=0) if input_tensor_dtype == np.float32: input_data = (np.float32(input_data) - args.input_mean) /args.input_std print("----1") img_array_after = np.array(input_data) print("Dtype after resize: ", img_array_after.dtype) print("Shape after resize: ", img_array_after.shape) print("----1test") if input_tensor_dtype == np.float32: print("float32") if input_tensor_dtype == np.float16: print("float16") input_data = (np.float16(input_data) - args.input_mean) /args.input_std print("----2test") stai_model.set_input(0, input_data) print("----2") start = timer() stai_model.run() end = timer()attach is my python files and model.root@ATK-DLMP257:/opt/ui/src/apps/resource/x-linu
Dear STM Community,I want to run Yolov8 object detection model from ST Model ZOO. I try to change STM32N6-GettingStarted-ObjectDetection from Yolo Tiny to Yolov8. I changed app_config.h:#define USE_DCACHE /*Defines: CMW_MIRRORFLIP_NONE; CMW_MIRRORFLIP_FLIP; CMW_MIRRORFLIP_MIRROR; CMW_MIRRORFLIP_FLIP_MIRROR;*/ #define CAMERA_FLIP CMW_MIRRORFLIP_NONE #define ASPECT_RATIO_MODE ASPECT_RATIO_FIT /* Model Related Info */ #define POSTPROCESS_TYPE POSTPROCESS_OD_YOLO_V8_UI #define NN_WIDTH (416) #define NN_HEIGHT (416) #define NN_BPP 3 #define COLOR_BGR (0) #define COLOR_RGB (1) #define COLOR_MODE COLOR_RGB /* Classes */ #define NB_CLASSES (1) #define CLASSES_TABLE const char* classes_table[NB_CLASSES] = {"person"} /* I/O configuration */ /* Postprocessing YOLO_V8 configuration */ #define AI_OD_YOLOV8_PP_NB_CLASSES (1) #define AI_OD_YOLOV8_PP_L_GRID_WIDTH (52) #define AI_OD_YOLOV8_PP_L_GRID_HEIGHT (52) #define AI_OD_YOLOV8_PP_M_GRID_WIDTH (26) #define AI_OD_YOLOV8_PP_M_GR
Hello,I have been trying for several weeks to run the Getting Started Object Detection demo from the STM32 GitHub repository.I followed both the GitHub and all the steps from the official guide:“How to run AI models from model zoo on STM32N6” by @B.Montanari (ST Employee)— but the STM32CubeIDE part does not work for me.Each time I try to open the Debug Configuration or start the debugger, I get the following error:An error has occurred. See error log for more details.Range [0, -1] out of bounds for length 44I saw that @Ghofrane GSOURI (ST Employee) suggested removing this line from the .project file:<nature>com.st.stm32cube.ide.mcu.MCUAppSProjectNature</natureAfter doing that, I can open the Debug Configuration and start debugging,but when I upload the project to my STM32N6570-DK board, the demo doesn’t run properly(black screen or the ia doesn't work).Here is what I have already tried:Following the full official STM32 AI / Model Zoo setup guide ste
Hello,I am new to the STM32 world and have got access to the STM32N657X0 Nucleo board. I have followed the tutorial from STM about getting the NPU running. Link. However I have faced mutliple issues.When I generate the code from CubeMX, the SystemIsolation_Config only have the pin attributes setup and it is missing code. I have tried to select the NPU in the RIF tab but can not. I have tried the iloc file attached in the tutorial as well I made my own based on the tutorial instruction and I faced the same issue. I have attached images below. If you could explain why, it will be helpful for me.I have also tried writing commenting the AI code , so that in the while(1) of the application code I can toggle LEDS. I have generated the bin files and the hex data for the model weights. However, it seems to me that the board does not leave the FSBL stage. The red LED in the main application code is not blinking. I have also tried to mass erase the external memory in the STM32 pr
HiHow can I develop pose estimation on the STM32N6570-DK board?
Hi,After deploying Yolov8_n to x-cube-n6-ai-people-detection app stops working, I only get a black screen.I generated the TFLite modelusing the following script:from ultralytics import YOLO # load model model = YOLO("yolov8n.pt") # export to TFLite model.export(format="tflite", imgsz=320, int8=True, nms=False) Then I took:yolov8n_full_integer_quant.tflite and ran:stedgeai generate --no-inputs-allocation --no-outputs-allocation \ --model yolov8n_full_integer_quant.tflite \ --target stm32n6 \ --st-neural-art default@user_neuralart.json cp st_ai_output/network_ecblobs.h . cp st_ai_output/network.c . cp st_ai_output/network_atonbuf.xSPI2.raw network_data.xSPI2.bin arm-none-eabi-objcopy -I binary network_data.xSPI2.bin \ --change-addresses 0x70380000 -O ihex network_data.hex After that I flashed the data:STM32_Programmer_CLI.exe -c port=SWD mode=HOTPLUG -el "$env:DKEL" -hardRst -w network_data.hexInside CubeIDE, when I run the app it is extremely slow and I neve
I want to deploy an ai custom model on the STM32H743. Are there any relevant tutorials or examples?
Hello I am trying to complete my first IOT system deployment on STAIOT Craft using a STEVAL WINBX1 as the target. I have set up the project, created a dataset and model and am following the workflow to set up an E2E system using ST Azure. I get all the way through the workflow and it looks like its going to be successful but at the last step it errors (as below) and so i cannot use the dataset nor inference tabs on the subsequent page.Setting inference mode... Error: [Errno 2] No such file or directory: '/app/workspace/ai_configuration.json'I have tried to do this using different SD cards, on Edge, on Chrome, making sure pop ups, redirects and downloads are all set in the browser.Can you please help guide me through?
I have downloaded the x-cube-n6-ai-multi-pose-estimation-v1.0.0 and have managed to open it in CubeIde however when I try to build the project it displays the following error: "Please generate this file with STM32Cube.AI tools. See instruction in README.md." I have installed CubeAI (I think) however I am absolutely confused by the Readme.md file, as it seems to direct to "Doc/Download-and-deploy-model.md" when I open this file I downloaded "yolov8n_256_quant_pc_uf_pose_coco-st (1)" however I am not sure what to do next? If I understand now I only need to generate the .c and .h files from the AI model in the "...\x-cube-n6-ai-multi-pose-estimation-v1.0.0\Model" folder, but how do I do that?
Hi,I tried to deploy a LSTM model on stm32h747i-disco board. However, I met "INTERNAL ERROR: Trying to remove _lstm_layer_detail_LSTM_output_1 which has multiple inputs" when I used x-cube-ai to analyse the model. I am wondering what should I do to solve this problem and why it has this problem.Thanks.
Iam getting this error continuously while flashing. I have taken custom dataset and trained. Training is done. Deployment is done but stm32cubeide is not generating bin. I have set the board to dev mode and connected the CN6. "make -j6 all" terminated with exit code 2. Build might be incomplete.14:02:56 Build Failed. 3 errors, 5 warnings. (took 29s.939ms)Stm32cubeide:Java was started but returned exit code=1-Dosgi.requiredJavaVersion=1.8-Dosgi.instance.area.default=@user.home/STM32CubeIDE/workspace_1.19.0-Declipse.buildId=Version 1.19.0-DproductMaturityGrade=mm-Djdk.http.auth.tunneling.disabledSchemes=-XX:+UseG1GC-XX:+UseStringDeduplication-Xms256m-Xmx1024m-Djavax.net.ssl.trustStoreType=WINDOWS-ROOT-Djava.class.path=C:\ST\STM32CubeIDE_1.19.0\STM32CubeIDE\\plugins/org.eclipse.equinox.launcher_1.6.900.v20240613-2009.jar-os win32-ws win32-arch x86_64-launcher C:\ST\STM32CubeIDE_1.19.0\STM32CubeIDE\stm32cubeide.exe-name Stm32cubeide--launcher.library C:\ST\STM32CubeIDE_1.19.0\STM32Cub
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.