Skip to main content
Associate II
July 7, 2026
Solved

How to implement a custom object detection onnx model on STM32N6570-DK

  • July 7, 2026
  • 3 replies
  • 58 views

hey i am struggling to flash by custom onnx model on stm32N6570-DK . I tired using the stm32 cube ai cloud website but it only gives me option to generate c code and not a project or elf file . So i shifted to stm32cube Ai studio but it keeps me throwing this error - 

 (*) 'input'/'output' buffers are allocated in the activations buffer

Running the ONNX model...

Running the ST.AI c-model (AI RUNNER)...(name=network, mode=TARGET)

E200(ValidationError): TARGET: Unable to bind the ST.AI runtime with "network" c-model: []
 E801(HwIOError): Invalid firmware - COM3:115200

 

can anyone help me to get started with the same

Best answer by Julian E.

Hi ​@vedantgg,

 

The STM32cube AI Studio behavior is a bit strange…

I would suggest to use ST Model Zoo services to retrain an Object detection model and quantize it. 

Then import your new model in STM32Cube AI Studio. All Model Zoo model are tested so you should not get an error.


Then you should be able to click ‘generate the code’ to get a simple application running on the target.

 

Here is a tutorial to retrain yolo models. I tested v11n, v8n and 26n up to a 320x320 input size and got no issues, with the activation fitting in NPU ram (for best inference time).

AI:How to deploy Ultralytics YOLO models to STM32N6 - stm32mcu

 

have a good day,

Julian

3 replies

Julian E.
Julian E.Best answer
ST Technical Moderator
July 28, 2026

Hi ​@vedantgg,

 

The STM32cube AI Studio behavior is a bit strange…

I would suggest to use ST Model Zoo services to retrain an Object detection model and quantize it. 

Then import your new model in STM32Cube AI Studio. All Model Zoo model are tested so you should not get an error.


Then you should be able to click ‘generate the code’ to get a simple application running on the target.

 

Here is a tutorial to retrain yolo models. I tested v11n, v8n and 26n up to a 320x320 input size and got no issues, with the activation fitting in NPU ram (for best inference time).

AI:How to deploy Ultralytics YOLO models to STM32N6 - stm32mcu

 

have a good day,

Julian

​In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
vedantggAuthor
Associate II
July 31, 2026

hey thanks ,

I went with - https://github.com/STMicroelectronics/stm32ai-modelzoo-services/tree/main approach, used the python build and flash support for flashing my custom onnx model onto the board , after which i was also able to edit the generated camera+lcd pipeline to build a custom application.

I followed this document - https://github.com/STMicroelectronics/stm32ai-modelzoo-services/blob/main/object_detection/docs/README_DEPLOYMENT_STM32N6.md 

 

Just putting it up here for people who are getting started with stm32n6 

Julian E.
ST Technical Moderator
August 7, 2026

For future readers:

 

This could also have been an issue of the N6Cube Firmware 1.4.0

The team developing it broke something we use for AI.

 

In the new version of the CubeAI Studio, we fixed it while waiting for a fix (v1.4.1).

Either use the latest version of Cube AI studio or the N6cube Firmware v1.3.0

 

Have a good day,

Julian

 

​In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.