Skip to content

Commit

Permalink
Fix the origin setting caused by an adjustment from open-mmlab#283
Browse files Browse the repository at this point in the history
  • Loading branch information
Tai-Wang committed Apr 26, 2021
1 parent f7356f4 commit ddb33c9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mmdet3d/models/dense_heads/fcos_mono3d_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,10 +678,12 @@ def _get_bboxes_single(self,
mlvl_attr_scores)
bboxes, scores, labels, dir_scores, attrs = results
attrs = attrs.to(labels.dtype) # change data type to int
bboxes = input_meta['box_type_3d'](bboxes, box_dim=self.bbox_code_size)
bboxes = input_meta['box_type_3d'](
bboxes, box_dim=self.bbox_code_size, origin=(0.5, 0.5, 0.5))
# Note that the predictions use origin (0.5, 0.5, 0.5)
# Due to the ground truth centers2d are the gravity center of objects
# The center has been transformed when computing bev bbox!!!!
# v0.10.0 fix inplace operation to the input tensor of cam_box3d
# So here we also need to add origin=(0.5, 0.5, 0.5)
if not self.pred_attrs:
attrs = None

Expand Down

0 comments on commit ddb33c9

Please sign in to comment.