How to convert mmpose onnx model to NEF
Hi all,
I tried to convert some models from mmpose, using kneron/toolchain:latest but received the error.
The model is download from:
I also tried with tutorial from kneron-mmpose (https://github.com/kneron/kneron-mmpose/blob/main/docs_kneron/rsn18_hand_pose_step_by_step.md), converting a .pth model file to onnx is OK, optimizing is OK, but analysis and compile step are failed. The error is same above.
Could you please help? The convert script is attached.
Many thanks.
The discussion has been closed due to inactivity. To continue with the topic, please feel free to post a new discussion.
Comments
Hi Nhan,
Could you provide the onnx model as well? Thank you!
One thing you could try running is the IP Evaluator: 3. Floating-Point Model Preparation - Document Center (kneron.com)
eval_result = km.evaluate()
Printing out eval_result would show what caused the other steps to fail.
Hi Maria,
Here is result when I run the IP Evaluator:
The onnx model is attached.
Please help, I want to use kl720 dongle to detect human pose for our projects but stuck at convert model step.
Hi Nhan,
From what I'm seeing on Netron (Netron is a website where you could visualize models), it seems like both onnx models in 7f134165 and 6020f8a6 have operators that are not supported on KL720, such as Squeeze and Unsqueeze.
Reference for supported operators: Hardware Supported Operators - Document Center (kneron.com)
You would need to remove these operators, then you would be able to use our toolchain to convert the models to .nef files.
Kneron toolchain's model editor function: ONNX Converter - Document Center (kneron.com)
Hi Maria,
Thanks for your help, now I can convert mmpose onnx format to NEF and run on K720 dongle.
But the size of NEF file is too large (35MB). The issue is I cannot load other model beside it when running multiple models.
Is there any way to decrease size of model?
Many thanks.
Hi Nhan,
When running multiple models, you would need to reboot the KL720 dongle.
The size limit for models in KL720 is 75MB when uploading model via USB and 70MB when loading model from flash:
So they should be able to run on your dongle. Could you provide your models for us to see if we can run them on our dongles? Thanks!