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
683ceafb
"...api/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "9c357bda3f0982889d59f7053de38de0dc8038ef"
Unverified
Commit
683ceafb
authored
Jun 10, 2021
by
Ziyi Wu
Committed by
GitHub
Jun 10, 2021
Browse files
fix rotation hack (#633)
parent
e39d1984
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
mmdet3d/core/bbox/structures/utils.py
mmdet3d/core/bbox/structures/utils.py
+4
-2
No files found.
mmdet3d/core/bbox/structures/utils.py
View file @
683ceafb
...
@@ -176,8 +176,10 @@ def mono_cam_box2vis(cam_box):
...
@@ -176,8 +176,10 @@ def mono_cam_box2vis(cam_box):
# change local yaw to global yaw for visualization
# change local yaw to global yaw for visualization
# refer to https://github.com/open-mmlab/mmdetection3d/blob/master/mmdet3d/datasets/nuscenes_mono_dataset.py#L164-L166 # noqa
# refer to https://github.com/open-mmlab/mmdetection3d/blob/master/mmdet3d/datasets/nuscenes_mono_dataset.py#L164-L166 # noqa
yaw
+=
torch
.
atan2
(
loc
[:,
0
],
loc
[:,
2
])
yaw
+=
torch
.
atan2
(
loc
[:,
0
],
loc
[:,
2
])
# convert yaw by (np.pi / 2 - yaw)
# convert yaw by (-yaw - np.pi / 2)
yaw
=
np
.
pi
/
2.0
-
yaw
# this is because mono 3D box class such as `NuScenesBox` has different
# definition of rotation with our `CameraInstance3DBoxes`
yaw
=
-
yaw
-
np
.
pi
/
2
cam_box
=
torch
.
cat
([
loc
,
dim
,
yaw
[:,
None
],
feats
],
dim
=
1
)
cam_box
=
torch
.
cat
([
loc
,
dim
,
yaw
[:,
None
],
feats
],
dim
=
1
)
cam_box
=
CameraInstance3DBoxes
(
cam_box
=
CameraInstance3DBoxes
(
cam_box
,
box_dim
=
cam_box
.
shape
[
-
1
],
origin
=
(
0.5
,
0.5
,
0.5
))
cam_box
,
box_dim
=
cam_box
.
shape
[
-
1
],
origin
=
(
0.5
,
0.5
,
0.5
))
...
...
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