mmdeploy
mmdeploy copied to clipboard
Export texdet models to onnx failed
Thanks for your bug report. We appreciate it a lot.
Checklist
- I have searched related issues but cannot get the expected help.
- I have read the FAQ documentation but cannot get the expected help.
- The bug has not been fixed in the latest version.
Describe the bug
(open-mmlab) tamnguyen ~/Desktop/working/src/mmocr [main] $ python tools/deployment/pytorch2onnx.py configs/textdet/maskrcnn/mask_rcnn_r50_fpn_160e_icdar2017.py ~/Downloads/mask_rcnn_r50_fpn_160e_icdar2017_20210218-c6ec3ebb.pth det ~/Desktop/the.png --output-file output.onnx --show tools/deployment/pytorch2onnx.py:337: UserWarning: DeprecationWarning: This tool will be deprecated in future. Welcome to use the unified model deployment toolbox MMDeploy: https://github.com/open-mmlab/mmdeploy warnings.warn(msg) load checkpoint from local path: /Users/tamnguyen/Downloads/mask_rcnn_r50_fpn_160e_icdar2017_20210218-c6ec3ebb.pth /Users/tamnguyen/opt/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/mmdet/datasets/utils.py:70: UserWarning: "ImageToTensor" pipeline is replaced by "DefaultFormatBundle" for batch inference. It is recommended to manually replace it in the test data pipeline in your config file. 'data pipeline in your config file.', UserWarning) /Users/tamnguyen/opt/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/onnx/symbolic.py:481: UserWarning: DeprecationWarning: This function will be deprecated in future. Welcome to use the unified model deployment toolbox MMDeploy: https://github.com/open-mmlab/mmdeploy warnings.warn(msg)
Traceback (most recent call last):
File "tools/deployment/pytorch2onnx.py", line 370, in
Reproduction
- What command or script did you run?
A placeholder for the command.
- Did you make any modifications on the code or config? Did you understand what you have modified? I think the img_meta type already changed to list then now it is not dict anymore
Environment
- Please run
python tools/check_env.pyto collect necessary environment information and paste it here. - You may add addition that may be helpful for locating the problem, such as
- How you installed PyTorch [e.g., pip, conda, source]
- Other environment variables that may be related (such as
$PATH,$LD_LIBRARY_PATH,$PYTHONPATH, etc.)
Error traceback
If applicable, paste the error trackback here.
A placeholder for trackback.
Bug fix
If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!
Hi, @Phelan164 please refer to the supported model list. Mask RCNN for text detection is not in the list.
btw, other modesl such as maskrnn, dbnet also have the same problem
Could you run python tools/check_env.py to collect necessary environment information and paste it here?
Closing it for no activity for a long time, feel free to reopen it if it is still an issue for you.