Demo usage of deepviewRT in IMX8mp

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Demo usage of deepviewRT in IMX8mp

Jump to solution
638 Views
Bo_yun
Contributor I
Hello, I plan to use the NPU of i.MX8MP to infer my own built model and call it in the program through C language. However, I don't know how to write the program specifically, so I have two questions to consult:
1、I learned from the i.MX Machine Learning User's Guide that deepviewRT has test demos. I want to modify based on the demos, such as detectv4 and detectv4-remote. However, these two test files are precompiled in the Yocto meta. Can the source code of detectv4 and detectv4-remote be provided?
2、When using the C API to drive the NPU for model inference, is the header file used deepview_rt.h? I am using the header file from the GitHub project "mcux-sdk-middleware-deepviewrt-mcux". Is this reasonable, or should I use the header file from the SDK?
Labels (1)
0 Kudos
Reply
1 Solution
540 Views
pengyong_zhang
NXP Employee
NXP Employee

HI @Bo_yun 

i reproduce your problem, please use the eiQ command line convert the modle from .onnx to .rtm. i have coverted it without any error. You can find it from attachment file.

B.R

 

View solution in original post

0 Kudos
Reply
7 Replies
541 Views
pengyong_zhang
NXP Employee
NXP Employee

HI @Bo_yun 

i reproduce your problem, please use the eiQ command line convert the modle from .onnx to .rtm. i have coverted it without any error. You can find it from attachment file.

B.R

 

0 Kudos
Reply
551 Views
pengyong_zhang
NXP Employee
NXP Employee

Hi @Bo_yun 

I can't download your model file, Has the  uplode been successful?

B.R

0 Kudos
Reply
548 Views
Bo_yun
Contributor I

I have reuploaded the model file

Tags (1)
0 Kudos
Reply
560 Views
pengyong_zhang
NXP Employee
NXP Employee

Hi @Bo_yun 

Please share your model, i will test your scenario on my site.

B.R

0 Kudos
Reply
557 Views
Bo_yun
Contributor I

Thank you very much. I conducted the conversion test using a simple two-layer MLP model. The model is a .onnx file converted from PyTorch (with 3 inputs and 1 output). The PyTorch version is 2.0.1 and the ONNX version is 1.13.1.

0 Kudos
Reply
617 Views
pengyong_zhang
NXP Employee
NXP Employee

Hi @Bo_yun 

Sorry we can not provide you this source code.

should I use the header file from the SDK?

>>>Yes you are right

B.R

0 Kudos
Reply
602 Views
Bo_yun
Contributor I

Okay, when using elQ to convert the .onnx model to an .rtm file, I encountered a problem. The conversion failed with the error:
Optimizer Error: Couldn't build proto file into descriptor pool! Invalid proto descriptor for file "onnx/onnx-ml.proto": onnx/onnx-ml.proto: A file with this name is already in the pool.

I want to know how to solve this problem, thank you

0 Kudos
Reply