Skip to main content
Associate
May 17, 2025 4:52 PM UTC
Solved

Can not covert onnx model to nb format for stm32mp25 target

Hello
I want covert my quantized onnx model(develop by pytorch)  to .nb format, to enable stm32mp257 npu accelerate.
I use ST Edge AI Core V2.0.0,(V2.1.0 has been not support stm32mp257).when I run generate command,it report lose file "onnx_ruler_db.json".
 
run command:
/opt/ST/STEdgeAI/2.0/Utilities/linux/stedgeai generate -m ./xxx.onnx --target stm32mp25
command result:
ST Edge AI Core v2.0.0-20049
LOAD ERROR: [Errno 2] No such file or directory: '/opt/ST/STEdgeAI/2.0/Utilities/linux/lib/python3.9/site-packages/onnx_ruler_db.json'
This topic has been closed for replies.
Julian E.
Julian E.Best answer
ST Technical Moderator
May 21, 2025 1:19 PM UTC

Hello @charlie128,

 

it is a right issue. installing the stedgeai core in /opt is the issue. 

I advise to install it elsewhere. Or maybe use sudo or chmod.

 

Let me know if it helped.

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.

2 replies

Julian E.
Julian E.Best answer
ST Technical Moderator
May 21, 2025 1:19 PM UTC

Hello @charlie128,

 

it is a right issue. installing the stedgeai core in /opt is the issue. 

I advise to install it elsewhere. Or maybe use sudo or chmod.

 

Let me know if it helped.

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.
Associate
May 22, 2025 1:58 AM UTC
Hi @Julian E. 
Thank you very much for your reply. This is indeed an issue with the permissions of the installation directory. The problem was resolved after I used chown to change the directory of the ST tool to the user I am using.
 
The reason this problem was difficult for me to solve before is that it was not caused by abnormal permissions of the 'onnx_ruler_db.json' file itself, but by permission issues with some other files, which prevented this file from being generated. That's why I couldn't find this file before.
 
Therefore, the log report of this issue was quite misleading, making it difficult to associate it with a permission problem.
 
Thanks again.