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
d5655a41
Unverified
Commit
d5655a41
authored
Nov 25, 2020
by
Martin Hahner
Committed by
GitHub
Nov 25, 2020
Browse files
Add tqdm to WOD preprocessing (#372)
parent
53b2b93d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
pcdet/datasets/waymo/waymo_dataset.py
pcdet/datasets/waymo/waymo_dataset.py
+7
-4
No files found.
pcdet/datasets/waymo/waymo_dataset.py
View file @
d5655a41
...
...
@@ -8,6 +8,8 @@ import pickle
import
copy
import
numpy
as
np
import
torch
import
multiprocessing
from
tqdm
import
tqdm
from
pathlib
import
Path
from
...ops.roiaware_pool3d
import
roiaware_pool3d_utils
from
...utils
import
box_utils
,
common_utils
...
...
@@ -74,7 +76,7 @@ class WaymoDataset(DatasetTemplate):
return
sequence_file
def
get_infos
(
self
,
raw_data_path
,
save_path
,
num_workers
=
4
,
has_label
=
True
,
sampled_interval
=
1
):
def
get_infos
(
self
,
raw_data_path
,
save_path
,
num_workers
=
multiprocessing
.
cpu_count
()
,
has_label
=
True
,
sampled_interval
=
1
):
import
concurrent.futures
as
futures
from
functools
import
partial
from
.
import
waymo_utils
...
...
@@ -92,8 +94,8 @@ class WaymoDataset(DatasetTemplate):
# process_single_sequence(sample_sequence_file_list[0])
with
futures
.
ThreadPoolExecutor
(
num_workers
)
as
executor
:
sequence_infos
=
executor
.
map
(
process_single_sequence
,
sample_sequence_file_list
)
sequence_infos
=
list
(
sequence_infos
)
sequence_infos
=
list
(
tqdm
(
executor
.
map
(
process_single_sequence
,
sample_sequence_file_list
)
,
total
=
len
(
sample_sequence_file_list
))
)
all_sequences_infos
=
[
item
for
infos
in
sequence_infos
for
item
in
infos
]
return
all_sequences_infos
...
...
@@ -305,7 +307,8 @@ class WaymoDataset(DatasetTemplate):
def
create_waymo_infos
(
dataset_cfg
,
class_names
,
data_path
,
save_path
,
raw_data_tag
=
'raw_data'
,
processed_data_tag
=
'waymo_processed_data'
,
workers
=
4
):
raw_data_tag
=
'raw_data'
,
processed_data_tag
=
'waymo_processed_data'
,
workers
=
multiprocessing
.
cpu_count
()):
dataset
=
WaymoDataset
(
dataset_cfg
=
dataset_cfg
,
class_names
=
class_names
,
root_path
=
data_path
,
training
=
False
,
logger
=
common_utils
.
create_logger
()
...
...
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