Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] mmdeploy1.3.1导出onnx后,推理结果跟pytorch没法对齐 #2840

Open
3 tasks
yangzhiyin opened this issue Nov 14, 2024 · 0 comments
Open
3 tasks

Comments

@yangzhiyin
Copy link

Checklist

  • I have searched related issues but cannot get the expected help.
  • 2. I have read the FAQ documentation but cannot get the expected help.
  • 3. The bug has not been fixed in the latest version.

Describe the bug

mmdeploy1.3.1,导出faster-rcnn hr18的onnx模型后,用onnxruntime跑推理,出现没法和pytorch对齐问题。像素偏差5个像素。

Reproduction

https://github.com/open-mmlab/mmdetection/tree/main/configs/hrnet

Environment

(mmdeploy) F:\youtu\ocr\test\PaddleOCR-plus>python F:\youtu\sdk\mmdeploy\tools/check_env.py
11/14 20:22:07 - mmengine - INFO -

11/14 20:22:07 - mmengine - INFO - **********Environmental information**********
11/14 20:22:19 - mmengine - INFO - sys.platform: win32
11/14 20:22:19 - mmengine - INFO - Python: 3.9.19 (main, May  6 2024, 20:12:36) [MSC v.1916 64 bit (AMD64)]
11/14 20:22:19 - mmengine - INFO - CUDA available: False
11/14 20:22:19 - mmengine - INFO - MUSA available: False
11/14 20:22:19 - mmengine - INFO - numpy_random_seed: 2147483648
11/14 20:22:19 - mmengine - INFO - MSVC: 用于 x64 的 Microsoft (R) C/C++ 优化编译器 19.39.33523 版
11/14 20:22:19 - mmengine - INFO - GCC: n/a
11/14 20:22:19 - mmengine - INFO - PyTorch: 1.12.1
11/14 20:22:19 - mmengine - INFO - PyTorch compiling details: PyTorch built with:
  - C++ Version: 199711
  - MSVC 192829337
  - Intel(R) Math Kernel Library Version 2020.0.2 Product Build 20200624 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v2.6.0 (Git Hash 52b5f107dd9cf10910aaa19cb47f3abf9b349815)
  - OpenMP 2019
  - LAPACK is enabled (usually provided by MKL)
  - CPU capability usage: AVX2
  - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CXX_COMPILER=C:/cb/pytorch_1000000000000/work/tmp_bin/sccache-cl.exe, CXX_FLAGS=/DWIN32 /D_WINDOWS /GR /EHsc /w /bigobj -DUSE_PTHREADPOOL -openmp:experimental -IC:/cb/pytorch_1000000000000/work/mkl/include -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.12.1, USE_CUDA=0, USE_CUDNN=OFF, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=OFF, USE_MPI=OFF, USE_NCCL=OFF, USE_NNPACK=OFF, USE_OPENMP=ON, USE_ROCM=OFF,

11/14 20:22:19 - mmengine - INFO - TorchVision: 0.13.1
11/14 20:22:19 - mmengine - INFO - OpenCV: 4.10.0
11/14 20:22:19 - mmengine - INFO - MMEngine: 0.10.4
11/14 20:22:19 - mmengine - INFO - MMCV: 2.0.1
11/14 20:22:19 - mmengine - INFO - MMCV Compiler: MSVC 192930148
11/14 20:22:19 - mmengine - INFO - MMCV CUDA Compiler: not available
11/14 20:22:19 - mmengine - INFO - MMDeploy: 1.3.1+255690a
11/14 20:22:19 - mmengine - INFO -

11/14 20:22:19 - mmengine - INFO - **********Backend information**********
11/14 20:22:19 - mmengine - INFO - tensorrt:    None
11/14 20:22:20 - mmengine - INFO - ONNXRuntime: 1.19.2
11/14 20:22:20 - mmengine - INFO - ONNXRuntime-gpu:     None
11/14 20:22:20 - mmengine - INFO - ONNXRuntime custom ops:      Available
11/14 20:22:20 - mmengine - INFO - pplnn:       None
11/14 20:22:20 - mmengine - INFO - ncnn:        None
11/14 20:22:20 - mmengine - INFO - snpe:        None
11/14 20:22:20 - mmengine - INFO - openvino:    None
11/14 20:22:20 - mmengine - INFO - torchscript: 1.12.1
11/14 20:22:20 - mmengine - INFO - torchscript custom ops:      NotAvailable
11/14 20:22:20 - mmengine - INFO - rknn-toolkit:        None
11/14 20:22:20 - mmengine - INFO - rknn-toolkit2:       None
11/14 20:22:20 - mmengine - INFO - ascend:      None
11/14 20:22:20 - mmengine - INFO - coreml:      None
11/14 20:22:20 - mmengine - INFO - tvm: None
11/14 20:22:20 - mmengine - INFO - vacc:        None
11/14 20:22:20 - mmengine - INFO -

11/14 20:22:20 - mmengine - INFO - **********Codebase information**********
11/14 20:22:20 - mmengine - INFO - mmdet:       3.1.0
11/14 20:22:20 - mmengine - INFO - mmseg:       None
11/14 20:22:20 - mmengine - INFO - mmpretrain:  1.2.0
11/14 20:22:20 - mmengine - INFO - mmocr:       None
11/14 20:22:20 - mmengine - INFO - mmagic:      None
11/14 20:22:20 - mmengine - INFO - mmdet3d:     None
11/14 20:22:20 - mmengine - INFO - mmpose:      None
11/14 20:22:20 - mmengine - INFO - mmrotate:    None
11/14 20:22:20 - mmengine - INFO - mmaction:    None
11/14 20:22:20 - mmengine - INFO - mmrazor:     None
11/14 20:22:20 - mmengine - INFO - mmyolo:      None

Error traceback

No response

@yangzhiyin yangzhiyin changed the title [Bug] mmdeploy1.3.1导出onnx后,推理结果没法对齐 [Bug] mmdeploy1.3.1导出onnx后,推理结果跟pytorch没法对齐 Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant