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
648623bb
Unverified
Commit
648623bb
authored
Jul 30, 2021
by
Ziyi Wu
Committed by
GitHub
Jul 30, 2021
Browse files
[Fix] Fix bug in `BackgroundPointsFilter` (#760)
* set gravity center origin * remove filter transform in 3DSSD cfg
parent
8ac21990
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
configs/3dssd/3dssd_4x4_kitti-3d-car.py
configs/3dssd/3dssd_4x4_kitti-3d-car.py
+2
-1
mmdet3d/datasets/pipelines/transforms_3d.py
mmdet3d/datasets/pipelines/transforms_3d.py
+3
-3
No files found.
configs/3dssd/3dssd_4x4_kitti-3d-car.py
View file @
648623bb
...
...
@@ -50,7 +50,8 @@ train_pipeline = [
type
=
'GlobalRotScaleTrans'
,
rot_range
=
[
-
0.78539816
,
0.78539816
],
scale_ratio_range
=
[
0.9
,
1.1
]),
dict
(
type
=
'BackgroundPointsFilter'
,
bbox_enlarge_range
=
(
0.5
,
2.0
,
0.5
)),
# 3DSSD can get a higher performance without this transform
# dict(type='BackgroundPointsFilter', bbox_enlarge_range=(0.5, 2.0, 0.5)),
dict
(
type
=
'IndoorPointSample'
,
num_points
=
16384
),
dict
(
type
=
'DefaultFormatBundle3D'
,
class_names
=
class_names
),
dict
(
type
=
'Collect3D'
,
keys
=
[
'points'
,
'gt_bboxes_3d'
,
'gt_labels_3d'
])
...
...
mmdet3d/datasets/pipelines/transforms_3d.py
View file @
648623bb
...
...
@@ -1194,10 +1194,10 @@ class BackgroundPointsFilter(object):
enlarged_gt_bboxes_3d
=
gt_bboxes_3d_np
.
copy
()
enlarged_gt_bboxes_3d
[:,
3
:
6
]
+=
self
.
bbox_enlarge_range
points_numpy
=
points
.
tensor
.
clone
().
numpy
()
foreground_masks
=
box_np_ops
.
points_in_rbbox
(
points_numpy
,
gt_bboxes_3d_np
)
foreground_masks
=
box_np_ops
.
points_in_rbbox
(
points_numpy
,
gt_bboxes_3d_np
,
origin
=
(
0.5
,
0.5
,
0.5
)
)
enlarge_foreground_masks
=
box_np_ops
.
points_in_rbbox
(
points_numpy
,
enlarged_gt_bboxes_3d
)
points_numpy
,
enlarged_gt_bboxes_3d
,
origin
=
(
0.5
,
0.5
,
0.5
)
)
foreground_masks
=
foreground_masks
.
max
(
1
)
enlarge_foreground_masks
=
enlarge_foreground_masks
.
max
(
1
)
valid_masks
=
~
np
.
logical_and
(
~
foreground_masks
,
...
...
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