2025-03-08 10:19 PM
My question is same the title. I know that you have zoo model with custom training script to training or fine tuning based on provided model. But I have a new model, that is trained in other environment, I exported it to ONNX. How can I deploy this model to this board? Thank you.
2025-03-10 7:11 AM
Hello @Anhem ,
The first information to have is that it is a tool called the ST Edge AI Core that convert your model form TF, ONXX or TFlite to C code for all the tools that we have. Then you have different alternatives depending on what you do:
The most straightforward is to use STM32CubeMX and X-Cube-AI. You can do multiple things and mainly validate a model on target and generate example code.
I described it here for another eval board, just select the N6 and do the same.
Solved: Re: Deplying a deep learning model on NUCLEO-H753Z... - STMicroelectronics Community
When installing X Cube AI, you will be asked to provide the path to the zip for the NPU addon of the ST Edge AI Core, you can download it here (the last one): STEdgeAI-Core - Artificial intelligence (AI) optimizer technology for STMicroelectronics products - STMicroelectronics
I believe that the template application generated by CubeMX is a code that do an inference of your model with a random input and return via serial some metrics. I may be wrong about that.
You can also use the ST Edge AI Core in standalone to get the C model and add it manually to your project. I would suggest using the first option as it does it for you.
You can also try to use the model zoo deployment script. I think that if you have a model that has inputs and outputs similar to what the model in model zoo has, the automatic deployment should be able to create a firmware example with your model. The conversion to C code will work as it does the same thing with the ST Edge AI Core, but the STM32CubeIDE that is modified and flashed to your board might not be compatible with your model I/O.
For example, if you do image classification, your input is most likely (height,width,channels) and output a buffer of size number of classes. Then in this case it is the same as model zoo models. (They maybe use one more dimension in input, the batch, download one model from model zoo and look at it.)
You can find documentation here:
https://stedgeai-dc.st.com/assets/embedded-docs/index.html
Have a good day,
Julian