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
OpenPCDet
Commits
96ba76a3
Commit
96ba76a3
authored
Aug 20, 2022
by
Shaoshuai Shi
Browse files
database should save with np.float32
parent
7e2d56b4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
pcdet/datasets/waymo/waymo_dataset.py
pcdet/datasets/waymo/waymo_dataset.py
+9
-5
No files found.
pcdet/datasets/waymo/waymo_dataset.py
View file @
96ba76a3
...
@@ -225,7 +225,7 @@ class WaymoDataset(DatasetTemplate):
...
@@ -225,7 +225,7 @@ class WaymoDataset(DatasetTemplate):
points_pre
=
remove_ego_points
(
points_pre
,
1.0
)
points_pre
=
remove_ego_points
(
points_pre
,
1.0
)
points_pre_all
.
append
(
points_pre
)
points_pre_all
.
append
(
points_pre
)
num_points_pre
.
append
(
points_pre
.
shape
[
0
])
num_points_pre
.
append
(
points_pre
.
shape
[
0
])
points
=
np
.
concatenate
([
points
]
+
points_pre_all
,
axis
=
0
)
points
=
np
.
concatenate
([
points
]
+
points_pre_all
,
axis
=
0
)
.
astype
(
np
.
float32
)
num_points_all
=
np
.
array
([
num_pts_cur
]
+
num_points_pre
).
astype
(
np
.
int
)
num_points_all
=
np
.
array
([
num_pts_cur
]
+
num_points_pre
).
astype
(
np
.
int
)
return
points
,
num_points_all
,
sample_idx_pre_list
return
points
,
num_points_all
,
sample_idx_pre_list
...
@@ -461,6 +461,8 @@ class WaymoDataset(DatasetTemplate):
...
@@ -461,6 +461,8 @@ class WaymoDataset(DatasetTemplate):
gt_points
[:,
:
3
]
-=
gt_boxes
[
i
,
:
3
]
gt_points
[:,
:
3
]
-=
gt_boxes
[
i
,
:
3
]
if
(
used_classes
is
None
)
or
names
[
i
]
in
used_classes
:
if
(
used_classes
is
None
)
or
names
[
i
]
in
used_classes
:
gt_points
=
gt_points
.
astype
(
np
.
float32
)
assert
gt_points
.
dtype
==
np
.
float32
with
open
(
filepath
,
'w'
)
as
f
:
with
open
(
filepath
,
'w'
)
as
f
:
gt_points
.
tofile
(
f
)
gt_points
.
tofile
(
f
)
...
@@ -546,6 +548,8 @@ class WaymoDataset(DatasetTemplate):
...
@@ -546,6 +548,8 @@ class WaymoDataset(DatasetTemplate):
gt_points
[:,
:
3
]
-=
gt_boxes
[
i
,
:
3
]
gt_points
[:,
:
3
]
-=
gt_boxes
[
i
,
:
3
]
if
(
used_classes
is
None
)
or
names
[
i
]
in
used_classes
:
if
(
used_classes
is
None
)
or
names
[
i
]
in
used_classes
:
gt_points
=
gt_points
.
astype
(
np
.
float32
)
assert
gt_points
.
dtype
==
np
.
float32
with
open
(
filepath
,
'w'
)
as
f
:
with
open
(
filepath
,
'w'
)
as
f
:
gt_points
.
tofile
(
f
)
gt_points
.
tofile
(
f
)
...
...
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