open-mmlab / mmdeploy

OpenMMLab Model Deployment Framework
https://mmdeploy.readthedocs.io/en/latest/
Apache License 2.0
2.79k stars 637 forks source link

[Bug] Failure to infer with onnxruntime model: The given version [15] is not supported, only version 1 to 8 is supported in this build. #2491

Closed Geniukx closed 1 year ago

Geniukx commented 1 year ago

Checklist

Describe the bug

The message The given version [15] is not supported, only version 1 to 8 is supported in this build shows when I run the script tools/deploy.py and tools/profiler.py, and exit with no more message. So I speculate that where is something wrong with the inference progress. The origin pytorch model is based on rtmpose-m(alias as hand in mmpose), I modify the input size of pose-detection_simcc_onnxruntime_dynamic.py to (256, 256) as the deploy config.

I have already follow some guides that rename the onnxruntime.dll in System32 and SysWoW64, and I can confirm that the onnxruntime.dll I use is the one from onnxruntime-win-gpu-x64-1.8.1

Reproduction

The script I run:

python tools/deploy.py configs/mmpose/pose-detection_simcc_onnxruntime_dynamic_hand.py 
E:\MMLab\MMPose\configs\hand_2d_keypoint\rtmpose\coco_hand\rtmpose-m_lab.py 
E:\Internship\hand_pose_estimation\checkpoints\rtmpose\best_AUC_epoch_40.pth 
E:\Internship\hand_pose_estimation\datasets\main\images\000001.jpg 
--work-dir rtmpose-ort/rtmpose-m 
--device cuda 
--show 
--dump-info

Besides, I modify the ctypes.DLL(lib_path) to ctypes.WinDLL(lib_path) in D:\Development\MiniConda\envs\mmlab\Lib\site-packages\mmdeploy\backend\onnxruntime\wrapper.py for the Error mmpose attributeerror: module 'ctypes' has no attribute 'dll', and the Error disappeared with the occurrence of the message I mentioned above instead.

Environment

10/12 04:40:24 - mmengine - INFO -

10/12 04:40:24 - mmengine - INFO - **********Environmental information**********
10/12 04:40:26 - mmengine - INFO - sys.platform: win32
10/12 04:40:26 - mmengine - INFO - Python: 3.8.18 (default, Sep 11 2023, 13:39:12) [MSC v.1916 64 bit (AMD64)]
10/12 04:40:26 - mmengine - INFO - CUDA available: True
10/12 04:40:26 - mmengine - INFO - numpy_random_seed: 2147483648
10/12 04:40:26 - mmengine - INFO - GPU 0: NVIDIA GeForce RTX 2070
10/12 04:40:26 - mmengine - INFO - CUDA_HOME: None
10/12 04:40:26 - mmengine - INFO - GCC: n/a
10/12 04:40:26 - mmengine - INFO - PyTorch: 2.0.1
10/12 04:40:26 - mmengine - INFO - PyTorch compiling details: PyTorch built with:
  - C++ Version: 199711
  - MSVC 193431937
  - Intel(R) Math Kernel Library Version 2020.0.2 Product Build 20200624 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v2.7.3 (Git Hash 6dbeffbae1f23cbbeae17adb7b5b13f1f37c080e)
  - OpenMP 2019
  - LAPACK is enabled (usually provided by MKL)
  - CPU capability usage: AVX2
  - CUDA Runtime 11.7
  - NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86;-gencode;arch=compute_37,code=compute_37
  - CuDNN 8.5
  - Magma 2.5.4
  - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.7, CUDNN_VERSION=8.5.0, CXX_COMPILER=C:/cb/pytorch_1000000000000/work/tmp_bin/sccache-cl.exe, CXX_FLAGS=/DWIN32 /D_WINDOWS /GR /EHsc /w /bigobj /FS -DUSE_PTHREADPOOL -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DLIBKINETO_NOROCTRACER -DUSE_FBGEMM -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_DISABLE_GPU_ASSERTS=OFF, TORCH_VERSION=2.0.1, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=OFF, USE_NNPACK=OFF, USE_OPENMP=ON, USE_ROCM=OFF,

10/12 04:40:26 - mmengine - INFO - TorchVision: 0.15.2
10/12 04:40:26 - mmengine - INFO - OpenCV: 4.8.1
10/12 04:40:26 - mmengine - INFO - MMEngine: 0.8.5
10/12 04:40:26 - mmengine - INFO - MMCV: 2.0.1
10/12 04:40:26 - mmengine - INFO - MMCV Compiler: MSVC 192930148
10/12 04:40:26 - mmengine - INFO - MMCV CUDA Compiler: 11.7
10/12 04:40:26 - mmengine - INFO - MMDeploy: 1.3.0+c4dc10d
10/12 04:40:26 - mmengine - INFO -

10/12 04:40:26 - mmengine - INFO - **********Backend information**********
10/12 04:40:26 - mmengine - INFO - tensorrt:    None
10/12 04:40:26 - mmengine - INFO - ONNXRuntime: None
10/12 04:40:26 - mmengine - INFO - ONNXRuntime-gpu:     1.8.1
10/12 04:40:26 - mmengine - INFO - ONNXRuntime custom ops:      Available
10/12 04:40:26 - mmengine - INFO - pplnn:       None
10/12 04:40:26 - mmengine - INFO - ncnn:        None
10/12 04:40:26 - mmengine - INFO - snpe:        None
10/12 04:40:26 - mmengine - INFO - openvino:    None
10/12 04:40:26 - mmengine - INFO - torchscript: 2.0.1
10/12 04:40:26 - mmengine - INFO - torchscript custom ops:      NotAvailable
10/12 04:40:26 - mmengine - INFO - rknn-toolkit:        None
10/12 04:40:26 - mmengine - INFO - rknn-toolkit2:       None
10/12 04:40:26 - mmengine - INFO - ascend:      None
10/12 04:40:26 - mmengine - INFO - coreml:      None
10/12 04:40:26 - mmengine - INFO - tvm: None
10/12 04:40:26 - mmengine - INFO - vacc:        None
10/12 04:40:26 - mmengine - INFO -

10/12 04:40:26 - mmengine - INFO - **********Codebase information**********
10/12 04:40:26 - mmengine - INFO - mmdet:       3.1.0
10/12 04:40:26 - mmengine - INFO - mmseg:       None
10/12 04:40:26 - mmengine - INFO - mmpretrain:  1.0.2
10/12 04:40:26 - mmengine - INFO - mmocr:       None
10/12 04:40:26 - mmengine - INFO - mmagic:      None
10/12 04:40:26 - mmengine - INFO - mmdet3d:     None
10/12 04:40:26 - mmengine - INFO - mmpose:      1.1.0
10/12 04:40:26 - mmengine - INFO - mmrotate:    None
10/12 04:40:26 - mmengine - INFO - mmaction:    None
10/12 04:40:26 - mmengine - INFO - mmrazor:     None
10/12 04:40:26 - mmengine - INFO - mmyolo:      None

Error traceback

For the deploy.py script, the whole Log info is:

10/12 04:17:46 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized.
10/12 04:17:46 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "mmpose_tasks" registry tree. As a workaround, the current "mmpose_tasks" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized.
10/12 04:17:51 - mmengine - INFO - Start pipeline mmdeploy.apis.pytorch2onnx.torch2onnx in subprocess
10/12 04:17:55 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized.
10/12 04:17:55 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "mmpose_tasks" registry tree. As a workaround, the current "mmpose_tasks" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized.
Loads checkpoint by local backend from path: E:\Internship\hand_pose_estimation\checkpoints\rtmpose\best_AUC_epoch_40.pth
10/12 04:17:58 - mmengine - WARNING - DeprecationWarning: get_onnx_config will be deprecated in the future.
10/12 04:17:58 - mmengine - INFO - Export PyTorch model to ONNX: rtmpose-ort/rtmpose-m\end2end.onnx.
10/12 04:17:58 - mmengine - WARNING - Can not find models.yolox_pose_head.YOLOXPoseHead.predict, function rewrite will not be applied
10/12 04:17:58 - mmengine - WARNING - Can not find models.yolox_pose_head.YOLOXPoseHead.predict_by_feat, function rewrite will not be applied
10/12 04:18:01 - mmengine - INFO - Execute onnx optimize passes.
10/12 04:18:01 - mmengine - WARNING - Can not optimize model, please build torchscipt extension.
More details: https://github.com/open-mmlab/mmdeploy/tree/main/docs/en/experimental/onnx_optimizer.md
================ Diagnostic Run torch.onnx.export version 2.0.1 ================
verbose: False, log level: Level.ERROR
======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================

10/12 04:18:01 - mmengine - INFO - Finish pipeline mmdeploy.apis.pytorch2onnx.torch2onnx
10/12 04:18:02 - mmengine - INFO - Start pipeline mmdeploy.apis.utils.utils.to_backend in main process
10/12 04:18:02 - mmengine - INFO - Finish pipeline mmdeploy.apis.utils.utils.to_backend
10/12 04:18:02 - mmengine - INFO - visualize onnxruntime model start.
10/12 04:18:09 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized.
10/12 04:18:09 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "mmpose_tasks" registry tree. As a workaround, the current "mmpose_tasks" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized.
10/12 04:18:09 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "backend_segmentors" registry tree. As a workaround, the current "backend_segmentors" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized.
The given version [15] is not supported, only version 1 to 8 is supported in this build.
10/12 04:18:15 - mmengine - ERROR - tools/deploy.py - create_process - 82 - visualize onnxruntime model failed.

And when I use a script to infer:

10/12 04:34:54 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized.      
10/12 04:34:54 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "mmpose_tasks" registry tree. As a workaround, the current "mmpose_tasks" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized.
10/12 04:34:54 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "backend_segmentors" registry tree. As a workaround, the current "backend_segmentors" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized.
The given version [15] is not supported, only version 1 to 8 is supported in this build.
irexyc commented 1 year ago

https://github.com/microsoft/onnxruntime/issues/11230#issuecomment-1100745427

10/12 04:18:01 - mmengine - INFO - Finish pipeline mmdeploy.apis.pytorch2onnx.torch2onnx 10/12 04:18:02 - mmengine - INFO - Start pipeline mmdeploy.apis.utils.utils.to_backend in main process 10/12 04:18:02 - mmengine - INFO - Finish pipeline mmdeploy.apis.utils.utils.to_backend

转换没问题

10/12 04:18:02 - mmengine - INFO - visualize onnxruntime model start. 10/12 04:18:09 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized. 10/12 04:18:09 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "mmpose_tasks" registry tree. As a workaround, the current "mmpose_tasks" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized. 10/12 04:18:09 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "backend_segmentors" registry tree. As a workaround, the current "backend_segmentors" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized. The given version [15] is not supported, only version 1 to 8 is supported in this build. 10/12 04:18:15 - mmengine - ERROR - tools/deploy.py - create_process - 82 - visualize onnxruntime model failed.

可视化报错(加载转换后的模型),这个问题应该是由于加载了错误的onnxruntime的动态库,windows的话你检查下有没有这个文件,有的话删掉。

C:\windows\system32\onnxruntime.dll
Geniukx commented 1 year ago

microsoft/onnxruntime#11230 (comment)

10/12 04:18:01 - mmengine - INFO - Finish pipeline mmdeploy.apis.pytorch2onnx.torch2onnx 10/12 04:18:02 - mmengine - INFO - Start pipeline mmdeploy.apis.utils.utils.to_backend in main process 10/12 04:18:02 - mmengine - INFO - Finish pipeline mmdeploy.apis.utils.utils.to_backend

转换没问题

10/12 04:18:02 - mmengine - INFO - visualize onnxruntime model start. 10/12 04:18:09 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized. 10/12 04:18:09 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "mmpose_tasks" registry tree. As a workaround, the current "mmpose_tasks" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized. 10/12 04:18:09 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "backend_segmentors" registry tree. As a workaround, the current "backend_segmentors" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized. The given version [15] is not supported, only version 1 to 8 is supported in this build. 10/12 04:18:15 - mmengine - ERROR - tools/deploy.py - create_process - 82 - visualize onnxruntime model failed.

可视化报错(加载转换后的模型),这个问题应该是由于加载了错误的onnxruntime的动态库,windows的话你检查下有没有这个文件,有的话删掉。

C:\windows\system32\onnxruntime.dll

您好!我已经参考其他issue或doc,将System32和SysWOW64下的onnxruntime.dll都重命名了,在cmd中输入onnxruntime.dll得到: image 我感觉调用的应该就是正确的dll文件,请问这里有问题吗?

Geniukx commented 1 year ago

reproduce on ubuntu server 20.04:

python ./tools/deploy.py /home/qinglang/lab/mmlab/mmdeploy/configs/mmpose/pose-detection_simcc_onnxruntime_dynamic_hand.py /home/qinglang/lab/mmlab/mmpose/configs/hand_2d_keypoint/rtmpose/coco_hand/rtmpose-m_lab.py /home/qinglang/lab/internship/hand_pose_estimation/checkpoints/mmpose/best_AUC_epoch_40_published-24d6a9fb_20231011.pth /home/qinglang/lab/internship/hand_pose_estimation/datasets/lab/main_validated/images/000001.jpg --work-dir rtmpose-ort/rtmpose-m --device cuda:1 --show --dump-info
10/12 15:16:12 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized.
10/12 15:16:12 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "mmpose_tasks" registry tree. As a workaround, the current "mmpose_tasks" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized.
10/12 15:16:13 - mmengine - INFO - Start pipeline mmdeploy.apis.pytorch2onnx.torch2onnx in subprocess
10/12 15:16:13 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized.
10/12 15:16:13 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "mmpose_tasks" registry tree. As a workaround, the current "mmpose_tasks" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized.
Loads checkpoint by local backend from path: /home/qinglang/lab/internship/hand_pose_estimation/checkpoints/mmpose/best_AUC_epoch_40_published-24d6a9fb_20231011.pth
10/12 15:16:15 - mmengine - WARNING - DeprecationWarning: get_onnx_config will be deprecated in the future. 
10/12 15:16:15 - mmengine - INFO - Export PyTorch model to ONNX: rtmpose-ort/rtmpose-m/end2end.onnx.
10/12 15:16:15 - mmengine - WARNING - Can not find models.yolox_pose_head.YOLOXPoseHead.predict, function rewrite will not be applied
10/12 15:16:15 - mmengine - WARNING - Can not find models.yolox_pose_head.YOLOXPoseHead.predict_by_feat, function rewrite will not be applied
10/12 15:16:16 - mmengine - INFO - Execute onnx optimize passes.
10/12 15:16:16 - mmengine - WARNING - Can not optimize model, please build torchscipt extension.
More details: https://github.com/open-mmlab/mmdeploy/tree/main/docs/en/experimental/onnx_optimizer.md
================ Diagnostic Run torch.onnx.export version 2.0.1 ================
verbose: False, log level: Level.ERROR
======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================

10/12 15:16:16 - mmengine - INFO - Finish pipeline mmdeploy.apis.pytorch2onnx.torch2onnx
10/12 15:16:17 - mmengine - INFO - Start pipeline mmdeploy.apis.utils.utils.to_backend in main process
10/12 15:16:17 - mmengine - INFO - Finish pipeline mmdeploy.apis.utils.utils.to_backend
10/12 15:16:17 - mmengine - INFO - visualize onnxruntime model start.
10/12 15:16:18 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized.
10/12 15:16:18 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "mmpose_tasks" registry tree. As a workaround, the current "mmpose_tasks" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized.
10/12 15:16:18 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "backend_segmentors" registry tree. As a workaround, the current "backend_segmentors" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized.
The given version [15] is not supported, only version 1 to 8 is supported in this build.
10/12 15:16:18 - mmengine - ERROR - ./tools/deploy.py - create_process - 82 - visualize onnxruntime model failed.
wenkaiH commented 1 year ago

same problem!!!!

irexyc commented 1 year ago

@Geniukx @wenkaiH

可能是因为onnxruntime/onnxruntime-gpu 版本过低导致的,你们可能装的版本是1.8.x,可以通过pip list看一下。

可视化的时候 onnxruntime python wrapper 会加载自定义算子(libmmdeploy_onnxruntime_ops.so),这个自定义算子在mmdeploy-1.3.0 编译的时候用的是onnxruntime 1.15.1(1.3.0之前是1.8.1),所以onnxruntime的版本应该>=1.15.1才可以加载

(PS. mmdeploy-1.3.0 windows-sdk 貌似还是用onnxruntime 1.8.1编译的。所以如果用这个sdk的话,需要使用包里的onnxruntime)

Geniukx commented 1 year ago

@irexyc 感谢大佬!问题解决了!

wenkaiH commented 1 year ago

@Geniukx @wenkaiH

可能是因为onnxruntime/onnxruntime-gpu 版本过低导致的,你们可能装的版本是1.8.x,可以通过pip list看一下。

可视化的时候 onnxruntime python wrapper 会加载自定义算子(libmmdeploy_onnxruntime_ops.so),这个自定义算子在mmdeploy-1.3.0 编译的时候用的是onnxruntime 1.15.1(1.3.0之前是1.8.1),所以onnxruntime的版本应该>=1.15.1才可以加载

(PS. mmdeploy-1.3.0 windows-sdk 貌似还是用onnxruntime 1.8.1编译的。所以如果用这个sdk的话,需要使用包里的onnxruntime)

Thanks!!!

jwwangchn commented 9 months ago

@Geniukx @wenkaiH

可能是因为onnxruntime/onnxruntime-gpu 版本过低导致的,你们可能装的版本是1.8.x,可以通过pip list看一下。

可视化的时候 onnxruntime python wrapper 会加载自定义算子(libmmdeploy_onnxruntime_ops.so),这个自定义算子在mmdeploy-1.3.0 编译的时候用的是onnxruntime 1.15.1(1.3.0之前是1.8.1),所以onnxruntime的版本应该>=1.15.1才可以加载

(PS. mmdeploy-1.3.0 windows-sdk 貌似还是用onnxruntime 1.8.1编译的。所以如果用这个sdk的话,需要使用包里的onnxruntime)

mmdeploy tutorial 里面写的还是 1.8.1

YancyGuo commented 7 months ago

THANKS!

@Geniukx @wenkaiH

可能是因为onnxruntime/onnxruntime-gpu 版本过低导致的,你们可能装的版本是1.8.x,可以通过pip list看一下。

可视化的时候 onnxruntime python wrapper 会加载自定义算子(libmmdeploy_onnxruntime_ops.so),这个自定义算子在mmdeploy-1.3.0 编译的时候用的是onnxruntime 1.15.1(1.3.0之前是1.8.1),所以onnxruntime的版本应该>=1.15.1才可以加载

(PS. mmdeploy-1.3.0 windows-sdk 貌似还是用onnxruntime 1.8.1编译的。所以如果用这个sdk的话,需要使用包里的onnxruntime)

DCC-lzhy commented 5 days ago

@Geniukx @wenkaiH

可能是因为onnxruntime/onnxruntime-gpu 版本过低导致的,你们可能装的版本是1.8.x,可以通过pip list看一下。

可视化的时候 onnxruntime python wrapper 会加载自定义算子(libmmdeploy_onnxruntime_ops.so),这个自定义算子在mmdeploy-1.3.0 编译的时候用的是onnxruntime 1.15.1(1.3.0之前是1.8.1),所以onnxruntime的版本应该>=1.15.1才可以加载

(PS. mmdeploy-1.3.0 windows-sdk 貌似还是用onnxruntime 1.8.1编译的。所以如果用这个sdk的话,需要使用包里的onnxruntime)

那官方的教程没更新啊,他推荐的mmdeploy-1.3.1,对应的还是onnxruntime 1.8.1,这是个坑。