mmpose
mmpose copied to clipboard
There are some problems in the dev1.0 branch torch2onnx, some modules seem to be from the master branch?
There is a problem with mmpose1.0 series export, the error seems to be that the environment is not compatible and the error is as follows:
-
Traceback (most recent call last): File "tools/deployment/pytorch2onnx.py", line 8, in
from mmpose.apis import init_pose_model ImportError: cannot import name 'init_pose_model' from 'mmpose.apis' (/home/dell/bag-torch/darkpull/Paddle/mmpose/mmpose/apis/init.py) -
After modification as follows: pytorch2onnx.py
# from mmpose.apis import init_pose_model
from mmpose.apis import init_model
Traceback (most recent call last):
File "tools/deployment/pytorch2onnx.py", line 17, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "tools/deployment/pytorch2onnx.py", line 19, in
Thanks for using MMPose. Please note that pytorch2onnx.py
is deprecated in MMPose and will be removed from 1.x. The model export and deployment are supported by MMDepoly. Please refer to MMDeploy's documents for details:
- MMDeploy 1.x for MMPose 1.x: https://mmdeploy.readthedocs.io/en/dev-1.x/04-supported-codebases/mmpose.html
- MMDeploy 0.x for MMPose 0.x: https://mmdeploy.readthedocs.io/en/latest/04-supported-codebases/mmpose.html
Okay, thank you. It can be exported and used normally. The main reason is that it is a little different from the master branch. I am not used to it for the time being?
Yes, MMPose 1.0 introduced major refactoring and unavoidable breaking changes. We have prepared a document to introduce the design of MMPose 1.0 and how to migrate from the old version. Hope it will help: https://mmpose.readthedocs.io/en/1.x/migration.html
Okay, thank you. It can be exported and used normally. The main reason is that it is a little different from the master branch. I am not used to it for the time being?
What code did you change to export onnx model in mmpose1.x ? I'm also having the same issue.