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
b79f9e67
Unverified
Commit
b79f9e67
authored
Dec 22, 2021
by
Wenhao Wu
Committed by
GitHub
Dec 22, 2021
Browse files
[Fix] Fix SUN RGB-D generation (#1120)
parent
28d21e21
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
tools/data_converter/sunrgbd_data_utils.py
tools/data_converter/sunrgbd_data_utils.py
+6
-3
No files found.
tools/data_converter/sunrgbd_data_utils.py
View file @
b79f9e67
...
@@ -42,8 +42,11 @@ class SUNRGBDInstance(object):
...
@@ -42,8 +42,11 @@ class SUNRGBDInstance(object):
self
.
ymax
=
data
[
2
]
+
data
[
4
]
self
.
ymax
=
data
[
2
]
+
data
[
4
]
self
.
box2d
=
np
.
array
([
self
.
xmin
,
self
.
ymin
,
self
.
xmax
,
self
.
ymax
])
self
.
box2d
=
np
.
array
([
self
.
xmin
,
self
.
ymin
,
self
.
xmax
,
self
.
ymax
])
self
.
centroid
=
np
.
array
([
data
[
5
],
data
[
6
],
data
[
7
]])
self
.
centroid
=
np
.
array
([
data
[
5
],
data
[
6
],
data
[
7
]])
# data[9] is x_size (l), data[8] is y_size (w), data[10] is z_size (h)
self
.
width
=
data
[
8
]
# in our depth coordinate system,
self
.
length
=
data
[
9
]
self
.
height
=
data
[
10
]
# data[9] is x_size (length), data[8] is y_size (width), data[10] is
# z_size (height) in our depth coordinate system,
# l corresponds to the size along the x axis
# l corresponds to the size along the x axis
self
.
size
=
np
.
array
([
data
[
9
],
data
[
8
],
data
[
10
]])
*
2
self
.
size
=
np
.
array
([
data
[
9
],
data
[
8
],
data
[
10
]])
*
2
self
.
orientation
=
np
.
zeros
((
3
,
))
self
.
orientation
=
np
.
zeros
((
3
,
))
...
@@ -193,7 +196,7 @@ class SUNRGBDData(object):
...
@@ -193,7 +196,7 @@ class SUNRGBDData(object):
],
],
axis
=
0
)
axis
=
0
)
annotations
[
'dimensions'
]
=
2
*
np
.
array
([
annotations
[
'dimensions'
]
=
2
*
np
.
array
([
[
obj
.
l
,
obj
.
w
,
obj
.
h
]
for
obj
in
obj_list
[
obj
.
l
ength
,
obj
.
w
idth
,
obj
.
h
eight
]
for
obj
in
obj_list
if
obj
.
classname
in
self
.
cat2label
.
keys
()
if
obj
.
classname
in
self
.
cat2label
.
keys
()
])
# lwh (depth) format
])
# lwh (depth) format
annotations
[
'rotation_y'
]
=
np
.
array
([
annotations
[
'rotation_y'
]
=
np
.
array
([
...
...
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