Skip to content

[Bug] An error occurs when converting RTMDet-INS to ONNX. #2925

Open

Description

@FT-Gyeongsu

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

11/12 10:11:11 - mmengine - INFO - Start pipeline mmdeploy.apis.pytorch2onnx.torch2onnx in subprocess
11/12 10:11:13 - mmengine - WARNING - Failed to search registry with scope "mmdet" 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 "mmdet" is a correct scope, or whether the registry is initialized.
11/12 10:11:13 - mmengine - WARNING - Failed to search registry with scope "mmdet" in the "mmdet_tasks" registry tree. As a workaround, the current "mmdet_tasks" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmdet" is a correct scope, or whether the registry is initialized.
Loads checkpoint by local backend from path: ./convert/seg_rtmdet_test.pth
Process Process-2:
Traceback (most recent call last):
  File "C:\Users\software\anaconda3\envs\mmdeploy_test\lib\multiprocessing\process.py", line 314, in _bootstrap
    self.run()
  File "C:\Users\software\anaconda3\envs\mmdeploy_test\lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\software\anaconda3\envs\mmdeploy_test\lib\site-packages\mmdeploy\apis\core\pipeline_manager.py", line 107, in __call__
    ret = func(*args, **kwargs)
  File "C:\Users\software\anaconda3\envs\mmdeploy_test\lib\site-packages\mmdeploy\apis\pytorch2onnx.py", line 64, in torch2onnx
    data, model_inputs = task_processor.create_input(
  File "C:\Users\software\anaconda3\envs\mmdeploy_test\lib\site-packages\mmdeploy\codebase\mmdet\deploy\object_detection.py", line 192, in create_input
    cfg = process_model_config(self.model_cfg, imgs, input_shape)
  File "C:\Users\software\anaconda3\envs\mmdeploy_test\lib\site-packages\mmdeploy\codebase\mmdet\deploy\object_detection.py", line 78, in process_model_config
    pipeline = [
  File "C:\Users\software\anaconda3\envs\mmdeploy_test\lib\site-packages\mmdeploy\codebase\mmdet\deploy\object_detection.py", line 80, in <listcomp>
    if transform.type != 'LoadAnnotations'
AttributeError: 'list' object has no attribute 'type'
11/12 10:11:14 - mmengine - ERROR - C:\Users\software\anaconda3\envs\mmdeploy_test\lib\site-packages\mmdeploy\apis\core\pipeline_manager.py - pop_mp_output - 80 - `mmdeploy.apis.pytorch2onnx.torch2onnx` with Call id: 0 failed. exit.`

The ONNX conversion works fine for the RTMDet model, but issues occur only with RTMDet-INS.

Reproduction

python ..\mmdeploy\tools\deploy.py ../mmdeploy/configs/mmdet/instance-seg/instance-seg_rtmdet-ins_onnxruntime_static-640x640.py ./convert/seg_rtmdet_test_config.py ./convert/seg_rtmdet_test.pth ./convert/test.jpg --work-dir ./convert --device cpu

Environment

11/12 10:11:59 - mmengine - INFO - **********Environmental information**********
11/12 10:12:04 - mmengine - INFO - sys.platform: win32
11/12 10:12:04 - mmengine - INFO - Python: 3.10.19 | packaged by Anaconda, Inc. | (main, Oct 21 2025, 16:41:31) [MSC v.1929 64 bit (AMD64)]
11/12 10:12:04 - mmengine - INFO - CUDA available: True
11/12 10:12:04 - mmengine - INFO - MUSA available: False
11/12 10:12:04 - mmengine - INFO - numpy_random_seed: 2147483648
11/12 10:12:04 - mmengine - INFO - GPU 0,1: NVIDIA GeForce RTX 4090
11/12 10:12:04 - mmengine - INFO - CUDA_HOME: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8
11/12 10:12:04 - mmengine - INFO - NVCC: Cuda compilation tools, release 12.8, V12.8.61
11/12 10:12:04 - mmengine - INFO - MSVC: Microsoft (R) C/C++ 최적화 컴파일러 버전 19.44.35207.1(x64)
11/12 10:12:04 - mmengine - INFO - GCC: n/a
11/12 10:12:04 - mmengine - INFO - PyTorch: 2.3.0
11/12 10:12:04 - mmengine - INFO - PyTorch compiling details: PyTorch built with:
  - C++ Version: 201703
  - MSVC 192930151
  - Intel(R) oneAPI Math Kernel Library Version 2021.4-Product Build 20210904 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v3.3.6 (Git Hash 86e6af5974177e513fd3fee58425e1063e7f1361)
  - OpenMP 2019
  - LAPACK is enabled (usually provided by MKL)
  - CPU capability usage: AVX512
  - CUDA Runtime 12.1
  - NVCC architecture flags: -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_90,code=sm_90
  - CuDNN 8.8.1  (built against CUDA 12.0)
  - Magma 2.5.4
  - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=12.1, CUDNN_VERSION=8.8.1, CXX_COMPILER=C:/cb/pytorch_1000000000000/work/tmp_bin/sccache-cl.exe, CXX_FLAGS=/DWIN32 /D_WINDOWS /GR /EHsc /Zc:__cplusplus /bigobj /FS /utf-8 -DUSE_PTHREADPOOL -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DLIBKINETO_NOROCTRACER -DUSE_FBGEMM -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE /wd4624 /wd4068 /wd4067 /wd4267 /wd4661 /wd4717 /wd4244 /wd4804 /wd4273, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=2.3.0, USE_CUDA=ON, USE_CUDNN=ON, USE_CUSPARSELT=OFF, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_GLOO=ON, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=OFF, USE_NNPACK=OFF, USE_OPENMP=ON, USE_ROCM=OFF, USE_ROCM_KERNEL_ASSERT=OFF, 

11/12 10:12:04 - mmengine - INFO - TorchVision: 0.18.0
11/12 10:12:04 - mmengine - INFO - OpenCV: 4.12.0
11/12 10:12:04 - mmengine - INFO - MMEngine: 0.10.7
11/12 10:12:04 - mmengine - INFO - MMCV: 2.2.0
11/12 10:12:04 - mmengine - INFO - MMCV Compiler: MSVC 192930148
11/12 10:12:04 - mmengine - INFO - MMCV CUDA Compiler: 12.1
11/12 10:12:04 - mmengine - INFO - MMDeploy: 1.3.1+unknown
11/12 10:12:04 - mmengine - INFO -

11/12 10:12:04 - mmengine - INFO - **********Backend information**********
11/12 10:12:04 - mmengine - INFO - tensorrt:    None
11/12 10:12:04 - mmengine - INFO - ONNXRuntime: None
11/12 10:12:04 - mmengine - INFO - ONNXRuntime-gpu:     1.22.0
11/12 10:12:04 - mmengine - INFO - ONNXRuntime custom ops:      Available
11/12 10:12:04 - mmengine - INFO - pplnn:       None
11/12 10:12:04 - mmengine - INFO - ncnn:        None
11/12 10:12:04 - mmengine - INFO - snpe:        None
11/12 10:12:04 - mmengine - INFO - openvino:    None
11/12 10:12:04 - mmengine - INFO - torchscript: 2.3.0+cu121
11/12 10:12:04 - mmengine - INFO - torchscript custom ops:      NotAvailable
11/12 10:12:04 - mmengine - INFO - rknn-toolkit:        None
11/12 10:12:04 - mmengine - INFO - rknn-toolkit2:       None
11/12 10:12:04 - mmengine - INFO - ascend:      None
11/12 10:12:04 - mmengine - INFO - coreml:      None
11/12 10:12:04 - mmengine - INFO - tvm: None
11/12 10:12:04 - mmengine - INFO - vacc:        None
11/12 10:12:04 - mmengine - INFO -

11/12 10:12:04 - mmengine - INFO - **********Codebase information**********
11/12 10:12:04 - mmengine - INFO - mmdet:       3.3.0
11/12 10:12:04 - mmengine - INFO - mmseg:       None
11/12 10:12:04 - mmengine - INFO - mmpretrain:  None
11/12 10:12:04 - mmengine - INFO - mmocr:       None
11/12 10:12:04 - mmengine - INFO - mmagic:      None
11/12 10:12:04 - mmengine - INFO - mmdet3d:     None
11/12 10:12:04 - mmengine - INFO - mmpose:      None
11/12 10:12:04 - mmengine - INFO - mmrotate:    None
11/12 10:12:04 - mmengine - INFO - mmaction:    None
11/12 10:12:04 - mmengine - INFO - mmrazor:     None
11/12 10:12:04 - mmengine - INFO - mmyolo:      None

Error traceback

Activity

  1. Petros626 commented on Nov 18, 2025

    @Petros626
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions