Skip to content

Commit dea954e

Browse files
authored
[Fix]: remove DepthInstance3DBoxes.overlaps (#1556)
1 parent 7d0011d commit dea954e

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

mmdet3d/core/bbox/structures/depth_box3d.py

-29
Original file line numberDiff line numberDiff line change
@@ -268,32 +268,3 @@ def get_surface_line_center(self):
268268
line_center = center.repeat(1, 12, 1).reshape(-1, 3) + line_3d
269269

270270
return surface_center, line_center
271-
272-
@classmethod
273-
def overlaps(cls, boxes1, boxes2, mode='iou'):
274-
"""Calculate 3D overlaps of two boxes.
275-
276-
Note:
277-
This function calculates the overlaps between ``boxes1`` and
278-
``boxes2``, ``boxes1`` and ``boxes2`` should be in the same type.
279-
Args:
280-
boxes1 (:obj:`BaseInstance3DBoxes`): Boxes 1 contain N boxes.
281-
boxes2 (:obj:`BaseInstance3DBoxes`): Boxes 2 contain M boxes.
282-
mode (str, optional): Mode of iou calculation. Defaults to 'iou'.
283-
Returns:
284-
torch.Tensor: Calculated 3D overlaps of the boxes.
285-
"""
286-
# We flip yaw angle here as mmcv.ops.box_iou_rotated accepts
287-
# it in anti-clockwise direction.
288-
if boxes1.with_yaw:
289-
tensor1 = torch.cat(
290-
(boxes1.tensor[:, :-1], -boxes1.tensor[:, -1:]), dim=-1)
291-
boxes1 = DepthInstance3DBoxes(
292-
tensor1, box_dim=boxes1.box_dim, with_yaw=boxes1.with_yaw)
293-
if boxes2.with_yaw:
294-
tensor2 = torch.cat(
295-
(boxes2.tensor[:, :-1], -boxes2.tensor[:, -1:]), dim=-1)
296-
boxes2 = DepthInstance3DBoxes(
297-
tensor2, box_dim=boxes2.box_dim, with_yaw=boxes2.with_yaw)
298-
299-
return super().overlaps(boxes1, boxes2)

0 commit comments

Comments
 (0)