open-mmlab / mmdetection3d

OpenMMLab's next-generation platform for general 3D object detection.
https://mmdetection3d.readthedocs.io/en/latest/
Apache License 2.0
5k stars 1.5k forks source link

[Bug] Run multi-modality demo, but got KeyError: 'CAM2' #2881

Open TonyTnT opened 5 months ago

TonyTnT commented 5 months ago

Prerequisite

Task

I'm using the official example scripts/configs for the officially supported tasks/models/datasets.

Branch

1.x branch https://github.com/open-mmlab/mmdetection3d/tree/dev-1.x

Environment

torch 1.13.1+cu116 pypi_0 pypi torchaudio 0.13.1+cu116 pypi_0 pypi mmcv 2.1.0 pypi_0 pypi mmdet 3.3.0 pypi_0 pypi mmdet3d 1.4.0 dev_0 mmengine 0.10.2 pypi_0 pypi

Reproduces the problem - code sample

image

Reproduces the problem - command or script

(openmmlab) chenx2ovo@chenx2ovo-C246-WU4:~/mmdetection3d$ python demo/multi_modality_demo.py demo/data/sunrgbd/000017.bin demo/data/sunrgbd/000017.jpg demo/data/sunrgbd/sunrgbd_000017_infos.pkl configs/imvotenet/imvotenet_stage2_8xb16_sunrgbd-3d.py checkpoints/imvotenet_stage2_16x8_sunrgbd-3d-10class_20210819_192851-1bcd1b97.pth --cam-type CAM0

Reproduces the problem - error message

/home/chenx2ovo/anaconda3/envs/openmmlab/lib/python3.8/site-packages/mmcv/cnn/bricks/conv_module.py:208: UserWarning: Unnecessary conv bias before batch/instance norm warnings.warn( Loads checkpoint by local backend from path: checkpoints/imvotenet_stage2_16x8_sunrgbd-3d-10class_20210819_192851-1bcd1b97.pth 01/12 10:07:43 - mmengine - WARNING - Failed to search registry with scope "mmdet3d" in the "function" registry tree. As a workaround, the current "function" registry in "mmengine" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmdet3d" is a correct scope, or whether the registry is initialized. /home/chenx2ovo/anaconda3/envs/openmmlab/lib/python3.8/site-packages/mmengine/visualization/visualizer.py:196: UserWarning: Failed to add <class 'mmengine.visualization.vis_backend.LocalVisBackend'>, please provide the save_dir argument. warnings.warn(f'Failed to add {vis_backend.class}, ' Traceback (most recent call last): File "demo/multi_modality_demo.py", line 101, in main() File "demo/multi_modality_demo.py", line 91, in main inferencer(**call_args) File "/home/chenx2ovo/mmdetection3d/mmdet3d/apis/inferencers/base_3d_inferencer.py", line 204, in call ori_inputs = self._inputs_to_list(inputs, cam_type=cam_type) File "/home/chenx2ovo/mmdetection3d/mmdet3d/apis/inferencers/multi_modality_det3d_inferencer.py", line 117, in _inputs_to_list img_path = data_info['images'][cam_type]['img_path'] KeyError: 'CAM2'

Additional information

it seems that the argpraser cam type doesnot take effect