mit-han-lab / bevfusion

[ICRA'23] BEVFusion: Multi-Task Multi-Sensor Fusion with Unified Bird's-Eye View Representation
https://bevfusion.mit.edu
Apache License 2.0
2.37k stars 428 forks source link

error for segmentation models in training and test #538

Closed heli223 closed 1 year ago

heli223 commented 1 year ago

when i run the commands for segmentation with any model (camera-only, lidar-only, bevfusion), it will occur errors. 1. For training, its error is about File "/home/bevfusion-main/mmdet3d/datasets/pipelines/transforms_3d.py", line 218, in call data["radar"].rotate(-theta) AttributeError: 'dict' object has no attribute 'rotate'

2. For test, its error is about File "/home/bevfusion-main/mmdet3d/datasets/pipelines/loading.py", line 294, in call location = data["location"] KeyError: 'location'

can you help me with this? thanks!

Yunge6666 commented 1 year ago

I have the same 'location' error. Have you solved this problem?

heli223 commented 1 year ago

I have the same 'location' error. Have you solved this problem? I used an environment build by my friend, and it is okay now. Maybe I think it is because the versions of different packages. I don't know which packages are the reasons since the most important packages are the same.

971022jing commented 11 months ago

when i run the commands for segmentation with any model (camera-only, lidar-only, bevfusion), it will occur errors. 1. For training, its error is about File "/home/bevfusion-main/mmdet3d/datasets/pipelines/transforms_3d.py", line 218, in call data["radar"].rotate(-theta) AttributeError: 'dict' object has no attribute 'rotate'

2. For test, its error is about File "/home/bevfusion-main/mmdet3d/datasets/pipelines/loading.py", line 294, in call location = data["location"] KeyError: 'location'

can you help me with this? thanks!

hello,have you solved the problems?

heli223 commented 11 months ago

when i run the commands for segmentation with any model (camera-only, lidar-only, bevfusion), it will occur errors. 1. For training, its error is about File "/home/bevfusion-main/mmdet3d/datasets/pipelines/transforms_3d.py", line 218, in call data["radar"].rotate(-theta) AttributeError: 'dict' object has no attribute 'rotate' 2. For test, its error is about File "/home/bevfusion-main/mmdet3d/datasets/pipelines/loading.py", line 294, in call location = data["location"] KeyError: 'location' can you help me with this? thanks!

hello,have you solved the problems?

No, I did not solve it. I used an old version of the code at https://gitee.com/linClubs/bevfusion. Maybe you can have a look.

EpicGilgamesh commented 11 months ago

@heli223 you had just downloaded this older version and everything is working fine? I'm fighting rn for over a month with BEVFusion, because I need it for my engineer thesis and after fixing one thing there is always another... I see that it has newer commits that the one here, you downloaded whole new repo or just multiple files? Also if you could list used packages pls

heli223 commented 10 months ago

you had just downloaded this older version and everything is working fine? I'm fighting rn for over a month with BEVFusion, because I need it for my engineer thesis and after fixing one thing there is always another... I see that it has newer commits that the one here, you downloaded whole new repo or just multiple files? Also if you could list used packages pls

@EpicGilgamesh I download the whole repo at https://gitee.com/linClubs/bevfusion and use it according to the following link: https://zhuanlan.zhihu.com/p/649200166

CaveSpiderLZJ commented 10 months ago

To solve the first error, you can just comment these lines in mmdet3d -> datasets -> pipelines -> transforms_3d.py -> GlobalRotScaleTrans -> __call__ like this:

if "points" in data:
    data["points"].rotate(-theta)
    data["points"].translate(translation)
    data["points"].scale(scale)

# if "radar" in data:
#     data["radar"].rotate(-theta)
#     data["radar"].translate(translation)
#     data["radar"].scale(scale)

gt_boxes = data["gt_bboxes_3d"]
rotation = rotation @ gt_boxes.rotate(theta).numpy()
gt_boxes.translate(translation)
gt_boxes.scale(scale)
data["gt_bboxes_3d"] = gt_boxes