Skip to content

Commit

Permalink
add else case
Browse files Browse the repository at this point in the history
  • Loading branch information
filaPro committed Apr 24, 2022
1 parent 0b41406 commit a2ae474
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mmdet3d/models/dense_heads/point_rpn_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,11 @@ def class_agnostic_nms(self, obj_scores, sem_scores, bbox, points,
score_selected = obj_scores_nms[keep]
cls_preds = sem_scores_nms[keep]
labels = torch.argmax(cls_preds, -1)
else:
bbox_selected = bbox.tensor
score_selected = obj_scores.new_zeros([0])
labels = obj_scores.new_zeros([0])
cls_preds = obj_scores.new_zeros([0, sem_scores.shape[-1]])

return bbox_selected, score_selected, labels, cls_preds

Expand Down

0 comments on commit a2ae474

Please sign in to comment.