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
1c1de9a5
Commit
1c1de9a5
authored
Jul 07, 2020
by
liyinhao
Committed by
zhangwenwei
Jul 07, 2020
Browse files
Add_bbox_unittest
parent
beae2426
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
300 additions
and
35 deletions
+300
-35
mmdet3d/core/bbox/structures/utils.py
mmdet3d/core/bbox/structures/utils.py
+0
-1
tests/test_box3d.py
tests/test_box3d.py
+300
-34
No files found.
mmdet3d/core/bbox/structures/utils.py
View file @
1c1de9a5
...
@@ -126,7 +126,6 @@ def points_cam2img(points_3d, proj_mat):
...
@@ -126,7 +126,6 @@ def points_cam2img(points_3d, proj_mat):
# previous implementation use new_zeros, new_one yeilds better results
# previous implementation use new_zeros, new_one yeilds better results
points_4
=
torch
.
cat
(
points_4
=
torch
.
cat
(
[
points_3d
,
points_3d
.
new_ones
(
*
points_shape
)],
dim
=-
1
)
[
points_3d
,
points_3d
.
new_ones
(
*
points_shape
)],
dim
=-
1
)
# point_2d = points_4 @ tf.transpose(proj_mat, [1, 0])
point_2d
=
torch
.
matmul
(
points_4
,
proj_mat
.
t
())
point_2d
=
torch
.
matmul
(
points_4
,
proj_mat
.
t
())
point_2d_res
=
point_2d
[...,
:
2
]
/
point_2d
[...,
2
:
3
]
point_2d_res
=
point_2d
[...,
:
2
]
/
point_2d
[...,
2
:
3
]
return
point_2d_res
return
point_2d_res
tests/test_box3d.py
View file @
1c1de9a5
This diff is collapsed.
Click to expand it.
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