Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for BEVFusion HungarianAssigner3D #2911

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mmdet3d/datasets/transforms/dbsampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def sample_all(self,
s_points_list.append(s_points)

gt_labels = np.array([self.cat2label[s['name']] for s in sampled],
dtype=np.long)
dtype=np.int64)

if ground_plane is not None:
xyz = sampled_gt_bboxes[:, :3]
Expand Down
9 changes: 8 additions & 1 deletion projects/BEVFusion/bevfusion/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,15 @@ def assign(self, bboxes, gt_bboxes, gt_labels, cls_pred, train_cfg):
if num_gts == 0:
# No ground truth, assign all to background
assigned_gt_inds[:] = 0
max_overlaps = torch.zeros(
max(num_gts, num_bboxes),
device=bboxes.device,
dtype=torch.float32)
return AssignResult(
num_gts, assigned_gt_inds, None, labels=assigned_labels)
num_gts,
assigned_gt_inds,
max_overlaps,
labels=assigned_labels)

# 2. compute the weighted costs
# Hard code here to be compatible with the interface of
Expand Down