facebookresearch / 3detr

Code & Models for 3DETR - an End-to-end transformer model for 3D object detection
Apache License 2.0
629 stars 79 forks source link

hang on bacause targets["num_boxes_replica"]=0 #46

Closed yangcaoai closed 2 years ago

yangcaoai commented 2 years ago

Hi, dear author, thanks for the excellent work!

When I try to train 3detr with 8 gpus. I found the training is hang on after some iterations. Then I found that the reason is that targets["num_boxes_replica"]=0. But I am curious that why it will become 0

Looking forward to your reply. Thanks.

yangcaoai commented 2 years ago

I found the reasons. Some images from SUNRGB-D have no objects. So there are no box labels.

yxchng commented 8 months ago

@yangcaoai how do you resolve this error?

yangcaoai commented 8 months ago

@yangcaoai how do you resolve this error?

@yxchng When encountering input data batch without labels, I skipped the loss computation in this way: https://github.com/yangcaoai/CoDA_NeurIPS2023/blob/main/criterion.py#L216