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
a1bd2d7b
Unverified
Commit
a1bd2d7b
authored
Jun 22, 2022
by
yukang
Committed by
GitHub
Jun 22, 2022
Browse files
Update dataset.py
parent
972dabe5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
pcdet/datasets/dataset.py
pcdet/datasets/dataset.py
+8
-2
No files found.
pcdet/datasets/dataset.py
View file @
a1bd2d7b
...
@@ -43,7 +43,13 @@ class DatasetTemplate(torch_data.Dataset):
...
@@ -43,7 +43,13 @@ class DatasetTemplate(torch_data.Dataset):
self
.
depth_downsample_factor
=
self
.
data_processor
.
depth_downsample_factor
self
.
depth_downsample_factor
=
self
.
data_processor
.
depth_downsample_factor
else
:
else
:
self
.
depth_downsample_factor
=
None
self
.
depth_downsample_factor
=
None
self
.
gt_sampler_with_img
=
False
for
augmentor
in
self
.
data_augmentor
.
data_augmentor_queue
:
if
isinstance
(
augmentor
,
DataBaseSampler
):
if
augmentor
.
aug_with_img
:
self
.
gt_sampler_with_img
=
True
@
property
@
property
def
mode
(
self
):
def
mode
(
self
):
return
'train'
if
self
.
training
else
'test'
return
'train'
if
self
.
training
else
'test'
...
@@ -207,7 +213,7 @@ class DatasetTemplate(torch_data.Dataset):
...
@@ -207,7 +213,7 @@ class DatasetTemplate(torch_data.Dataset):
pad_w
=
common_utils
.
get_pad_params
(
desired_size
=
max_w
,
cur_size
=
image
.
shape
[
1
])
pad_w
=
common_utils
.
get_pad_params
(
desired_size
=
max_w
,
cur_size
=
image
.
shape
[
1
])
pad_width
=
(
pad_h
,
pad_w
)
pad_width
=
(
pad_h
,
pad_w
)
# Pad with nan, to be replaced later in the pipeline.
# Pad with nan, to be replaced later in the pipeline.
pad_value
=
0
#
np.nan
pad_value
=
0
if
self
.
gt_sampler_with_img
else
np
.
nan
if
key
==
"images"
:
if
key
==
"images"
:
pad_width
=
(
pad_h
,
pad_w
,
(
0
,
0
))
pad_width
=
(
pad_h
,
pad_w
,
(
0
,
0
))
...
...
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