Skip to main content
Associate II
September 7, 2026
Question

How to replace AI model in STM32N6570-DK ImageClassification sample for standalone operation

Body:

I would like to replace the AI model in the STM32N6570-DK sample project "STM32N6-GettingStarted-ImageClassification" and run it in standalone mode.

Purpose:
My goal is simply to try running different AI models, not for development purposes. I would like to confirm operation by powering the board ON/OFF without using a debugger.

Environment:

  • Board: STM32N6570-DK
  • IDE: STM32CubeIDE 2.2.0
  • STM32CubeAI Studio

What I want to do:
I am currently trying to generate C code using STM32CubeAI Studio from the following AI model provided by STMicroelectronics, and replace the files in the sample project:

https://github.com/STMicroelectronics/stm32ai-modelzoo/blob/main/image_classification/mobilenetv2/Public_pretrainedmodel_public_dataset/ImageNet/mobilenetv2_a035_128/mobilenetv2_a035_128_int8.tflite

I am also interested in whether it is possible to run third-party AI models in the same way, such as models from the following repository:

https://github.com/PINTO0309/PINTO_model_zoo

Questions:

  1. What is the correct procedure to replace the C code generated by STM32CubeAI Studio into the sample project and run it in standalone mode (power ON/OFF)?
  2. Is it also possible to run third-party models that are not provided by ST in the same way?

Thank you in advance for your help.

13 replies

Associate III
September 18, 2026

Hello ​@masatake 
sorry for the delay
you asked for my yaml config file and i only managed to reach my laptop now
but before, there is something confusing me
upper in the discussion you said that ST pretrained models from stm32modelzoo are working with you
>I successfully deployed the sample project and it works fine.
then in your previous comment you said they are not working
>Multiple models including ST's official pre-trained
so which is it?
are ST pretrained  models from stm32 modelzoo github repository working for you or not when deploeyd
becuase it matter.
if yes they are working fine then issue is from your own model it’s not compatible with STM32N6 hardware
if not , then there is an issue with your own stm32modelzoo services software and in this case  I recommand you uninstall modelzoo and install it again 

here is my yaml file its nothing special.

model:
# path to a `.tflite` or `.onnx` file.
model_path: C:\Users\gouiaa\Downloads\mobilenetv2_a035_fruit_6class_int8.tflite

operation_mode: deployment

dataset:
dataset_name: imagenet
classes_file_path: C:\Users\gouiaa\Downloads\labels6.txt

preprocessing:
resizing:
interpolation: bilinear
aspect_ratio: crop
color_mode: rgb # rgb, bgr

tools:
stedgeai:
optimization: balanced
on_cloud: False
path_to_stedgeai: C:/ST/STEdgeAI/4.0/Utilities/windows/stedgeai.exe
path_to_cubeIDE: C:/ST/STM32CubeIDE_1.17.0/STM32CubeIDE/stm32cubeide.exe

deployment:
c_project_path: ../application_code/image_classification/STM32N6/
IDE: GCC
verbosity: 1
hardware_setup:
serie: STM32N6
board: STM32N6570-DK

hydra:
run:
dir: ./tf/src/experiments_outputs/${now:%Y_%m_%d_%H_%M_%S}

mlflow:
uri: ./tf/src/experiments_outputs/mlruns

BR
Yessine

Julian E.
ST Technical Moderator
September 23, 2026

Hi ​@masatake,

 

I installed the latest version of Model Zoo Services.

I went to /object_detection/config_file_example/ and took the file I attached.

I just changed the path to my ST Edge AI Core 4.0 and CubeIDE v1.17.0

 

After running the script, I deployed successfully the yolov8 model.

Make sure to use a USBC to USBC cable to ensure correct power. (the bottom led on the right should be green).

 

When deploying the model, BOOT pins should be on the edge of the board. (make sure to power reset).

To run the apply, move the BOOT pins to the other side (left) and power reset.

 

I am pretty sure, cubeIDE 1.17 is necessary.

 

To answer you other question in the initial message:

You can off course use any other models. THe ST Edge AI Core is a C compiler to convert python AI models to C code. As long as the layers are supported, the model can be used. We use PINTO models in the Hand landmark demo on N6

STM32N6-AI | Software - STMicroelectronics

 

As the N6 does not have internal flash, to keep you code after reset, you need to store it in external flash and use what we call a FSBL (first stage boot loader) to copy your code to the internal ram before exciting it (other modes exist)
I suggest looking at this:
How to create an STM32N6 FSBL load and run | Community
and other knowledge base article about the N6 you can find on the ST Community.

 

With STM32Cube AI Studio, you can generate a template AI application for any model

Getting Started with STM32Cube AI Studio - ST Edge AI Documentation

The following document explains how this application was created (no need to redo it, in cubeAI Studio you can generate it)

How to deploy your AI model on STM32N6 - ST Edge AI Documentation

 

The list of supported layers can be found in the documentation of the ST Edge AI core. Depending on the python framework and the STM32 target, the supported list can be a bit different

ST Edge AI Core Documentation - ST Edge AI Core Docs

ST Neural-ART NPU - Supported operators and limitations - ST Edge AI Core Docs

 

 

 

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.