benchmarks.md 7.29 KB
Newer Older
zhangwenwei's avatar
zhangwenwei committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

# Benchmarks

Here we benchmark the training and testing speed of models in MMDetection3D,
with some other popular open source 3D detection codebases.


## Settings

* Hardwares: 8 NVIDIA Tesla V100 (32G) GPUs, Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz
* Software: Python 3.7, CUDA 10.1, cuDNN 7.6.5, PyTorch 1.3, numba 0.48.0.
* Model: Since all the other codebases implements different models, we compare the corresponding models with them separately. We try to use as similar settings as those of other codebases as possible using [benchmark configs](https://github.com/open-mmlab/MMDetection3D/blob/master/configs/benchmark).
* Metrics: We use the average throughput in iterations of the entire training run and skip the first 50 iterations of each epoch to skip GPU warmup time.
  Note that the throughput of a detector typically changes during training, because it depends on the predictions of the model.


## Main Results

### VoteNet

21
We compare our implementation of VoteNet with [votenet](https://github.com/facebookresearch/votenet/) and report the performance on SUNRGB-D v2 dataset under the AP@0.5 metric.
zhangwenwei's avatar
zhangwenwei committed
22
23

```eval_rst
ZwwWayne's avatar
ZwwWayne committed
24
25
26
27
28
29
30
31
+----------------+---------------------+--------------------+--------+
| Implementation | Training (sample/s) | Testing (sample/s) | AP@0.5 |
+================+=====================+====================+========+
| MMDetection3D  |        358          |         17         |  35.8  |
+----------------+---------------------+--------------------+--------+
| votenet_       |        77           |         3          |  31.5  |
+----------------+---------------------+--------------------+--------+

zhangwenwei's avatar
zhangwenwei committed
32
33
34
35
```

### PointPillars

36
Since [Det3D](https://github.com/poodarchu/Det3D/) only provides PointPillars on car class while [PCDet](https://github.com/sshaoshuai/PCDet) only provides PointPillars
zhangwenwei's avatar
zhangwenwei committed
37
38
39
40
41
on 3 classes, we compare with them separately. For performance on single class, we report the AP on moderate
condition following the KITTI benchmark and compare average AP over all classes on moderate condition for
performance on 3 classes.

```eval_rst
ZwwWayne's avatar
ZwwWayne committed
42
43
44
45
46
47
48
+----------------+---------------------+--------------------+
| Implementation | Training (sample/s) | Testing (sample/s) |
+================+=====================+====================+
| MMDetection3D  |         141         |       44.3         |
+----------------+---------------------+--------------------+
| Det3D          |         140         |        20          |
+----------------+---------------------+--------------------+
zhangwenwei's avatar
zhangwenwei committed
49
50
51
```

```eval_rst
ZwwWayne's avatar
ZwwWayne committed
52
53
54
55
56
57
58
+----------------+---------------------+--------------------+
| Implementation | Training (sample/s) | Testing (sample/s) |
+================+=====================+====================+
| MMDetection3D  |         120         |                    |
+----------------+---------------------+--------------------+
| PCDet          |         43          |        64          |
+----------------+---------------------+--------------------+
zhangwenwei's avatar
zhangwenwei committed
59
60
61
62
```

### SECOND

63
64
[Det3D](https://github.com/poodarchu/Det3D/) provides a different SECOND on car class and we cannot train the original SECOND by modifying the config.
So we only compare with [PCDet](https://github.com/sshaoshuai/PCDet), which is a SECOND model on 3 classes, we report the AP on moderate
zhangwenwei's avatar
zhangwenwei committed
65
66
67
condition following the KITTI benchmark and compare average AP over all classes on moderate condition for
performance on 3 classes.

ZwwWayne's avatar
ZwwWayne committed
68
69
70
71
72
73
74
75
76
```eval_rst
+----------------+---------------------+--------------------+
| Implementation | Training (sample/s) | Testing (sample/s) |
+================+=====================+====================+
| MMDetection3D  |         54          |                    |
+----------------+---------------------+--------------------+
| PCDet          |         44          |         30         |
+----------------+---------------------+--------------------+
```
zhangwenwei's avatar
zhangwenwei committed
77
78
79

### Part-A2

80
We benchmark Part-A2 with that in [PCDet](https://github.com/sshaoshuai/PCDet). We report the AP on moderate condition following the KITTI benchmark
zhangwenwei's avatar
zhangwenwei committed
81
82
and compare average AP over all classes on moderate condition for performance on 3 classes.

ZwwWayne's avatar
ZwwWayne committed
83
84
85
86
87
88
89
90
91
```eval_rst
+----------------+---------------------+--------------------+
| Implementation | Training (sample/s) | Testing (sample/s) |
+================+=====================+====================+
| MMDetection3D  |         17          |                    |
+----------------+---------------------+--------------------+
| PCDet          |         15          |         12         |
+----------------+---------------------+--------------------+
```
zhangwenwei's avatar
zhangwenwei committed
92
93
94

## Details of Comparison

95
96
97
98
99
100
101
102
103
### Modification for Calculating Speed

* __Det3D__: At commit 255c593


* __PCDet__: At commit 2244be4



zhangwenwei's avatar
zhangwenwei committed
104
105
106
107
### VoteNet

* __MMDetection3D__: With release v0.1.0, run
```
108
109
./tools/dist_train.sh configs/votenet/votenet_16x8_sunrgbd-3d-10class.py 8 --no-validate
```
wuyuefeng's avatar
wuyuefeng committed
110
* __votenet__: At commit 2f6d6d3, run
111
```
wuyuefeng's avatar
wuyuefeng committed
112
python train.py --dataset sunrgbd --batch_size 16
zhangwenwei's avatar
zhangwenwei committed
113
114
115
116
117
118
119
```


### PointPillars

* __MMDetection3D__: With release v0.1.0, run
```
120
./tools/dist_train.sh configs/benchmark/hv_pointpillars_secfpn_6x8_160e_pcdet_kitti-3d-3class.py 8 --no-validate
zhangwenwei's avatar
zhangwenwei committed
121
122
```
* __PCDet__: At commit xxxx
123
124
125
126
127
128
129
130
```
./tools/dist_train.sh configs/benchmark/hv_pointpillars_secfpn_6x8_160e_pcdet_kitti-3d-3class.py 8 --no-validate
```

* __MMDetection3D__: With release v0.1.0, run
```
./tools/dist_train.sh configs/benchmark/hv_pointpillars_secfpn_3x8_100e_det3d_kitti-3d-car.py 8 --no-validate
```
wuyuefeng's avatar
wuyuefeng committed
131
* __Det3D__: At commit 255c593, use kitti_point_pillars_mghead_syncbn.py and run
ZwwWayne's avatar
ZwwWayne committed
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
  ```
  ./tools/scripts/train.sh --launcher=slurm --gpus=8
  ```
  Note that the config in train.sh is modified to train point pillars.

  <details>
  <summary>
  (diff to make it use the same hyperparameters - click to expand)
  </summary>

  ```diff
  diff --git a/tools/scripts/train.sh b/tools/scripts/train.sh
  index 3a93f95..461e0ea 100755
  --- a/tools/scripts/train.sh
  +++ b/tools/scripts/train.sh
  @@ -16,9 +16,9 @@ then
   fi

   # Voxelnet
  -python -m torch.distributed.launch --nproc_per_node=8 ./tools/train.py examples/second/configs/  kitti_car_vfev3_spmiddlefhd_rpn1_mghead_syncbn.py --work_dir=$SECOND_WORK_DIR
  +# python -m torch.distributed.launch --nproc_per_node=8 ./tools/train.py examples/second/configs/  kitti_car_vfev3_spmiddlefhd_rpn1_mghead_syncbn.py --work_dir=$SECOND_WORK_DIR
   # python -m torch.distributed.launch --nproc_per_node=8 ./tools/train.py examples/cbgs/configs/  nusc_all_vfev3_spmiddleresnetfhd_rpn2_mghead_syncbn.py --work_dir=$NUSC_CBGS_WORK_DIR
   # python -m torch.distributed.launch --nproc_per_node=8 ./tools/train.py examples/second/configs/  lyft_all_vfev3_spmiddleresnetfhd_rpn2_mghead_syncbn.py --work_dir=$LYFT_CBGS_WORK_DIR

   # PointPillars
  -# python -m torch.distributed.launch --nproc_per_node=8 ./tools/train.py ./examples/point_pillars/configs/  original_pp_mghead_syncbn_kitti.py --work_dir=$PP_WORK_DIR
  +python -m torch.distributed.launch --nproc_per_node=8 ./tools/train.py ./examples/point_pillars/configs/  kitti_point_pillars_mghead_syncbn.py
  ```
wuyuefeng's avatar
wuyuefeng committed
160

ZwwWayne's avatar
ZwwWayne committed
161
  </details>
zhangwenwei's avatar
zhangwenwei committed
162
163
164
165
166

### SECOND

* __MMDetection3D__: With release v0.1.0, run
```
167
./tools/dist_train.sh configs/benchmark/hv_second_secfpn_6x8_80e_pcdet_kitti-3d-3class.py 8 --no-validate
zhangwenwei's avatar
zhangwenwei committed
168
169
```

170
* __PCDet__: At commit 2244be4
zhangwenwei's avatar
zhangwenwei committed
171
172
173
174
175
176


### Part-A2

* __MMDetection3D__: With release v0.1.0, run
```
177
./tools/dist_train.sh configs/benchmark/hv_PartA2_secfpn_2x8_cyclic_80e_pcdet_kitti-3d-3class.py 8 --no-validate
zhangwenwei's avatar
zhangwenwei committed
178
179
```

180
* __PCDet__: