mmdetection 中文文档三(由原英文文档翻译)

三、基准和模型Zoo(本章表格数据请参照英文原版)
(一)环境
1.硬件
• 8 NVIDIA Tesla V100 GPUs
• Intel Xeon 4114 CPU @ 2.20GHz
2.软件环境
• Python 3.6 / 3.7
• PyTorch 1.1
• CUDA 9.0.176
• CUDNN 7.0.4
• NCCL 2.1.15
(二)镜像站
我们使用AWS来管理我们的模型zoo,在阿里云上维护了一个镜像。你可以使用https://open-mmlab.oss-cn-beijing.aliyuncs.com来代替https://s3.ap-northeast-2.amazonaws.com/open-mmlab作为模型urls
(三)基本设置
1.所有的FPN baselines 和RPN-C4 baselines 是在使用8个GPU,batch size 为16(每个GPU 2个图片)的情况下训练的。其他的C4 baselines是在使用8个GPU,batch size 为8(每个GPU 1个图片)的情况下训练的。
2.所有的模型在coco_2017_train下训练,测试在coco_2017_val下测试。
3.我们在BN层不变的情况下使用分布式训练。
4.我们采用相同的训练计划作为Detectron。1x代表12 epochs,2x代表24 epochs,比Detectron稍小的迭代和不一致可以被忽略。
5.在ImageNet上所有的pytorch-style预训练骨干,都来自PyTorch 模型zoo.
6.为了公平的与其他基代码相比较,我们为所有的8个GPU,公布了torch.cuda.max_memory_allocated()可设定的最大GPU显存值。注意,这个值常常比nvidia-smi显示的要低。
7.我们发布的推理(预测,运行,测试)时间包括了所有的时间,包括数据加载,网络转发和后置处理时间。
(四)基线
包含不同骨干的更多模型将被增加到模型zoo。
RPN
Backbone Style Lr schd Mem (GB) Train time (s/iter) Inf time (fps) AR1000 Download
R-50-C4 caffe 1x - - 20.5 51.1 model

R-50-C4 caffe 2x 2.2 0.17 20.3 52.2 model

R-50-C4 pytorch 1x - - 20.1 50.2 model

R-50-C4 pytorch 2x - - 20.0 51.1 model

R-50-FPN caffe 1x 3.3 0.253 16.9 58.2 -
R-50-FPN pytorch 1x 3.5 0.276 17.7 57.1 model

R-50-FPN pytorch 2x - - - 57.6 model

R-101-FPN caffe 1x 5.2 0.379 13.9 59.4 -
R-101-FPN pytorch 1x 5.4 0.396 14.4 58.6 model

R-101-FPN pytorch 2x - - - 59.1 model

X-101-32x4d-FPN pytorch 1x 6.6 0.589 11.8 59.4 model

X-101-32x4d-FPN pytorch 2x - - - 59.9 model

X-101-64x4d-FPN pytorch 1x 9.5 0.955 8.3 59.8 model

X-101-64x4d-FPN pytorch 2x - - - 60.0 model

Faster R-CNN
Backbone Style Lr schd Mem (GB) Train time (s/iter) Inf time (fps) box AP Download
R-50-C4 caffe 1x - - 9.5 34.9 model

R-50-C4 caffe 2x 4.0 0.39 9.3 36.5 model

R-50-C4 pytorch 1x - - 9.3 33.9 model

R-50-C4 pytorch 2x - - 9.4 35.9 model

R-50-FPN caffe 1x 3.6 0.333 13.5 36.6 -
R-50-FPN pytorch 1x 3.8 0.353 13.6 36.4 model

R-50-FPN pytorch 2x - - - 37.7 model

R-101-FPN caffe 1x 5.5 0.465 11.5 38.8 -
R-101-FPN pytorch 1x 5.7 0.474 11.9 38.5 model

R-101-FPN pytorch 2x - - - 39.4 model

X-101-32x4d-FPN pytorch 1x 6.9 0.672 10.3 40.1 model

X-101-32x4d-FPN pytorch 2x - - - 40.4 model

X-101-64x4d-FPN pytorch 1x 9.8 1.040 7.3 41.3 model

X-101-64x4d-FPN pytorch 2x - - - 40.7 model

HRNetV2p-W18 pytorch 1x - - - 36.1 model

HRNetV2p-W18 pytorch 2x - - - 38.3 model

HRNetV2p-W32 pytorch 1x - - - 39.5 model

HRNetV2p-W32 pytorch 2x - - - 40.6 model

HRNetV2p-W48 pytorch 1x - - - 40.9 model

HRNetV2p-W48 pytorch 2x - - - 41.5 model

Mask R-CNN
Backbone Style Lr schd Mem (GB) Train time (s/iter) Inf time (fps) box AP mask AP Download
R-50-C4 caffe 1x - - 8.1 35.9 31.5 model

R-50-C4 caffe 2x 4.2 0.43 8.1 37.9 32.9 model

R-50-C4 pytorch 1x - - 7.9 35.1 31.2 model

R-50-C4 pytorch 2x - - 8.0 37.2 32.5 model

R-50-FPN caffe 1x 3.8 0.430 10.2 37.4 34.3 -
R-50-FPN pytorch 1x 3.9 0.453 10.6 37.3 34.2 model

R-50-FPN pytorch 2x - - - 38.5 35.1 model

R-101-FPN caffe 1x 5.7 0.534 9.4 39.9 36.1 -
R-101-FPN pytorch 1x 5.8 0.571 9.5 39.4 35.9 model

R-101-FPN pytorch 2x - - - 40.3 36.5 model

X-101-32x4d-FPN pytorch 1x 7.1 0.759 8.3 41.1 37.1 model

X-101-32x4d-FPN pytorch 2x - - - 41.4 37.1 model

X-101-64x4d-FPN pytorch 1x 10.0 1.102 6.5 42.1 38.0 model

X-101-64x4d-FPN pytorch 2x - - - 42.0 37.7 model

HRNetV2p-W18 pytorch 1x - - - 37.3 34.2 model

HRNetV2p-W18 pytorch 2x - - - 39.2 35.7 model

HRNetV2p-W32 pytorch 1x - - - 40.7 36.8 model

HRNetV2p-W32 pytorch 2x - - - 41.7 37.5 model

HRNetV2p-W48 pytorch 1x - - - 42.4 38.1 model

HRNetV2p-W48 pytorch 2x - - - 42.9 38.3 model

Fast R-CNN (with pre-computed proposals)
Backbone Style Type Lr schd Mem (GB) Train time (s/iter) Inf time (fps) box AP mask AP Download
R-50-C4 caffe Faster 1x - - 6.7 35.0 - model

R-50-C4 caffe Faster 2x 3.8 0.34 6.6 36.4 - model

R-50-C4 pytorch Faster 1x - - 6.3 34.2 - model

R-50-C4 pytorch Faster 2x - - 6.1 35.8 - model

R-50-FPN caffe Faster 1x 3.3 0.242 18.4 36.6 - -
R-50-FPN pytorch Faster 1x 3.5 0.250 16.5 35.8 - model

R-50-C4 caffe Mask 1x - - 8.1 35.9 31.5 model

R-50-C4 caffe Mask 2x 4.2 0.43 8.1 37.9 32.9 model

R-50-C4 pytorch Mask 1x - - 7.9 35.1 31.2 model

R-50-C4 pytorch Mask 2x - - 8.0 37.2 32.5 model

R-50-FPN pytorch Faster 2x - - - 37.1 - model

R-101-FPN caffe Faster 1x 5.2 0.355 14.4 38.6 - -
R-101-FPN pytorch Faster 1x 5.4 0.388 13.2 38.1 - model

R-101-FPN pytorch Faster 2x - - - 38.8 - model

R-50-FPN caffe Mask 1x 3.4 0.328 12.8 37.3 34.5 -
R-50-FPN pytorch Mask 1x 3.5 0.346 12.7 36.8 34.1 model

R-50-FPN pytorch Mask 2x - - - 37.9 34.8 model

R-101-FPN caffe Mask 1x 5.2 0.429 11.2 39.4 36.1 -
R-101-FPN pytorch Mask 1x 5.4 0.462 10.9 38.9 35.8 model

R-101-FPN pytorch Mask 2x - - - 39.9 36.4 model

RetinaNet
Backbone Style Lr schd Mem (GB) Train time (s/iter) Inf time (fps) box AP Download
R-50-FPN caffe 1x 3.4 0.285 12.5 35.8 -
R-50-FPN pytorch 1x 3.6 0.308 12.1 35.6 model

R-50-FPN pytorch 2x - - - 36.4 model

R-101-FPN caffe 1x 5.3 0.410 10.4 37.8 -
R-101-FPN pytorch 1x 5.5 0.429 10.9 37.7 model

R-101-FPN pytorch 2x - - - 38.1 model

X-101-32x4d-FPN pytorch 1x 6.7 0.632 9.3 39.0 model

X-101-32x4d-FPN pytorch 2x - - - 39.3 model

X-101-64x4d-FPN pytorch 1x 9.6 0.993 7.0 40.0 model

X-101-64x4d-FPN pytorch 2x - - - 39.6 model

Cascade R-CNN
Backbone Style Lr schd Mem (GB) Train time (s/iter) Inf time (fps) box AP Download
R-50-C4 caffe 1x 8.7 0.92 5.0 38.7 model

R-50-FPN caffe 1x 3.9 0.464 10.9 40.5 -
R-50-FPN pytorch 1x 4.1 0.455 11.9 40.4 model

R-50-FPN pytorch 20e - - - 41.1 model

R-101-FPN caffe 1x 5.8 0.569 9.6 42.4 -
R-101-FPN pytorch 1x 6.0 0.584 10.3 42.0 model

R-101-FPN pytorch 20e - - - 42.5 model

X-101-32x4d-FPN pytorch 1x 7.2 0.770 8.9 43.6 model

X-101-32x4d-FPN pytorch 20e - - - 44.0 model

X-101-64x4d-FPN pytorch 1x 10.0 1.133 6.7 44.5 model

X-101-64x4d-FPN pytorch 20e - - - 44.7 model

HRNetV2p-W18 pytorch 20e - - - 41.2 model

HRNetV2p-W32 pytorch 20e - - - 43.7 model

HRNetV2p-W48 pytorch 20e - - - 44.6 model

Cascade Mask R-CNN

Backbone Style Lr schd Mem (GB) Train time (s/iter) Inf time (fps) box AP mask AP Download
R-50-C4 caffe 1x 9.1 0.99 4.5 39.3 32.8 model

R-50-FPN caffe 1x 5.1 0.692 7.6 40.9 35.5 -
R-50-FPN pytorch 1x 5.3 0.683 7.4 41.2 35.7 model

R-50-FPN pytorch 20e - - - 42.3 36.6 model

R-101-FPN caffe 1x 7.0 0.803 7.2 43.1 37.2 -
R-101-FPN pytorch 1x 7.2 0.807 6.8 42.6 37.0 model

R-101-FPN pytorch 20e - - - 43.3 37.6 model

X-101-32x4d-FPN pytorch 1x 8.4 0.976 6.6 44.4 38.2 model

X-101-32x4d-FPN pytorch 20e - - - 44.7 38.6 model

X-101-64x4d-FPN pytorch 1x 11.4 1.33 5.3 45.4 39.1 model

X-101-64x4d-FPN pytorch 20e - - - 45.7 39.4 model

HRNetV2p-W18 pytorch 20e - - - 41.9 36.4 model

HRNetV2p-W32 pytorch 20e - - - 44.5 38.5 model

HRNetV2p-W48 pytorch 20e - - - 46.0 39.5 model

注意,请参照Hybrid Task Cascade来获得更多的细节和更多更强大的模型(50.7/43.9)。
SSD
Backbone Size Style Lr schd Mem (GB) Train time (s/iter) Inf time (fps) box AP Download
VGG16 300 caffe 120e 3.5 0.256 25.9 / 34.6 25.7 model

VGG16 512 caffe 120e 7.6 0.412 20.7 / 25.4 29.3 model

注意:
1.SSD的训练和测试时,要将cudnn.benchmark设置为True.
2.推断时间是在batch size = 1和batch size=8的情况下发布的。
3.由于模型参数和nms不同,在COCO和VOC上的速度是不同的。

(五)组规范化
请参照Group Normalization获得更多细节。
Weight Standardization
请参照Weight Standardization获得更多细节。
Deformable Convolution v2
请参照Deformable Convolutional Networks获得更多细节。
Libra R-CNN
请参照Libra R-CNN获得更多细节。
Guided Anchoring
请参照Guided Anchoring获得更多细节。
FCOS
请参照FCOS获得更多细节。
FoveaBox
请参照FoveaBox获得更多细节。
RepPoints
请参照RepPoints获得更多细节。
FreeAnchor
请参照FreeAnchor获得更多细节。
Grid R-CNN (plus)
请参照Grid R-CNN 获得更多细节。
GHM
请参照GHM获得更多细节。
GCNet
请参照GCNet获得更多细节。
HRNet
请参照HRNet获得更多细节。
Mask Scoring R-CNN
请参照Mask Scoring R-CNN获得更多细节。
Train from Scratch
请参照Rethinking ImageNet Pre-training获得更多细节。
其他数据集我们也在PASCAL VOC, Cityscapes 和 WIDER FACE上检测了一些方法。
(六)比较Detectron和maskrcnn-benchmark
我们用Detectron和maskrcnn-benchmark比较了mmdetection,主干用的是R-50-FPN。
总体来说,mmdetection在Detectron上有三个改进:更高的性能,更快的训练速度,更好的显存使用率。
1.性能
Detectron和maskrcnn-benchmark使用caffe-style ResNet作为骨干。我们发布的结果使用caffe-style(从这里改变权重)和pytorch-style(权重来自官方的模型ZOO)ResNet的骨干,表示为pytorch-style results / caffe-style results
我们发现pytorch-style ResNet常常比caffe-style ResNet收敛的慢,这导致在1x计划结果要稍微低一点,但是2x计划的最终结果要高一些。
Type Lr schd Detectron maskrcnn-benchmark mmdetection
RPN 1x 57.2 - 57.1 / 58.2
2x - - 57.6 / -
Faster R-CNN 1x 36.7 36.8 36.4 / 36.6
2x 37.9 - 37.7 / -
Mask R-CNN 1x 37.7 & 33.9 37.8 & 34.2 37.3 & 34.2 / 37.4 & 34.3
2x 38.6 & 34.5 - 38.5 & 35.1 / -
Fast R-CNN 1x 36.4 - 35.8 / 36.6
2x 36.8 - 37.1 / -
Fast R-CNN (w/mask) 1x 37.3 & 33.7 - 36.8 & 34.1 / 37.3 & 34.5
2x 37.7 & 34.0 - 37.9 & 34.8 / -

2.训练速度
训练速度用s/iter来表示,越低越好。
Type Detectron (P1001) maskrcnn-benchmark (V100) mmdetection (V1002)
RPN 0.416 - 0.253
Faster R-CNN 0.544 0.353 0.333
Mask R-CNN 0.889 0.454 0.430
Fast R-CNN 0.285 - 0.242
Fast R-CNN (w/mask) 0.377 - 0.328
1)Facebook的Big Basin服务器(P100/V100)比我们使用的服务器要稍微快一些,mmdetection在FB的服务器上也能运行的稍微快一些。
2)为了公平比较,我们列出了caffe-style的结果,如下:
2.推理速度
推理速度用一个GPU上的fps(img/s)来表示,越高越好。
ype Detectron (P100) maskrcnn-benchmark (V100) mmdetection (V100)
RPN 12.5 - 16.9
Faster R-CNN 10.3 7.9 13.5
Mask R-CNN 8.5 7.7 10.2
Fast R-CNN 12.5 - 18.4
Fast R-CNN (w/mask) 9.9 - 12.8
3.训练显存
Type Detectron maskrcnn-benchmark mmdetection
RPN 6.4 - 3.3
Faster R-CNN 7.2 4.4 3.6
Mask R-CNN 8.6 5.2 3.8
Fast R-CNN 6.0 - 3.3
Fast R-CNN (w/mask) 7.9 - 3.4
毫无疑问,maskrcnn-benchmark 和 mmdetection比Detectron的显存使用效率更高,主要优势是PyTorch自身。我们也做了一些内存优化,来进一步提高性能。
注意,Caffe2和PyTorch在获得并使用显存时,使用不同方法和不同的API。在所有的代码基中,nvidia-smi显示的内存使用比上述表中发布的数值要大。

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值