benchmarks.md 7.22 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
24
25
26
27
28
29
30
  +----------------+---------------------+--------------------+--------+
  | 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
31
32
33
34
```

### PointPillars

35
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
36
37
38
39
40
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
41
42
43
  +----------------+---------------------+--------------------+
  | Implementation | Training (sample/s) | Testing (sample/s) |
  +================+=====================+====================+
wuyuefeng's avatar
wuyuefeng committed
44
  | MMDetection3D  |         141         |       44.3         |
45
46
47
  +----------------+---------------------+--------------------+
  | Det3D          |         140         |        20          |
  +----------------+---------------------+--------------------+
zhangwenwei's avatar
zhangwenwei committed
48
49
50
```

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

### SECOND

62
63
[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
64
65
66
67
condition following the KITTI benchmark and compare average AP over all classes on moderate condition for
performance on 3 classes.

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

### Part-A2

79
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
80
81
82
and compare average AP over all classes on moderate condition for performance on 3 classes.

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

## Details of Comparison

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

* __Det3D__: At commit 255c593


* __PCDet__: At commit 2244be4



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

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


### PointPillars

* __MMDetection3D__: With release v0.1.0, run
```
119
./tools/dist_train.sh configs/benchmark/hv_pointpillars_secfpn_6x8_160e_pcdet_kitti-3d-3class.py 8 --no-validate
zhangwenwei's avatar
zhangwenwei committed
120
121
```
* __PCDet__: At commit xxxx
122
123
124
125
126
127
128
129
```
./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
130
* __Det3D__: At commit 255c593, use kitti_point_pillars_mghead_syncbn.py and run
131
```
wuyuefeng's avatar
wuyuefeng committed
132
133
134
./tools/scripts/train.sh --launcher=slurm --gpus=8
```
Note that the config in train.sh is modified to train point pillars.
135
```
wuyuefeng's avatar
wuyuefeng committed
136
137
138
139
140
141
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
zhangwenwei's avatar
zhangwenwei committed
142

wuyuefeng's avatar
wuyuefeng committed
143
144
145
146
147
148
149
150
151
152
 # 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
```
zhangwenwei's avatar
zhangwenwei committed
153
154
155
156
157

### SECOND

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

161
* __PCDet__: At commit 2244be4
zhangwenwei's avatar
zhangwenwei committed
162
163
164
165
166
167


### Part-A2

* __MMDetection3D__: With release v0.1.0, run
```
168
./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
169
170
```

171
* __PCDet__: