Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
mmdetection3d
Commits
dea954e5
Unverified
Commit
dea954e5
authored
Jun 14, 2022
by
Danila Rukhovich
Committed by
GitHub
Jun 14, 2022
Browse files
[Fix]: remove DepthInstance3DBoxes.overlaps (#1556)
parent
7d0011d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
29 deletions
+0
-29
mmdet3d/core/bbox/structures/depth_box3d.py
mmdet3d/core/bbox/structures/depth_box3d.py
+0
-29
No files found.
mmdet3d/core/bbox/structures/depth_box3d.py
View file @
dea954e5
...
@@ -268,32 +268,3 @@ class DepthInstance3DBoxes(BaseInstance3DBoxes):
...
@@ -268,32 +268,3 @@ class DepthInstance3DBoxes(BaseInstance3DBoxes):
line_center
=
center
.
repeat
(
1
,
12
,
1
).
reshape
(
-
1
,
3
)
+
line_3d
line_center
=
center
.
repeat
(
1
,
12
,
1
).
reshape
(
-
1
,
3
)
+
line_3d
return
surface_center
,
line_center
return
surface_center
,
line_center
@
classmethod
def
overlaps
(
cls
,
boxes1
,
boxes2
,
mode
=
'iou'
):
"""Calculate 3D overlaps of two boxes.
Note:
This function calculates the overlaps between ``boxes1`` and
``boxes2``, ``boxes1`` and ``boxes2`` should be in the same type.
Args:
boxes1 (:obj:`BaseInstance3DBoxes`): Boxes 1 contain N boxes.
boxes2 (:obj:`BaseInstance3DBoxes`): Boxes 2 contain M boxes.
mode (str, optional): Mode of iou calculation. Defaults to 'iou'.
Returns:
torch.Tensor: Calculated 3D overlaps of the boxes.
"""
# We flip yaw angle here as mmcv.ops.box_iou_rotated accepts
# it in anti-clockwise direction.
if
boxes1
.
with_yaw
:
tensor1
=
torch
.
cat
(
(
boxes1
.
tensor
[:,
:
-
1
],
-
boxes1
.
tensor
[:,
-
1
:]),
dim
=-
1
)
boxes1
=
DepthInstance3DBoxes
(
tensor1
,
box_dim
=
boxes1
.
box_dim
,
with_yaw
=
boxes1
.
with_yaw
)
if
boxes2
.
with_yaw
:
tensor2
=
torch
.
cat
(
(
boxes2
.
tensor
[:,
:
-
1
],
-
boxes2
.
tensor
[:,
-
1
:]),
dim
=-
1
)
boxes2
=
DepthInstance3DBoxes
(
tensor2
,
box_dim
=
boxes2
.
box_dim
,
with_yaw
=
boxes2
.
with_yaw
)
return
super
().
overlaps
(
boxes1
,
boxes2
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment