Skip to main content
Associate II
October 28, 2025
Question

Help with deploying multi-class YOLOv8n (80-class) model on STM32N6-DK

  • October 28, 2025
  • 1 reply
  • 513 views

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 models

and used the official quantization scripts here:
YOLOv8 Quantization Scripts


Model & Quantization Setup

  • Base model: yolov8n.pt (Ultralytics official)

  • Exported to: SavedModel format

  • Quantization: done per STM32AI model zoo tutorial

  • Input: uint8 (0–255)

  • Output tested as:

    1. uint8 input / float output

    2. uint8 input / int8 output

Case Input Type Output Type Result

(1)

uint8floatIncorrect inference — bounding boxes & class scores both wrong
(2)uint8int8Bounding boxes coordinates always same (incorrect), classification correct

After 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 outputs (prior to postprocess) seem fixed.

  • The default post-process used in the deployment script (deploy.py) is set for INT8 output models (POSTPROCESS_OD_YOLO_V8_UI). (Permalink)

When we changed this manually to POSTPROCESS_OD_YOLO_V8_UF (for float output) in the STM32N6 Object Detection app and reflashed, the results remained incorrect.


Thank you in advance for your help and guidance

 

1 reply

Julian E.
Technical Moderator
October 31, 2025

Hi @Doouv,

 

This is the yaml I use to deploy the yolov8 model for people detection from ultralytics.

Could you try to edit it to add your 80 classes and see if it deploys correctly with model zoo services?

 

If yes, then you will find the source code in stm32ai-modelzoo-services\application_code\object_detection\STM32N6\Application\STM32N6570-DK

 

Else, please share your model in .zip. I will ask the dev team to see if they can take a look.

 

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.
DoouvAuthor
Associate II
November 3, 2025

Hi @Julian E. 

I did try out and played around with the given yaml but got same results(no inference).
I , for now , am trying to get 256x256 multiclass yolov8n model running but my final objective is to get 640x480 multiclass yolov8n running.
PFA models for 256x256 input resolution

Thank you



Julian E.
Technical Moderator
November 4, 2025

Hi @Doouv,

 

What are the classes of the model you attached? 

I will try to deploy it on my side.

 

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.