Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Fix bg point filter #609

Merged
merged 5 commits into from
Jun 6, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions configs/3dssd/3dssd_kitti-3d-car.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@
lr = 0.002 # max learning rate
optimizer = dict(type='AdamW', lr=lr, weight_decay=0)
optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
lr_config = dict(policy='step', warmup=None, step=[80, 120])
lr_config = dict(policy='step', warmup=None, step=[45, 60])
# runtime settings
runner = dict(type='EpochBasedRunner', max_epochs=150)
runner = dict(type='EpochBasedRunner', max_epochs=80)

# yapf:disable
log_config = dict(
Expand Down
6 changes: 3 additions & 3 deletions mmdet3d/datasets/pipelines/transforms_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -1127,11 +1127,11 @@ def __call__(self, input_dict):
points = input_dict['points']
gt_bboxes_3d = input_dict['gt_bboxes_3d']

gt_bboxes_3d_np = gt_bboxes_3d.tensor.numpy()
gt_bboxes_3d_np[:, :3] = gt_bboxes_3d.gravity_center.numpy()
gt_bboxes_3d_np = gt_bboxes_3d.tensor.clone().numpy()
ZwwWayne marked this conversation as resolved.
Show resolved Hide resolved
gt_bboxes_3d_np[:, :3] = gt_bboxes_3d.gravity_center.clone().numpy()
enlarged_gt_bboxes_3d = gt_bboxes_3d_np.copy()
enlarged_gt_bboxes_3d[:, 3:6] += self.bbox_enlarge_range
points_numpy = points.tensor.numpy()
points_numpy = points.tensor.clone().numpy()
foreground_masks = box_np_ops.points_in_rbbox(points_numpy,
gt_bboxes_3d_np)
enlarge_foreground_masks = box_np_ops.points_in_rbbox(
Expand Down
2 changes: 1 addition & 1 deletion mmdet3d/models/dense_heads/ssd_3d_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ def multiclass_nms_single(self, obj_scores, sem_scores, bbox, points,
bbox.clone(),
box_dim=bbox.shape[-1],
with_yaw=self.bbox_coder.with_rot,
origin=(0.5, 0.5, 1.0))
origin=(0.5, 0.5, 0.5))

if isinstance(bbox, LiDARInstance3DBoxes):
box_idx = bbox.points_in_boxes(points)
Expand Down