2025-07-14 6:33 AM - last edited on 2025-07-14 6:52 AM by Andrew Neil
Hi everyone,
I'm working with an STM32N6 board and trying to deploy a custom YOLOv8n model in ONNX format using CubeMX and STM32 Edge AI. I’ve run into a few issues and was hoping someone could help clarify the process.
Here’s what I’ve done so far:
I successfully imported my yolov8n.onnx model into CubeMX + Edge AI.
When I try to test the model using a .PNG image, I get an error saying PNG format is not supported. When I generate the C code using the model, I see a line in network.c where -inf is not defined, causing compilation errors.
My Questions:
How can I test my model using a PNG image, either on the STM32N6 device or on a desktop simulation?
Do I need to convert the PNG to raw input data manually?
What’s the correct way to prepare a PNG image as an input buffer for use with STM32 inference code?
How do I resolve the -inf not defined issue in the generated network.c?
Any help, code snippets, or documentation pointers would be greatly appreciated!
Thanks in advance!
Solved! Go to Solution.
2025-07-25 6:01 AM
It should be ok next week.
Have a good day,
Julian
2025-07-30 2:24 AM
Hello @TerZer,
You can find the tutorial here:
How to build an AI application from scratch on the... - STMicroelectronics Community
Have a good day,
Julian
2025-07-31 6:26 AM - edited 2025-07-31 6:27 AM
Hello @Julian E. ,
First off, thanks for your tutorial — it was really helpful! However, I ran into an issue. I tried to create a TouchGFX application, and when I attempted to add the X-CUBE-AI component in STM32CubeMX, I got the following message:
This component cannot be selected:
- This application cannot be selected while the application Application from pack STMicroelectronics.X-CUBE-TOUCHGFX.4.25.0 is selected.
Is there a known workaround or specific setup needed to use both X-CUBE-AI and TouchGFX in the same project?
P.S.
All software is on latest version:
X-CUBE-AI version 10.2.0
X-CUBE-TOUCHGFX 4.25.0
2025-07-31 6:52 AM
Hello @TerZer,
You are right, I am asking the dev of X Cube AI the reason for that. I'll keep you updated.
Have a good day,
Julian