"googlemock/include/vscode:/vscode.git/clone" did not exist on "fa6730103ecaad750f42700c55a92c3e212a9271"
README.md 13.1 KB
Newer Older
Shaoshuai Shi's avatar
Shaoshuai Shi committed
1
2
3
<img src="docs/open_mmlab.png" align="right" width="30%">

# OpenPCDet
Shaoshuai Shi's avatar
Shaoshuai Shi committed
4

Shaoshuai Shi's avatar
Shaoshuai Shi committed
5
`OpenPCDet` is a clear, simple, self-contained open source project for LiDAR-based 3D object detection. 
Shaoshuai Shi's avatar
Shaoshuai Shi committed
6

7
It is also the official code release of [`[PointRCNN]`](https://arxiv.org/abs/1812.04244), [`[Part-A2-Net]`](https://arxiv.org/abs/1907.03670), [`[PV-RCNN]`](https://arxiv.org/abs/1912.13192) and [`[Voxel R-CNN]`](https://arxiv.org/abs/2012.15712). 
Shaoshuai Shi's avatar
Shaoshuai Shi committed
8

9
**NEW**: `OpenPCDet` has been updated to `v0.5.0` (Dec. 2021).
Shaoshuai Shi's avatar
Shaoshuai Shi committed
10
11
12
13

## Overview
- [Changelog](#changelog)
- [Design Pattern](#openpcdet-design-pattern)
Shaoshuai Shi's avatar
Shaoshuai Shi committed
14
- [Model Zoo](#model-zoo)
15
16
17
- [Installation](docs/INSTALL.md)
- [Quick Demo](docs/DEMO.md)
- [Getting Started](docs/GETTING_STARTED.md)
Shaoshuai Shi's avatar
Shaoshuai Shi committed
18
19
20
21
- [Citation](#citation)


## Changelog
22
23
24
25
26
[2021-12-09] **NEW:**  Update `OpenPCDet` to v0.5.1:
* Add PointPillar related baseline configs/results on [Waymo Open Dataset](#waymo-open-dataset-baselines).
* Support Pandaset dataloader, see the pull request [here](https://github.com/open-mmlab/OpenPCDet/pull/396).
* Support a set of new augmentations, see the pull request [here](https://github.com/open-mmlab/OpenPCDet/pull/653).

27
28
29
30
31
32
33
[2021-12-01] **NEW:** `OpenPCDet` v0.5.0 is released with the following features:
* Improve the performance of all models on [Waymo Open Dataset](#waymo-open-dataset-baselines). Note that you need to re-prepare the training/validation data and ground-truth database of Waymo Open Dataset (see [GETTING_STARTED.md](docs/GETTING_STARTED.md)). 
* Support anchor-free [CenterHead](pcdet/models/dense_heads/center_head.py), add configs of `CenterPoint` and `PV-RCNN with CenterHead`.
* Support lastest **PyTorch 1.1~1.10** and **spconv 1.0~2.x**, where **spconv 2.x** should be easy to install with pip and faster than previous version (see the official update of spconv [here](https://github.com/traveller59/spconv)).  
* Support config [`USE_SHARED_MEMORY`](tools/cfgs/dataset_configs/waymo_dataset.yaml) to use shared memory to potentially speed up the training process in case you suffer from an IO problem.  
* Support better and faster [visualization script](tools/visual_utils/open3d_vis_utils.py), and you need to install [Open3D](https://github.com/isl-org/Open3D) firstly. 

djiajunustc's avatar
djiajunustc committed
34
35
[2021-06-08] Added support for the voxel-based 3D object detection model [`Voxel R-CNN`](#KITTI-3D-Object-Detection-Baselines)

36
37
[2021-05-14] Added support for the monocular 3D object detection model [`CaDDN`](#KITTI-3D-Object-Detection-Baselines)

38
[2020-11-27] Bugfixed: Please re-prepare the validation infos of Waymo dataset (version 1.2) if you would like to 
39
40
41
use our provided Waymo evaluation tool (see [PR](https://github.com/open-mmlab/OpenPCDet/pull/383)). 
Note that you do not need to re-prepare the training data and ground-truth database. 

42
[2020-11-10] The [Waymo Open Dataset](#waymo-open-dataset-baselines) has been supported with state-of-the-art results. Currently we provide the 
43
configs and results of `SECOND`, `PartA2` and `PV-RCNN` on the Waymo Open Dataset, and more models could be easily supported by modifying their dataset configs. 
44

Shaoshuai Shi's avatar
Shaoshuai Shi committed
45
46
47
[2020-08-10] Bugfixed: The provided NuScenes models have been updated to fix the loading bugs. Please redownload it if you need to use the pretrained NuScenes models.

[2020-07-30] `OpenPCDet` v0.3.0 is released with the following features:
Shaoshuai Shi's avatar
Shaoshuai Shi committed
48
49
   * The Point-based and Anchor-Free models ([`PointRCNN`](#KITTI-3D-Object-Detection-Baselines), [`PartA2-Free`](#KITTI-3D-Object-Detection-Baselines)) are supported now.
   * The NuScenes dataset is supported with strong baseline results ([`SECOND-MultiHead (CBGS)`](#NuScenes-3D-Object-Detection-Baselines) and [`PointPillar-MultiHead`](#NuScenes-3D-Object-Detection-Baselines)).
Shaoshuai Shi's avatar
Shaoshuai Shi committed
50
   * High efficiency than last version, support **PyTorch 1.1~1.7** and **spconv 1.0~1.2** simultaneously.
Shaoshuai Shi's avatar
Shaoshuai Shi committed
51
   
Shaoshuai Shi's avatar
Shaoshuai Shi committed
52
53
54
55
56
57
58
59
[2020-07-17]  Add simple visualization codes and a quick demo to test with custom data. 

[2020-06-24] `OpenPCDet` v0.2.0 is released with pretty new structures to support more models and datasets. 

[2020-03-16] `OpenPCDet` v0.1.0 is released. 


## Introduction
Shaoshuai Shi's avatar
Shaoshuai Shi committed
60

61

Shaoshuai Shi's avatar
Shaoshuai Shi committed
62
### What does `OpenPCDet` toolbox do?
Shaoshuai Shi's avatar
Shaoshuai Shi committed
63

Gus-Guo's avatar
Gus-Guo committed
64
Note that we have upgrated `PCDet` from `v0.1` to `v0.2` with pretty new structures to support various datasets and models.
65

Shaoshuai Shi's avatar
Shaoshuai Shi committed
66
`OpenPCDet` is a general PyTorch-based codebase for 3D object detection from point cloud. 
Shaoshuai Shi's avatar
Shaoshuai Shi committed
67
It currently supports multiple state-of-the-art 3D object detection methods with highly refactored codes for both one-stage and two-stage 3D detection frameworks.
Shaoshuai Shi's avatar
Shaoshuai Shi committed
68

Shaoshuai Shi's avatar
Shaoshuai Shi committed
69
Based on `OpenPCDet` toolbox, we win the Waymo Open Dataset challenge in [3D Detection](https://waymo.com/open/challenges/3d-detection/), 
Shaoshuai Shi's avatar
Shaoshuai Shi committed
70
[3D Tracking](https://waymo.com/open/challenges/3d-tracking/), [Domain Adaptation](https://waymo.com/open/challenges/domain-adaptation/) 
Shaoshuai Shi's avatar
Shaoshuai Shi committed
71
three tracks among all LiDAR-only methods, and the Waymo related models will be released to `OpenPCDet` soon.    
Shaoshuai Shi's avatar
Shaoshuai Shi committed
72

Shaoshuai Shi's avatar
Shaoshuai Shi committed
73
74
75
We are actively updating this repo currently, and more datasets and models will be supported soon. 
Contributions are also welcomed. 

Shaoshuai Shi's avatar
Shaoshuai Shi committed
76
### `OpenPCDet` design pattern
Shaoshuai Shi's avatar
Shaoshuai Shi committed
77

Shaoshuai Shi's avatar
Shaoshuai Shi committed
78
* Data-Model separation with unified point cloud coordinate for easily extending to custom datasets:
Shaoshuai Shi's avatar
Shaoshuai Shi committed
79
80
81
82
<p align="center">
  <img src="docs/dataset_vs_model.png" width="95%" height="320">
</p>

Shaoshuai Shi's avatar
Shaoshuai Shi committed
83
84
* Unified 3D box definition: (x, y, z, dx, dy, dz, heading).

Shaoshuai Shi's avatar
Shaoshuai Shi committed
85
86
87
88
89
* Flexible and clear model structure to easily support various 3D detection models: 
<p align="center">
  <img src="docs/model_framework.png" width="95%">
</p>

Shaoshuai Shi's avatar
Shaoshuai Shi committed
90
91
92
93
* Support various models within one framework as: 
<p align="center">
  <img src="docs/multiple_models_demo.png" width="95%">
</p>
Shaoshuai Shi's avatar
Shaoshuai Shi committed
94

Shaoshuai Shi's avatar
Shaoshuai Shi committed
95

Shaoshuai Shi's avatar
Shaoshuai Shi committed
96
### Currently Supported Features
Shaoshuai Shi's avatar
Shaoshuai Shi committed
97

Shaoshuai Shi's avatar
Shaoshuai Shi committed
98
- [x] Support both one-stage and two-stage 3D object detection frameworks
Shaoshuai Shi's avatar
Shaoshuai Shi committed
99
100
101
102
103
104
105
- [x] Support distributed training & testing with multiple GPUs and multiple machines
- [x] Support multiple heads on different scales to detect different classes
- [x] Support stacked version set abstraction to encode various number of points in different scenes
- [x] Support Adaptive Training Sample Selection (ATSS) for target assignment
- [x] Support RoI-aware point cloud pooling & RoI-grid point cloud pooling
- [x] Support GPU version 3D IoU calculation and rotated NMS 

Shaoshuai Shi's avatar
Shaoshuai Shi committed
106

Shaoshuai Shi's avatar
Shaoshuai Shi committed
107
108
109
## Model Zoo

### KITTI 3D Object Detection Baselines
110
Selected supported methods are shown in the below table. The results are the 3D detection performance of moderate difficulty on the *val* set of KITTI dataset.
Shaoshuai Shi's avatar
Shaoshuai Shi committed
111
112
* All models are trained with 8 GTX 1080Ti GPUs and are available for download. 
* The training time is measured with 8 TITAN XP GPUs and PyTorch 1.5.
Shaoshuai Shi's avatar
Shaoshuai Shi committed
113

Shaoshuai Shi's avatar
Shaoshuai Shi committed
114
|                                             | training time | Car@R11 | Pedestrian@R11 | Cyclist@R11  | download | 
Shaoshuai Shi's avatar
Shaoshuai Shi committed
115
|---------------------------------------------|----------:|:-------:|:-------:|:-------:|:---------:|
Shaoshuai Shi's avatar
Shaoshuai Shi committed
116
117
| [PointPillar](tools/cfgs/kitti_models/pointpillar.yaml) |~1.2 hours| 77.28 | 52.29 | 62.68 | [model-18M](https://drive.google.com/file/d/1wMxWTpU1qUoY3DsCH31WJmvJxcjFXKlm/view?usp=sharing) | 
| [SECOND](tools/cfgs/kitti_models/second.yaml)       |  ~1.7 hours  | 78.62 | 52.98 | 67.15 | [model-20M](https://drive.google.com/file/d/1-01zsPOsqanZQqIIyy7FpNXStL3y4jdR/view?usp=sharing) |
118
| [SECOND-IoU](tools/cfgs/kitti_models/second_iou.yaml)       | -  | 79.09 | 55.74 | 71.31 | [model-46M](https://drive.google.com/file/d/1AQkeNs4bxhvhDQ-5sEo_yvQUlfo73lsW/view?usp=sharing) |
Shaoshuai Shi's avatar
Shaoshuai Shi committed
119
120
| [PointRCNN](tools/cfgs/kitti_models/pointrcnn.yaml) | ~3 hours | 78.70 | 54.41 | 72.11 | [model-16M](https://drive.google.com/file/d/1BCX9wMn-GYAfSOPpyxf6Iv6fc0qKLSiU/view?usp=sharing)| 
| [PointRCNN-IoU](tools/cfgs/kitti_models/pointrcnn_iou.yaml) | ~3 hours | 78.75 | 58.32 | 71.34 | [model-16M](https://drive.google.com/file/d/1V0vNZ3lAHpEEt0MlT80eL2f41K2tHm_D/view?usp=sharing)|
121
122
| [Part-A2-Free](tools/cfgs/kitti_models/PartA2_free.yaml)   | ~3.8 hours| 78.72 | 65.99 | 74.29 | [model-226M](https://drive.google.com/file/d/1lcUUxF8mJgZ_e-tZhP1XNQtTBuC-R0zr/view?usp=sharing) |
| [Part-A2-Anchor](tools/cfgs/kitti_models/PartA2.yaml)    | ~4.3 hours| 79.40 | 60.05 | 69.90 | [model-244M](https://drive.google.com/file/d/10GK1aCkLqxGNeX3lVu8cLZyE0G8002hY/view?usp=sharing) |
Shaoshuai Shi's avatar
Shaoshuai Shi committed
123
| [PV-RCNN](tools/cfgs/kitti_models/pv_rcnn.yaml) | ~5 hours| 83.61 | 57.90 | 70.47 | [model-50M](https://drive.google.com/file/d/1lIOq4Hxr0W3qsX83ilQv0nk1Cls6KAr-/view?usp=sharing) |
djiajunustc's avatar
djiajunustc committed
124
| [Voxel R-CNN (Car)](tools/cfgs/kitti_models/voxel_rcnn_car.yaml) | ~2.2 hours| 84.54 | - | - | [model-28M](https://drive.google.com/file/d/19_jiAeGLz7V0wNjSJw4cKmMjdm5EW5By/view?usp=sharing) |
125
126
||
| [CaDDN (Mono)](tools/cfgs/kitti_models/CaDDN.yaml) |~15 hours| 21.38 | 13.02 | 9.76 | [model-774M](https://drive.google.com/file/d/1OQTO2PtXT8GGr35W9m2GZGuqgb6fyU1V/view?usp=sharing) |
Shaoshuai Shi's avatar
Shaoshuai Shi committed
127

Shaoshuai Shi's avatar
Shaoshuai Shi committed
128
### Waymo Open Dataset Baselines
Shaoshuai Shi's avatar
Shaoshuai Shi committed
129
We provide the setting of [`DATA_CONFIG.SAMPLED_INTERVAL`](tools/cfgs/dataset_configs/waymo_dataset.yaml) on the Waymo Open Dataset (WOD) to subsample partial samples for training and evaluation, 
Shaoshuai Shi's avatar
Shaoshuai Shi committed
130
so you could also play with WOD by setting a smaller `DATA_CONFIG.SAMPLED_INTERVAL` even if you only have limited GPU resources. 
Shaoshuai Shi's avatar
Shaoshuai Shi committed
131

Shaoshuai Shi's avatar
Shaoshuai Shi committed
132
By default, all models are trained with **20% data (~32k frames)** of all the training samples on 8 GTX 1080Ti GPUs, and the results of each cell here are mAP/mAPH calculated by the official Waymo evaluation metrics on the **whole** validation set (version 1.2).    
Shaoshuai Shi's avatar
Shaoshuai Shi committed
133

134
|    Performance@(train with 20\% Data)            | Vec_L1 | Vec_L2 | Ped_L1 | Ped_L2 | Cyc_L1 | Cyc_L2 |  
Shaoshuai Shi's avatar
Shaoshuai Shi committed
135
|---------------------------------------------|----------:|:-------:|:-------:|:-------:|:-------:|:-------:|
136
| [SECOND](tools/cfgs/waymo_models/second.yaml) | 70.96/70.34|62.58/62.02|65.23/54.24	|57.22/47.49|	57.13/55.62 |	54.97/53.53 | 
137
138
139
| [PointPillar](tools/cfgs/waymo_models/pointpillar_1x.yaml) | 70.43/69.83 |	62.18/61.64 | 66.21/46.32|58.18/40.64|55.26/51.75|53.18/49.80 |
[CenterPoint-Pillar](tools/cfgs/waymo_models/centerpoint_pillar_1x.yaml)| 70.50/69.96|62.18/61.69|73.11/61.97|65.06/55.00|65.44/63.85|62.98/61.46| 
[CenterPoint](tools/cfgs/waymo_models/centerpoint_without_resnet.yaml)| 71.33/70.76|63.16/62.65|	72.09/65.49	|64.27/58.23|	68.68/67.39	|66.11/64.87|
140
| [CenterPoint (ResNet)](tools/cfgs/waymo_models/centerpoint.yaml)|72.76/72.23|64.91/64.42	|74.19/67.96	|66.03/60.34|	71.04/69.79	|68.49/67.28 |
141
142
143
| [Part-A2-Anchor](tools/cfgs/waymo_models/PartA2.yaml) | 74.66/74.12	|65.82/65.32	|71.71/62.24	|62.46/54.06	|66.53/65.18	|64.05/62.75 |
| [PV-RCNN (AnchorHead)](tools/cfgs/waymo_models/pv_rcnn.yaml) | 75.41/74.74	|67.44/66.80	|71.98/61.24	|63.70/53.95	|65.88/64.25	|63.39/61.82 | 
| [PV-RCNN (CenterHead)](tools/cfgs/waymo_models/pv_rcnn_with_centerhead_rpn.yaml) | 75.95/75.43	|68.02/67.54	|75.94/69.40	|67.66/61.62	|70.18/68.98	|67.73/66.57|
Shaoshuai Shi's avatar
Shaoshuai Shi committed
144

145
146
We could not provide the above pretrained models due to [Waymo Dataset License Agreement](https://waymo.com/open/terms/), 
but you could easily achieve similar performance by training with the default configs.
Shaoshuai Shi's avatar
Shaoshuai Shi committed
147

148
149
150
151
152
153
154
155
### NuScenes 3D Object Detection Baselines
All models are trained with 8 GTX 1080Ti GPUs and are available for download.

|                                             | mATE | mASE | mAOE | mAVE | mAAE | mAP | NDS | download | 
|---------------------------------------------|----------:|:-------:|:-------:|:-------:|:---------:|:-------:|:-------:|:---------:|
| [PointPillar-MultiHead](tools/cfgs/nuscenes_models/cbgs_pp_multihead.yaml) | 33.87	| 26.00 | 32.07	| 28.74 | 20.15 | 44.63 | 58.23	 | [model-23M](https://drive.google.com/file/d/1p-501mTWsq0G9RzroTWSXreIMyTUUpBM/view?usp=sharing) | 
| [SECOND-MultiHead (CBGS)](tools/cfgs/nuscenes_models/cbgs_second_multihead.yaml) | 31.15 |	25.51 |	26.64 | 26.26 | 20.46 | 50.59 | 62.29 | [model-35M](https://drive.google.com/file/d/1bNzcOnE3u9iooBFMk2xK7HqhdeQ_nwTq/view?usp=sharing) |

Shaoshuai Shi's avatar
Shaoshuai Shi committed
156

Shaoshuai Shi's avatar
Shaoshuai Shi committed
157

Shaoshuai Shi's avatar
Shaoshuai Shi committed
158
### Other datasets
159
Welcome to support other datasets by submitting pull request. 
Shaoshuai Shi's avatar
Shaoshuai Shi committed
160

Shaoshuai Shi's avatar
Shaoshuai Shi committed
161
162
## Installation

Shaoshuai Shi's avatar
Shaoshuai Shi committed
163
Please refer to [INSTALL.md](docs/INSTALL.md) for the installation of `OpenPCDet`.
Shaoshuai Shi's avatar
Shaoshuai Shi committed
164
165


166
167
168
169
## Quick Demo
Please refer to [DEMO.md](docs/DEMO.md) for a quick demo to test with a pretrained model and 
visualize the predicted results on your custom data or the original KITTI data.

Shaoshuai Shi's avatar
Shaoshuai Shi committed
170
## Getting Started
Shaoshuai Shi's avatar
Shaoshuai Shi committed
171
172
173

Please refer to [GETTING_STARTED.md](docs/GETTING_STARTED.md) to learn more usage about this project.

174

Shaoshuai Shi's avatar
Shaoshuai Shi committed
175
176
## License

Shaoshuai Shi's avatar
Shaoshuai Shi committed
177
`OpenPCDet` is released under the [Apache 2.0 license](LICENSE).
Shaoshuai Shi's avatar
Shaoshuai Shi committed
178
179

## Acknowledgement
Shaoshuai Shi's avatar
Shaoshuai Shi committed
180
`OpenPCDet` is an open source project for LiDAR-based 3D scene perception that supports multiple
Shaoshuai Shi's avatar
Shaoshuai Shi committed
181
182
183
184
185
186
187
188
189
190
191
LiDAR-based perception models as shown above. Some parts of `PCDet` are learned from the official released codes of the above supported methods. 
We would like to thank for their proposed methods and the official implementation.   

We hope that this repo could serve as a strong and flexible codebase to benefit the research community by speeding up the process of reimplementing previous works and/or developing new methods.


## Citation 
If you find this project useful in your research, please consider cite:


```
Shaoshuai Shi's avatar
Shaoshuai Shi committed
192
@misc{openpcdet2020,
Shaoshuai Shi's avatar
Shaoshuai Shi committed
193
194
195
196
    title={OpenPCDet: An Open-source Toolbox for 3D Object Detection from Point Clouds},
    author={OpenPCDet Development Team},
    howpublished = {\url{https://github.com/open-mmlab/OpenPCDet}},
    year={2020}
Shaoshuai Shi's avatar
Shaoshuai Shi committed
197
}
Shaoshuai Shi's avatar
Shaoshuai Shi committed
198
```
Shaoshuai Shi's avatar
Shaoshuai Shi committed
199

Shaoshuai Shi's avatar
Shaoshuai Shi committed
200
201
## Contribution
Welcome to be a member of the OpenPCDet development team by contributing to this repo, and feel free to contact us for any potential contributions. 
Shaoshuai Shi's avatar
Shaoshuai Shi committed
202

Shaoshuai Shi's avatar
Shaoshuai Shi committed
203