Unverified Commit cde515d5 authored by xiliu8006's avatar xiliu8006 Committed by GitHub
Browse files

[Fix] Fix bg point filter (#609)

* fix bg_points_filter

* fix 3dssd bg_point_filter bug

* fix bg_filter bug in 3dssd

* update performance

* add model download link
parent fe719e8d
...@@ -106,9 +106,9 @@ model = dict( ...@@ -106,9 +106,9 @@ model = dict(
lr = 0.002 # max learning rate lr = 0.002 # max learning rate
optimizer = dict(type='AdamW', lr=lr, weight_decay=0) optimizer = dict(type='AdamW', lr=lr, weight_decay=0)
optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2)) 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 # runtime settings
runner = dict(type='EpochBasedRunner', max_epochs=150) runner = dict(type='EpochBasedRunner', max_epochs=80)
# yapf:disable # yapf:disable
log_config = dict( log_config = dict(
......
...@@ -29,6 +29,6 @@ Some settings in our implementation are different from the [official implementat ...@@ -29,6 +29,6 @@ Some settings in our implementation are different from the [official implementat
| Backbone |Class| Lr schd | Mem (GB) | Inf time (fps) | mAP |Download | | Backbone |Class| Lr schd | Mem (GB) | Inf time (fps) | mAP |Download |
| :---------: | :-----: | :------: | :------------: | :----: |:----: | :------: | | :---------: | :-----: | :------: | :------------: | :----: |:----: | :------: |
| [PointNet2SAMSG](./3dssd_kitti-3d-car.py)| Car |72e|4.7||78.39(81.00)<sup>1</sup>|[model](https://download.openmmlab.com/mmdetection3d/v0.1.0_models/3dssd/3dssd_kitti-3d-car_20210324_122002-07e9a19b.pth) &#124; [log](https://download.openmmlab.com/mmdetection3d/v0.1.0_models/3dssd/3dssd_kitti-3d-car_20210324_122002.log.json)| | [PointNet2SAMSG](./3dssd_kitti-3d-car.py)| Car |72e|4.7||78.69(81.27)<sup>1</sup>|[model](https://download.openmmlab.com/mmdetection3d/v0.1.0_models/3dssd/3dssd_kitti-3d-car_20210602_124438-b4276f56.pth) &#124; [log](https://download.openmmlab.com/mmdetection3d/v0.1.0_models/3dssd/3dssd_kitti-3d-car_20210602_124438.log.json)|
[1]: We report two different 3D object detection performance here. 78.39mAP is evaluated by our evaluation code and 81.00mAP is evaluated by the official development kit (so as that used in the paper and official code of 3DSSD ). We found that the commonly used Python implementation of [`rotate_iou`](https://github.com/traveller59/second.pytorch/blob/e42e4a0e17262ab7d180ee96a0a36427f2c20a44/second/core/non_max_suppression/nms_gpu.py#L605) which is used in our KITTI dataset evaluation, is different from the official implemention in [KITTI benchmark](http://www.cvlibs.net/datasets/kitti/eval_object.php?obj_benchmark=3d). [1]: We report two different 3D object detection performance here. 78.69mAP is evaluated by our evaluation code and 81.27mAP is evaluated by the official development kit (so as that used in the paper and official code of 3DSSD ). We found that the commonly used Python implementation of [`rotate_iou`](https://github.com/traveller59/second.pytorch/blob/e42e4a0e17262ab7d180ee96a0a36427f2c20a44/second/core/non_max_suppression/nms_gpu.py#L605) which is used in our KITTI dataset evaluation, is different from the official implemention in [KITTI benchmark](http://www.cvlibs.net/datasets/kitti/eval_object.php?obj_benchmark=3d).
...@@ -20,5 +20,5 @@ Models: ...@@ -20,5 +20,5 @@ Models:
- Task: 3D Object Detection - Task: 3D Object Detection
Dataset: KITTI Dataset: KITTI
Metrics: Metrics:
mAP: 78.39 mAP: 78.69
Weights: https://download.openmmlab.com/mmdetection3d/v0.1.0_models/3dssd/3dssd_kitti-3d-car_20210324_122002-07e9a19b.pth Weights: https://download.openmmlab.com/mmdetection3d/v0.1.0_models/3dssd/3dssd_kitti-3d-car_20210602_124438-b4276f56.pth
...@@ -1129,11 +1129,13 @@ class BackgroundPointsFilter(object): ...@@ -1129,11 +1129,13 @@ class BackgroundPointsFilter(object):
points = input_dict['points'] points = input_dict['points']
gt_bboxes_3d = input_dict['gt_bboxes_3d'] gt_bboxes_3d = input_dict['gt_bboxes_3d']
gt_bboxes_3d_np = gt_bboxes_3d.tensor.numpy() # avoid groundtruth being modified
gt_bboxes_3d_np[:, :3] = gt_bboxes_3d.gravity_center.numpy() gt_bboxes_3d_np = gt_bboxes_3d.tensor.clone().numpy()
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 = gt_bboxes_3d_np.copy()
enlarged_gt_bboxes_3d[:, 3:6] += self.bbox_enlarge_range 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, foreground_masks = box_np_ops.points_in_rbbox(points_numpy,
gt_bboxes_3d_np) gt_bboxes_3d_np)
enlarge_foreground_masks = box_np_ops.points_in_rbbox( enlarge_foreground_masks = box_np_ops.points_in_rbbox(
......
...@@ -491,7 +491,7 @@ class SSD3DHead(VoteHead): ...@@ -491,7 +491,7 @@ class SSD3DHead(VoteHead):
bbox.clone(), bbox.clone(),
box_dim=bbox.shape[-1], box_dim=bbox.shape[-1],
with_yaw=self.bbox_coder.with_rot, 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): if isinstance(bbox, LiDARInstance3DBoxes):
box_idx = bbox.points_in_boxes(points) box_idx = bbox.points_in_boxes(points)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment