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
053735e1
"data/vscode:/vscode.git/clone" did not exist on "75b2d0372288d213b95800e09db2a9ba3e09198e"
Commit
053735e1
authored
Aug 17, 2022
by
Shaoshuai Shi
Browse files
Default setting: DO NOT mask the gt_boxes that are outside the range of Z-axis
parent
08652f94
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
pcdet/datasets/processor/data_processor.py
pcdet/datasets/processor/data_processor.py
+2
-1
pcdet/utils/box_utils.py
pcdet/utils/box_utils.py
+6
-2
tools/cfgs/dataset_configs/waymo_dataset.yaml
tools/cfgs/dataset_configs/waymo_dataset.yaml
+1
-0
No files found.
pcdet/datasets/processor/data_processor.py
View file @
053735e1
...
...
@@ -85,7 +85,8 @@ class DataProcessor(object):
if
data_dict
.
get
(
'gt_boxes'
,
None
)
is
not
None
and
config
.
REMOVE_OUTSIDE_BOXES
and
self
.
training
:
mask
=
box_utils
.
mask_boxes_outside_range_numpy
(
data_dict
[
'gt_boxes'
],
self
.
point_cloud_range
,
min_num_corners
=
config
.
get
(
'min_num_corners'
,
1
)
data_dict
[
'gt_boxes'
],
self
.
point_cloud_range
,
min_num_corners
=
config
.
get
(
'min_num_corners'
,
1
),
filter_z
=
config
.
get
(
'FILTER_Z'
,
False
)
)
data_dict
[
'gt_boxes'
]
=
data_dict
[
'gt_boxes'
][
mask
]
return
data_dict
...
...
pcdet/utils/box_utils.py
View file @
053735e1
...
...
@@ -90,7 +90,7 @@ def corners_rect_to_camera(corners):
return
camera_rect
def
mask_boxes_outside_range_numpy
(
boxes
,
limit_range
,
min_num_corners
=
1
):
def
mask_boxes_outside_range_numpy
(
boxes
,
limit_range
,
min_num_corners
=
1
,
filter_z
=
True
):
"""
Args:
boxes: (N, 7) [x, y, z, dx, dy, dz, heading, ...], (x, y, z) is the box center
...
...
@@ -103,7 +103,11 @@ def mask_boxes_outside_range_numpy(boxes, limit_range, min_num_corners=1):
if
boxes
.
shape
[
1
]
>
7
:
boxes
=
boxes
[:,
0
:
7
]
corners
=
boxes_to_corners_3d
(
boxes
)
# (N, 8, 3)
if
filter_z
:
mask
=
((
corners
>=
limit_range
[
0
:
3
])
&
(
corners
<=
limit_range
[
3
:
6
])).
all
(
axis
=
2
)
else
:
corners
=
corners
[:,
:,
0
:
2
]
mask
=
((
corners
>=
limit_range
[
0
:
2
])
&
(
corners
<=
limit_range
[
3
:
5
])).
all
(
axis
=
2
)
mask
=
mask
.
sum
(
axis
=
1
)
>=
min_num_corners
# (N)
return
mask
...
...
tools/cfgs/dataset_configs/waymo_dataset.yaml
View file @
053735e1
...
...
@@ -62,6 +62,7 @@ POINT_FEATURE_ENCODING: {
DATA_PROCESSOR
:
-
NAME
:
mask_points_and_boxes_outside_range
REMOVE_OUTSIDE_BOXES
:
True
FILTER_Z
:
False
-
NAME
:
shuffle_points
SHUFFLE_ENABLED
:
{
...
...
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