XuyangBai / TransFusion

[PyTorch] Official implementation of CVPR2022 paper "TransFusion: Robust LiDAR-Camera Fusion for 3D Object Detection with Transformers". https://arxiv.org/abs/2203.11496
Apache License 2.0
619 stars 76 forks source link

KeyError: 'TransFusionDetector is not in the detector registry' #14

Open niraj-bhujel opened 2 years ago

niraj-bhujel commented 2 years ago

Thanks for your error report and we appreciate it a lot.

Checklist

  1. I have searched related issues but cannot get the expected help.

Reproduction

  1. What command or script did you run?
    python tools/train.py ./configs/transfusion_nusc_voxel_LC.py --work-dir ./work_dir

Environment sys.platform: linux Python: 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34) [GCC 7.3.0] CUDA available: True GPU 0,1: GeForce GTX TITAN X CUDA_HOME: /usr/local/cuda NVCC: Cuda compilation tools, release 10.1, V10.1.105 GCC: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609 PyTorch: 1.6.0+cu101 PyTorch compiling details: PyTorch built with:

TorchVision: 0.7.0+cu101 OpenCV: 4.5.5 MMCV: 1.2.4 MMCV Compiler: GCC 7.3 MMCV CUDA Compiler: 10.1 MMDetection: 2.10.0 MMDetection3D: 0.13.0+5337046

Error traceback

Traceback (most recent call last):
  File "tools/train.py", line 254, in <module>
    main()
  File "tools/train.py", line 176, in main
    test_cfg=cfg.get('test_cfg'))
  File "/workspace/mmdetection3d/mmdet3d/models/builder.py", line 52, in build_detector
    return build(cfg, DETECTORS, dict(train_cfg=train_cfg, test_cfg=test_cfg))
  File "/opt/conda/lib/python3.6/site-packages/mmdet/models/builder.py", line 34, in build
    return build_from_cfg(cfg, registry, default_args)
  File "/opt/conda/lib/python3.6/site-packages/mmcv/utils/registry.py", line 164, in build_from_cfg
    f'{obj_type} is not in the {registry.name} registry')
KeyError: 'TransFusionDetector is not in the detector registry'

Bug fix I think I may have solve the issue after using the similar process of installing MMDetection3D for the TransFusion as well. git clone https://github.com/XuyangBai/TransFusion.git && cd TransFusion && pip install mmcv-full==1.2.4 && pip install mmdet==2.10.0 && pip install -r requirements/build.txt && pip install -v -e . Hope that it helps.

niraj-bhujel commented 2 years ago

I think I may have solve the issue after using the similar process of installing MMDetection3D for the TransFusion as well. git clone https://github.com/XuyangBai/TransFusion.git && cd TransFusion && pip install mmcv-full==1.2.4 && pip install mmdet==2.10.0 && pip install -r requirements/build.txt && pip install -v -e . Hope that it helps.

seungyun1 commented 2 years ago

I think I may have solve the issue after using the similar process of installing MMDetection3D for the TransFusion as well. cd TransFusion && pip install -r requirements/build.txt && pip install -v -e . Hope that it helps.

Hi, The same error occurred and I'm asking the question. cd TransFusion && pip install -r requirements/build.txt && pip install -v -e . Exactly where should I put the 'TransFusion' folder?

seungyun1 commented 2 years ago

I think I may have solve the issue after using the similar process of installing MMDetection3D for the TransFusion as well. git clone https://github.com/XuyangBai/TransFusion.git && cd TransFusion && pip install mmcv-full==1.2.4 && pip install mmdet==2.10.0 && pip install -r requirements/build.txt && pip install -v -e . Hope that it helps.

Can you give me some advice?

The same error is still occurring for me.

As you said, I tried to run 'pip install -v -e.', but there is an error like below.

I don't know what the problem is. I'd appreciate it if anyone could tell me how to solve it.

my version is :

CUDA : 11.1 CUDNN : 8.1.1 gcc : 7.5.0 pytorch : 1.10.2 torchvision : 0.11.3

two gpu gpu 0 : NVIDIA TITAN X gpu 1 : NVIDIA TITAN RTX

error

niraj-bhujel commented 2 years ago

The error is related with CUDA. Can you try with CUDA10.1 and PyTorch1.6.0+cu101?

wangyd-0312 commented 2 years ago

hello, I have the same error.

Traceback (most recent call last):
  File "tools/train.py", line 254, in <module>
    main()
  File "tools/train.py", line 176, in main
    test_cfg=cfg.get('test_cfg'))
  File "/home/zxl/WYD/mmdetection3d/mmdet3d/models/builder.py", line 96, in build_detector
    cfg, default_args=dict(train_cfg=train_cfg, test_cfg=test_cfg))
  File "/home/zxl/anaconda3/envs/wyd-transfusion-1/lib/python3.7/site-packages/mmcv/utils/registry.py", line 212, in build
    return self.build_func(*args, **kwargs, registry=self)
  File "/home/zxl/anaconda3/envs/wyd-transfusion-1/lib/python3.7/site-packages/mmcv/cnn/builder.py", line 27, in build_model_from_cfg
    return build_from_cfg(cfg, registry, default_args)
  File "/home/zxl/anaconda3/envs/wyd-transfusion-1/lib/python3.7/site-packages/mmcv/utils/registry.py", line 45, in build_from_cfg
    f'{obj_type} is not in the {registry.name} registry')
KeyError: 'TransFusionDetector is not in the models registry'

my environment:

sys.platform: linux
Python: 3.7.12 | packaged by conda-forge | (default, Oct 26 2021, 06:08:21) [GCC 9.4.0]
CUDA available: True
GPU 0: NVIDIA GeForce RTX 2080
CUDA_HOME: /usr/local/cuda-10.1
NVCC: Cuda compilation tools, release 10.1, V10.1.105
GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
PyTorch: 1.6.0
PyTorch compiling details: PyTorch built with:
  - GCC 7.3
  - C++ Version: 201402
  - Intel(R) oneAPI Math Kernel Library Version 2021.4-Product Build 20210904 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v1.5.0 (Git Hash e2ac1fac44c5078ca927cb9b90e1b3066a0b2ed0)
  - OpenMP 201511 (a.k.a. OpenMP 4.5)
  - NNPACK is enabled
  - CPU capability usage: AVX2
  - CUDA Runtime 10.1
  - 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_37,code=compute_37
  - CuDNN 7.6.3
  - Magma 2.5.2
  - Build settings: BLAS=MKL, BUILD_TYPE=Release, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DUSE_VULKAN_WRAPPER -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, USE_CUDA=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, USE_STATIC_DISPATCH=OFF, 

TorchVision: 0.7.0
OpenCV: 4.5.5
MMCV: 1.4.8
MMCV Compiler: GCC 7.3
MMCV CUDA Compiler: 10.1
MMDetection: 2.24.1
MMSegmentation: 0.21.0
MMDetection3D: 1.0.0rc2+

I have already installed MMDetection3D ,should I install TransFusion by pip install mmcv-full==1.4.8 && pip install mmdet==2.24.1 && pip install -r requirements/build.txt && pip install -v -e .again and why?

Looking forward to your answers. Thanks a lot.