WATCH ON-DEMAND | STM32 Summit 2026
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 STEnvironmentItem Version / Details BoardSTM32N6570-DKOSUbuntu 24.04 LTSPythonConda, Python 3.10STM32AI Model Zoostm32ai-modelzoo-services/object_detectionOperation modedeploymentModelyolov8n_256_quant_pc_uf_od_coco-person-st.tfliteSTM32CubeIDE1.19.0ST Edge AI Core / STM32CubeAI10.2.0Local tool/opt/ST/STEdgeAI/2.2/Utilities/linux/stedgeaiDescriptionI am using the STM32AI Model Zoo deployment workflow on Linux to deploy a YOLOv8 object detection model to the STM32N6570-DK.The deployment pipeline reaches the final flashing stage and aborts because no ST-LINK device is connected, even though all previous steps (Neural-Art, code generation, project patching) completed successfully.Console log excerpt building.. Debug flashing.. Debug STM32N6570-DK board programming is SKIPPED! -> No valid STM32 development board is connected (ST-LINK/swd port).. ... raise STMAICToolsError('Board programming failed!') E400: Board programming failed! Expected behaviorEven when
Hello, I am working with the STM32N6570‑DK discovery kit and using the ST Edge AI Developer Cloud to generate code for my neural network. The tool produces a project with multiple files (model, runtime, headers, etc.), but I am struggling to understand how to actually integrate this into my STM32N6 application.Specifically, I would like to know:What is the expected input format (tensor dimensions, quantization type) and how do I feed my sensor/camera data into it?How do I retrieve the output from the inference (classification vector, bounding boxes, etc.) and use it in my application logic?How should I connect the generated code with my application (main loop, data acquisition from camera/audio, etc.)?I have looked through the STM32N6 examples and documentation, but they don’t clearly explain how to bridge the generated AI code with a working application. Any guidance or pointers to documentation/examples would be greatly appreciated.Thanks in advance!
Hello,I am trying to test a deployed application for object detection.I have tested out of the box object detection application code.I can successfully build the project and I can run the code on my board.Unfortunately it doesn't detect any objects. It is supposed to detect person but it never detected.I have tried to use different pre-trained models and built and run them successfully but none of them work.The screen shows the live camera image, shows inference value and detected object number is always zero.Is there anything that I miss? By the way, the factory demo AI application works perfectly, it successfully detects people. So the hardware is OK.
Hi,I’m working on benchmarking and deploying a 33 MB half-INT8 model. During benchmarking, the measured inference time in ST dev cloud was about 264 ms. However, after compiling the model locally using STEdgeAI and deploying it, the inference time was found to be 405 ms.Additionally, when using the “Generate Code” option in the ST Dev Cloud, the generated artifacts—when deployed—showed the same inference time of 405 ms.I have verified that the weight and activation memory allocations are consistent with those used in the ST Dev Cloud (please refer to the attached logs).Could you please confirm whether this difference in inference time is expected, or if there is a known delta that should be addressed?logs:ST Dev cloud:>>> stedgeai analyze --model arcface_halfint8.tflite --st-neural-art custom@/tmp/stm32ai_service/7369b431-60e1-4924-9783-5f76cbd6b229/profile-27ac5fbe-1304-4c95-9d4e-44268ad9580f.json --target stm32n6 --optimize.export_hybrid True --name network --works
Hello,I am trying to run a Transformer model with Multi-head self attention on the STM32N6570-DK board.The model is this one : https://github.com/arx7ti/cold-nilmHere is what I did so far:Convert the .ckpt I got from the above repo into a .onnx format.Import and Quantize the model using your ST Edge AI Developer Cloud tool.Try to use stedgeai `generate` command:From the standalone tool on my Linux machineFrom STCubeMX plugginFrom the ST Edge AI Developer Cloud--> None of thoses attempts were succesful. Here is the command I used in the first case:stedgeai analyze --model cold_stm32_float32_final_ready_PerChannel_quant_random_1.onnx --st-neural-art default@user_neuralart_STM32N6570-DK.json --target stm32n6 --name network --workspace workspace --output outputI got several issues that I tried to fix in order to make the Developer Cloud tool quantize my initial onnx model:Removing Constant operationsConverting LayerNormalization layers in compatible layersRemoving Pow operatio
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
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.