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

Fix for BEVFusion HungarianAssigner3D #2911

Open ScriptumVeritas opened 4 months ago

ScriptumVeritas commented 4 months ago

Motivation

In case of no ground truth, the HungarianAssigner3D in the BEVFusion project returns 'None' instead of a tensor. This will rise an error in the following code of the transfusion_head.py running: max_overlaps=torch.cat([res.max_overlaps for res in assign_result_list]),

Modification

return a tensor with zeros for max_overlaps if there is no ground truth or no bounding boxes. In case both are 0, an empty tensor is returned which still provides better compatibility

Use cases (Optional)

no error in cases where no ground truth or no bounding box is given.

CLAassistant commented 4 months ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

:white_check_mark: chbehrens
:x: Fabian


Fabian seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.