README.md 9.29 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

Shaoshuai Shi's avatar
Shaoshuai Shi committed
7
It is also the official code release of [`[PointRCNN]`](https://arxiv.org/abs/1812.04244), [`[Part-A^2 net]`](https://arxiv.org/abs/1907.03670) and [`[PV-RCNN]`](https://arxiv.org/abs/1912.13192). 
Shaoshuai Shi's avatar
Shaoshuai Shi committed
8
9
10
11
12


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


## Changelog
Shaoshuai Shi's avatar
Shaoshuai Shi committed
21
22
[2020-11-10] **NEW:** The Waymo Open Dataset has been supported with SoTA results. By now we provid the 
configs of `SECOND`, `PartA2` and `PV-RCNN` on the Waymo Open Dataset, and more models could be easily supported by modifying their dataset configs. 
23

Shaoshuai Shi's avatar
Shaoshuai Shi committed
24
25
26
[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
27
28
29
30
   * 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)).
   * High efficiency than last version, support `PyTorch 1.1~1.5` and `spconv 1.0~1.2` simultaneously.
   
Shaoshuai Shi's avatar
Shaoshuai Shi committed
31
32
33
34
35
36
37
38
[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
39

40

Shaoshuai Shi's avatar
Shaoshuai Shi committed
41
### What does `OpenPCDet` toolbox do?
Shaoshuai Shi's avatar
Shaoshuai Shi committed
42

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

Shaoshuai Shi's avatar
Shaoshuai Shi committed
45
`OpenPCDet` is a general PyTorch-based codebase for 3D object detection from point cloud. 
Shaoshuai Shi's avatar
Shaoshuai Shi committed
46
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
47

Shaoshuai Shi's avatar
Shaoshuai Shi committed
48
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
49
[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
50
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
51

Shaoshuai Shi's avatar
Shaoshuai Shi committed
52
53
54
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
55
### `OpenPCDet` design pattern
Shaoshuai Shi's avatar
Shaoshuai Shi committed
56

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

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

Shaoshuai Shi's avatar
Shaoshuai Shi committed
64
65
66
67
68
* 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
69
70
71
72
* 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
73

Shaoshuai Shi's avatar
Shaoshuai Shi committed
74

Shaoshuai Shi's avatar
Shaoshuai Shi committed
75
### Currently Supported Features
Shaoshuai Shi's avatar
Shaoshuai Shi committed
76

Shaoshuai Shi's avatar
Shaoshuai Shi committed
77
- [x] Support both one-stage and two-stage 3D object detection frameworks
Shaoshuai Shi's avatar
Shaoshuai Shi committed
78
79
80
81
82
83
84
- [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
85

Shaoshuai Shi's avatar
Shaoshuai Shi committed
86
87
88
## Model Zoo

### KITTI 3D Object Detection Baselines
89
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
90
91
* 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
92

Shaoshuai Shi's avatar
Shaoshuai Shi committed
93
|                                             | training time | Car@R11 | Pedestrian@R11 | Cyclist@R11  | download | 
Shaoshuai Shi's avatar
Shaoshuai Shi committed
94
|---------------------------------------------|----------:|:-------:|:-------:|:-------:|:---------:|
Shaoshuai Shi's avatar
Shaoshuai Shi committed
95
96
| [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) |
Shaoshuai Shi's avatar
Shaoshuai Shi committed
97
98
| [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)|
Shaoshuai Shi's avatar
Shaoshuai Shi committed
99
100
101
| [Part-A^2-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-A^2-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) |
| [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) |
Shaoshuai Shi's avatar
Shaoshuai Shi committed
102
103

### NuScenes 3D Object Detection Baselines
104
105
All models are trained with 8 GTX 1080Ti GPUs and are available for download.

Shaoshuai Shi's avatar
Shaoshuai Shi committed
106
107
|                                             | mATE | mASE | mAOE | mAVE | mAAE | mAP | NDS | download | 
|---------------------------------------------|----------:|:-------:|:-------:|:-------:|:---------:|:-------:|:-------:|:---------:|
108
109
| [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
110

Shaoshuai Shi's avatar
Shaoshuai Shi committed
111
112
113
114
115
116
117
118
119
120
121
122
123
124
### Waymo Open Dataset Baselines
We provide the setting of `DATA_CONFIG.SAMPLED_INTERVAL` on the Waymo Open Dataset (WOD) to subsample partial samples for training and evaluation, 
so you could also play with WOD by setting a smaller `DATA_CONFIG.SAMPLED_INTERVAL` if you only have limited GPU resources. 

By default, all models are trained with **20% data (~32k frames)** of all the training samples, and the results of each cell here are mAP/mAPH calculated by the official Waymo evaluation metrics on the **whole** validation set.    

|                                             | Vec_L1 | Vec_L2 | Ped_L1 | Ped_L2 | Cyc_L1 | Cyc_L2 |  
|---------------------------------------------|----------:|:-------:|:-------:|:-------:|:-------:|:-------:|
| [SECOND](tools/cfgs/waymo_models/second.yaml) | 68.03/67.44	| 59.57/59.04 | 61.14/50.33	| 53.00/43.56 | 54.66/53.31 | 52.67/51.37 | 
| [PartA2](tools/cfgs/waymo_models/PartA2.yaml) | 71.82/71.29 | 64.33/63.82 | 63.15/54.96 | 54.24/47.11 | 65.23/63.92 | 62.61/61.35 |
| [PV-RCNN](tools/cfgs/waymo_models/pv_rcnn.yaml) | 74.06/73.38 | 64.99/64.38 |	62.66/52.68 | 53.80/45.14 |	63.32/61.71	| 60.72/59.18 | 



Shaoshuai Shi's avatar
Shaoshuai Shi committed
125

Shaoshuai Shi's avatar
Shaoshuai Shi committed
126
127
128
### Other datasets
More datasets are on the way. 

Shaoshuai Shi's avatar
Shaoshuai Shi committed
129
130
## Installation

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


134
135
136
137
## 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
138
## Getting Started
Shaoshuai Shi's avatar
Shaoshuai Shi committed
139
140
141

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

142

Shaoshuai Shi's avatar
Shaoshuai Shi committed
143
144
## License

Shaoshuai Shi's avatar
Shaoshuai Shi committed
145
`OpenPCDet` is released under the [Apache 2.0 license](LICENSE).
Shaoshuai Shi's avatar
Shaoshuai Shi committed
146
147

## Acknowledgement
Shaoshuai Shi's avatar
Shaoshuai Shi committed
148
`OpenPCDet` is an open source project for LiDAR-based 3D scene perception that supports multiple
Shaoshuai Shi's avatar
Shaoshuai Shi committed
149
150
151
152
153
154
155
156
157
158
159
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
160
161
162
163
164
@misc{openpcdet2020,
	title={OpenPCDet: An Open-source Toolbox for 3D Object Detection from Point Cloud},
	author={OpenPCDet Development Team},
	howpublished = {\url{https://github.com/open-mmlab/OpenPCDet}}
	year={2020}
Shaoshuai Shi's avatar
Shaoshuai Shi committed
165
}
Shaoshuai Shi's avatar
Shaoshuai Shi committed
166
```
Shaoshuai Shi's avatar
Shaoshuai Shi committed
167

Shaoshuai Shi's avatar
Shaoshuai Shi committed
168
169
## 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
170

Shaoshuai Shi's avatar
Shaoshuai Shi committed
171