From ddb33c9c0bed46707fdda4aca2263bad164adaa7 Mon Sep 17 00:00:00 2001 From: Tai-Wang Date: Mon, 26 Apr 2021 16:37:14 +0800 Subject: [PATCH] Fix the origin setting caused by an adjustment from #283 --- mmdet3d/models/dense_heads/fcos_mono3d_head.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mmdet3d/models/dense_heads/fcos_mono3d_head.py b/mmdet3d/models/dense_heads/fcos_mono3d_head.py index e9d4902890..ad2c19c761 100644 --- a/mmdet3d/models/dense_heads/fcos_mono3d_head.py +++ b/mmdet3d/models/dense_heads/fcos_mono3d_head.py @@ -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