question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

failed:Fatal error: NMSRotated is not a registered function/op

See original GitHub issue

问题: 你好,根据教程,我尝试将MMrotate中的RotatedRetinaNet模型转换为onnx格式,转换后当我尝试加载onnx时出现了以下报错:onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : Load model from end2end.onnx failed:Fatal error: NMSRotated is not a registered function/op

(1)onnx转换 python tools/deploy.py \ configs/mmrotate/rotated-detection_onnxruntime_dynamic.py \ $MMROTATE_DIR/configs/rotated_retinanet/rotated_retinanet_obb_r50_fpn_1x_dota_le135.py \ $MMROTATE_DIR/checkpoints/rotated_retinanet_obb_r50_fpn_1x_dota_le135-e4131166.pth \ $MMROTATE_DIR/demo/demo.jpg \ --work-dir work-dirs/mmrotate/rotated_retinanet/ort \ --device cpu image

(2)尝试加载onnx,报错 image

此外,我发现build/lib下是存在libmmdeploy_onnxruntime_ops.so文件的,我该如何解决这个问题呢?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
Jianchun-Huocommented, Jun 28, 2022

@jzlin1997 I had this problem before, and then I solved it according to the following method: (1) Query the path of mmdeploy_onnxruntime_ops. dll

>>> from mmdeploy.backend.onnxruntime import get_ops_path
>>> get_ops_path()
'D:\\project\\mmdeploy\\mmdeploy\\lib\\mmdeploy_onnxruntime_ops.dll'

(2) Copy onnxruntime. dll to the path where mmdeploy_onnxruntime_ops. dll is stored

copy mmdeploy\\onnxruntime-win-x64-1.8.1\\lib\\onnxruntime.dll   ->   mmdeploy\\mmdeploy\\lib\\
Read more comments on GitHub >

github_iconTop Results From Across the Web

NMSRotated is not a registered function/op` #664 - GitHub
failed :Fatal error: NMSRotated is not a registered function/op. Your usage: import onnxruntime as ort ort.InferenceSession("end2end.onnx").
Read more >
Blog - Open3D
With the new PyTorch version, Open3D PyTorch ops work directly with standard ... Open3DScene.get_view to view (it is a property, not a function)...
Read more >
Oracle® Communications Session Border Controller
If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and...
Read more >
OpenShift Container Platform 4.8 release notes
A cluster administrator using Operator Lifecycle Manager (OLM) to install an Operator can encounter error conditions that are related either to the current...
Read more >
发布 0.6.3 OpenMMLab - MMOCR's documentation!
plate matching based approaches fail to generalize well to document images of unseen templates, and are not robust against text recognition errors.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found