mmdetection3d
mmdetection3d copied to clipboard
Some bugs in the multi-modality demo in the 1.1 branch
Thanks for your error report and we appreciate it a lot.
Checklist
- I have searched related issues but cannot get the expected help.
- The bug has not been fixed in the latest version.
Describe the bug I followed the guide in inference.md and could not run the multi-modality demo successfullly:
Traceback (most recent call last):
File "demo/multi_modality_demo.py", line 75, in <module>
main(args)
File "demo/multi_modality_demo.py", line 53, in main
result, data = inference_multi_modality_detector(model, args.pcd, args.img,
File "/home/PJLAB/zhangjingwei/code/mmdetection3d/mmdet3d/apis/inference.py", line 216, in inference_multi_modality_detector
data_list = mmengine.load(ann_file)['data_list']
TypeError: list indices must be integers or slices, not str
Traceback (most recent call last):
File "demo/multi_modality_demo.py", line 75, in <module>
main(args)
File "demo/multi_modality_demo.py", line 53, in main
result, data = inference_multi_modality_detector(model, args.pcd, args.img,
File "/home/PJLAB/zhangjingwei/code/mmdetection3d/mmdet3d/apis/inference.py", line 223, in inference_multi_modality_detector
img_path = data_info['images'][cam_type]['img_path']
KeyError: 'images'
(Pdb) data_list[0].keys()
dict_keys(['point_cloud', 'pts_path', 'image', 'calib', 'annos', 'bbox_2d'])
(Pdb) data_list[0]['image']
{'image_idx': 17, 'image_shape': array([530, 730], dtype=int32), 'image_path': 'image/000017.jpg'}
Reproduction
- What command or script did you run?
A placeholder for the command.
- Did you make any modifications on the code or config? Did you understand what you have modified?
- What dataset did you use?
Environment
- Please run
python mmdet3d/utils/collect_env.py
to collect necessary environment information and paste it here. - You may add addition that may be helpful for locating the problem, such as
- How you installed PyTorch [e.g., pip, conda, source]
- Other environment variables that may be related (such as
$PATH
,$LD_LIBRARY_PATH
,$PYTHONPATH
, etc.)
Error traceback If applicable, paste the error trackback here.
A placeholder for trackback.
Bug fix If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!
The refactored demo script needs the new data format pkl info file. What is your runnning command?
I try with python demo/multi_modality_demo.py demo/data/sunrgbd/sunrgbd_000017.bin demo/data/sunrgbd/sunrgbd_000017.jpg demo/data/sunrgbd/sunrgbd_000017_infos.pkl projects/TR3D/configs/tr3d_1xb16_sunrgbd-3d-10class.py weights/TR3D/tr3d_1xb16_sunrgbd-3d-10class.pth --show
Got the same error. Any suggestion?
I had the same problem on the main branch, did you guys solve it?