mmdetection3d icon indicating copy to clipboard operation
mmdetection3d copied to clipboard

Some bugs in the multi-modality demo in the 1.1 branch

Open JingweiZhang12 opened this issue 1 year ago • 1 comments

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

Checklist

  1. I have searched related issues but cannot get the expected help.
  2. 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

  1. What command or script did you run?
A placeholder for the command.
  1. Did you make any modifications on the code or config? Did you understand what you have modified?
  2. What dataset did you use?

Environment

  1. Please run python mmdet3d/utils/collect_env.py to collect necessary environment information and paste it here.
  2. 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!

JingweiZhang12 avatar Sep 03 '22 03:09 JingweiZhang12

The refactored demo script needs the new data format pkl info file. What is your runnning command?

ZCMax avatar Sep 07 '22 11:09 ZCMax

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?

Bitfultea avatar May 23 '23 10:05 Bitfultea

I had the same problem on the main branch, did you guys solve it?

xifen523 avatar May 26 '23 13:05 xifen523