-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from PurdueDigitalTwin/mayson
feat(model) Init commit on code base
- Loading branch information
Showing
685 changed files
with
117,154 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
cff-version: 1.2.0 | ||
message: "If you use this software, please cite it as below." | ||
authors: | ||
- name: "MMDetection3D Contributors" | ||
title: "OpenMMLab's Next-generation Platform for General 3D Object Detection" | ||
date-released: 2020-07-23 | ||
url: "https://github.com/open-mmlab/mmdetection3d" | ||
license: Apache-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
include mmdet3d/.mim/model-index.yml | ||
include requirements/*.txt | ||
recursive-include mmdet3d/.mim/ops *.cpp *.cu *.h *.cc | ||
recursive-include mmdet3d/.mim/configs *.py *.yml | ||
recursive-include mmdet3d/.mim/tools *.sh *.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ and [OPV2V](https://drive.google.com/drive/folders/1dkDeHlwOVbmgXcDazZvO6TFEZ6V_ | |
|
||
Once the data is downloaded, it's necessary organize the data in the following structure: | ||
|
||
```plain | ||
``` | ||
├── $REPO_ROOT | ||
│ ├── data | ||
│ │ ├── v2v4real | ||
|
@@ -55,7 +55,7 @@ contact [us](mailto:[email protected]). | |
|
||
| Model | Backbone | Checkpoint | Config | AP@50 | AP@70 | Log | | ||
|:-------------:|:---------------:|:-----------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------:|:-----:|:-----:|:-----------------------------------------------------------------------------------------------------:| | ||
| MACP-V2V4Real | BEVFusion-LiDAR | [Google Drive](https://drive.google.com/file/d/1SVaMekq_hpnZ_dUb0dvD7tVYXNbTiSfj/view?usp=drive_link) | [Google Drive](https://drive.google.com/file/d/1K2IGPhxr2JWH20MbNlbi3hNiOdHk_LGw/view?usp=drive_link) | 67.6 | 47.9 | [Google Drive](https://drive.google.com/file/d/1SVaMekq_hpnZ_dUb0dvD7tVYXNbTiSfj/view?usp=drive_link) | | ||
| MACP-V2V4Real | BEVFusion-LiDAR | [Google Drive](https://drive.google.com/file/d/1SVaMekq_hpnZ_dUb0dvD7tVYXNbTiSfj/view?usp=drive_link) | [Google Drive](https://drive.google.com/file/d/1K2IGPhxr2JWH20MbNlbi3hNiOdHk_LGw/view?usp=drive_link) | 67.6 | 47.9 | [Google Drive](https://drive.google.com/file/d/1SVaMekq_hpnZ_dUb0dvD7tVYXNbTiSfj/view?usp=drive_link) | | ||
| MACP-OPV2V | BEVFusion-LiDAR | [Google Drive](https://drive.google.com/file/d/1fWULVO-3vGQlQ_Hmqq9dcZ5SUSwYicD1/view?usp=drive_link) | [Google Drive](https://drive.google.com/file/d/1_dtbrYahK1zf_-fp4IYocIuMVbx01fNc/view?usp=drive_link) | 93.7 | 90.3 | [Google Drive](https://drive.google.com/file/d/1fzHDJdsNzmsZQ59zt0_FRzoUhC0i1Ufu/view?usp=drive_link) | | ||
|
||
## Training | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
_base_ = [ | ||
'../_base_/models/3dssd.py', | ||
'../_base_/datasets/kitti-3d-car.py', | ||
'../_base_/default_runtime.py', | ||
] | ||
|
||
# dataset settings | ||
dataset_type = 'KittiDataset' | ||
data_root = 'data/kitti/' | ||
class_names = ['Car'] | ||
point_cloud_range = [0, -40, -5, 70, 40, 3] | ||
input_modality = dict(use_lidar=True, use_camera=False) | ||
backend_args = None | ||
|
||
db_sampler = dict( | ||
data_root=data_root, | ||
info_path=data_root + 'kitti_dbinfos_train.pkl', | ||
rate=1.0, | ||
prepare=dict(filter_by_difficulty=[-1], filter_by_min_points=dict(Car=5)), | ||
classes=class_names, | ||
sample_groups=dict(Car=15), | ||
points_loader=dict( | ||
type='LoadPointsFromFile', | ||
coord_type='LIDAR', | ||
load_dim=4, | ||
use_dim=4, | ||
backend_args=backend_args, | ||
), | ||
backend_args=backend_args, | ||
) | ||
|
||
train_pipeline = [ | ||
dict( | ||
type='LoadPointsFromFile', | ||
coord_type='LIDAR', | ||
load_dim=4, | ||
use_dim=4, | ||
backend_args=backend_args, | ||
), | ||
dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True), | ||
dict(type='PointsRangeFilter', point_cloud_range=point_cloud_range), | ||
dict(type='ObjectRangeFilter', point_cloud_range=point_cloud_range), | ||
dict(type='ObjectSample', db_sampler=db_sampler), | ||
dict(type='RandomFlip3D', flip_ratio_bev_horizontal=0.5), | ||
dict( | ||
type='ObjectNoise', | ||
num_try=100, | ||
translation_std=[1.0, 1.0, 0], | ||
global_rot_range=[0.0, 0.0], | ||
rot_range=[-1.0471975511965976, 1.0471975511965976], | ||
), | ||
dict( | ||
type='GlobalRotScaleTrans', | ||
rot_range=[-0.78539816, 0.78539816], | ||
scale_ratio_range=[0.9, 1.1], | ||
), | ||
# 3DSSD can get a higher performance without this transform | ||
# dict(type='BackgroundPointsFilter', bbox_enlarge_range=(0.5, 2.0, 0.5)), | ||
dict(type='PointSample', num_points=16384), | ||
dict( | ||
type='Pack3DDetInputs', | ||
keys=['points', 'gt_bboxes_3d', 'gt_labels_3d']), | ||
] | ||
|
||
test_pipeline = [ | ||
dict( | ||
type='LoadPointsFromFile', | ||
coord_type='LIDAR', | ||
load_dim=4, | ||
use_dim=4, | ||
backend_args=backend_args, | ||
), | ||
dict( | ||
type='MultiScaleFlipAug3D', | ||
img_scale=(1333, 800), | ||
pts_scale_ratio=1, | ||
flip=False, | ||
transforms=[ | ||
dict( | ||
type='GlobalRotScaleTrans', | ||
rot_range=[0, 0], | ||
scale_ratio_range=[1.0, 1.0], | ||
translation_std=[0, 0, 0], | ||
), | ||
dict(type='RandomFlip3D'), | ||
dict( | ||
type='PointsRangeFilter', point_cloud_range=point_cloud_range), | ||
dict(type='PointSample', num_points=16384), | ||
], | ||
), | ||
dict(type='Pack3DDetInputs', keys=['points']), | ||
] | ||
|
||
train_dataloader = dict( | ||
batch_size=4, | ||
dataset=dict(dataset=dict(pipeline=train_pipeline, )), | ||
) | ||
test_dataloader = dict(dataset=dict(pipeline=test_pipeline)) | ||
val_dataloader = dict(dataset=dict(pipeline=test_pipeline)) | ||
|
||
# model settings | ||
model = dict( | ||
bbox_head=dict( | ||
num_classes=1, | ||
bbox_coder=dict( | ||
type='AnchorFreeBBoxCoder', num_dir_bins=12, with_rot=True), | ||
)) | ||
|
||
# optimizer | ||
lr = 0.002 # max learning rate | ||
optim_wrapper = dict( | ||
type='OptimWrapper', | ||
optimizer=dict(type='AdamW', lr=lr, weight_decay=0.0), | ||
clip_grad=dict(max_norm=35, norm_type=2), | ||
) | ||
|
||
# training schedule for 1x | ||
train_cfg = dict(type='EpochBasedTrainLoop', max_epochs=80, val_interval=2) | ||
val_cfg = dict(type='ValLoop') | ||
test_cfg = dict(type='TestLoop') | ||
|
||
# learning rate | ||
param_scheduler = [ | ||
dict( | ||
type='MultiStepLR', | ||
begin=0, | ||
end=80, | ||
by_epoch=True, | ||
milestones=[45, 60], | ||
gamma=0.1, | ||
) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# 3DSSD: Point-based 3D Single Stage Object Detector | ||
|
||
> [3DSSD: Point-based 3D Single Stage Object Detector](https://arxiv.org/abs/2002.10187) | ||
<!-- [ALGORITHM] --> | ||
|
||
## Abstract | ||
|
||
Currently, there have been many kinds of voxel-based 3D single stage detectors, while point-based single stage methods are still underexplored. In this paper, we first present a lightweight and effective point-based 3D single stage object detector, named 3DSSD, achieving a good balance between accuracy and efficiency. In this paradigm, all upsampling layers and refinement stage, which are indispensable in all existing point-based methods, are abandoned to reduce the large computation cost. We novelly propose a fusion sampling strategy in downsampling process to make detection on less representative points feasible. A delicate box prediction network including a candidate generation layer, an anchor-free regression head with a 3D center-ness assignment strategy is designed to meet with our demand of accuracy and speed. Our paradigm is an elegant single stage anchor-free framework, showing great superiority to other existing methods. We evaluate 3DSSD on widely used KITTI dataset and more challenging nuScenes dataset. Our method outperforms all state-of-the-art voxel-based single stage methods by a large margin, and has comparable performance to two stage point-based methods as well, with inference speed more than 25 FPS, 2x faster than former state-of-the-art point-based methods. | ||
|
||
<div align=center> | ||
<img src="https://user-images.githubusercontent.com/30491025/143854187-54ed1257-a046-4764-81cd-d2c8404137d3.png" width="800"/> | ||
</div> | ||
|
||
## Introduction | ||
|
||
We implement 3DSSD and provide the results and checkpoints on KITTI datasets. | ||
|
||
Some settings in our implementation are different from the [official implementation](https://github.com/Jia-Research-Lab/3DSSD), which bring marginal differences to the performance on KITTI datasets in our experiments. To simplify and unify the models of our implementation, we skip them in our models. These differences are listed as below: | ||
|
||
1. We keep the scenes without any object while the official code skips these scenes in training. In the official implementation, only 3229 and 3394 samples are used as training and validation sets, respectively. In our implementation, we keep using 3712 and 3769 samples as training and validation sets, respectively, as those used for all the other models in our implementation on KITTI datasets. | ||
2. We do not modify the decay of `batch normalization` during training. | ||
3. While using [`DataBaseSampler`](https://github.com/open-mmlab/mmdetection3d/blob/master/mmdet3d/datasets/pipelines/dbsampler.py#L80) for data augmentation, the official code uses road planes as reference to place the sampled objects while we do not. | ||
4. We perform detection using LIDAR coordinates while the official code uses camera coordinates. | ||
|
||
## Results and models | ||
|
||
### KITTI | ||
|
||
| Backbone | Class | Lr schd | Mem (GB) | Inf time (fps) | mAP | Download | | ||
| :--------------------------------------------: | :---: | :-----: | :------: | :------------: | :----------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | | ||
| [PointNet2SAMSG](./3dssd_4xb4_kitti-3d-car.py) | Car | 72e | 4.7 | | 78.58(81.27)<sup>1</sup> | [model](https://download.openmmlab.com/mmdetection3d/v1.0.0_models/3dssd/3dssd_4x4_kitti-3d-car/3dssd_4x4_kitti-3d-car_20210818_203828-b89c8fc4.pth) \| [log](https://download.openmmlab.com/mmdetection3d/v1.0.0_models/3dssd/3dssd_4x4_kitti-3d-car/3dssd_4x4_kitti-3d-car_20210818_203828.log.json) | | ||
|
||
\[1\]: We report two different 3D object detection performance here. 78.58mAP 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 implementation in [KITTI benchmark](http://www.cvlibs.net/datasets/kitti/eval_object.php?obj_benchmark=3d). | ||
|
||
## Citation | ||
|
||
```latex | ||
@inproceedings{yang20203dssd, | ||
author = {Zetong Yang and Yanan Sun and Shu Liu and Jiaya Jia}, | ||
title = {3DSSD: Point-based 3D Single Stage Object Detector}, | ||
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition}, | ||
year = {2020} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Collections: | ||
- Name: 3DSSD | ||
Metadata: | ||
Training Data: KITTI | ||
Training Techniques: | ||
- AdamW | ||
Training Resources: 4x TITAN X | ||
Architecture: | ||
- PointNet++ | ||
Paper: | ||
URL: https://arxiv.org/abs/2002.10187 | ||
Title: "3DSSD: Point-based 3D Single Stage Object Detector" | ||
README: configs/3dssd/README.md | ||
Code: | ||
URL: https://github.com/open-mmlab/mmdetection3d/blob/master/mmdet3d/models/detectors/ssd3dnet.py#L7 | ||
Version: v0.6.0 | ||
|
||
Models: | ||
- Name: 3dssd_4x4_kitti-3d-car | ||
In Collection: 3DSSD | ||
Config: configs/3dssd/3dssd_4xb4_kitti-3d-car.py | ||
Metadata: | ||
Training Memory (GB): 4.7 | ||
Results: | ||
- Task: 3D Object Detection | ||
Dataset: KITTI | ||
Metrics: | ||
mAP: 78.58 | ||
Weights: https://download.openmmlab.com/mmdetection3d/v1.0.0_models/3dssd/3dssd_4x4_kitti-3d-car/3dssd_4x4_kitti-3d-car_20210818_203828-b89c8fc4.pth |
Oops, something went wrong.