【Light-Head RCNN】《Light-Head R-CNN: In Defense of Two-Stage Object Detector》

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/bryant_meng/article/details/82156372

这里写图片描述

arXiv preprint arXiv:1711.07264

bullet rather than bald

目录


1 Motivation

作者 investigate why typical two-stage methods are not as fast as single-stage, fast detectors like YOLO and SSD.

分析 Faster R-CNN involves two fully connected layers for RoI recognition, while RFCN produces a large score maps. 得出头部计算量太大的结论。即使 significantly reduce the base model, the computation cost cannot be largely decreased accordingly.

作者争对上述问题,提出了Light-Head RCNN,目的让 two-stage 进一步提速,超越 one-stage。作者把头部分为了两个部分 RoI-wraping 和 RCNN subnet,见后面图2

这里写图片描述

扫描二维码关注公众号,回复: 3839255 查看本文章

单卡一个mini-batch 测试(Titan XP),第一个倒三角backbone 为 S(Xception-like),第二个为 res50,第三个为 L(res101)

Accuracy Perspective

  • RCNN
  • Fast RCNN
  • Faster RCNN
  • Deformable Convolutional Networks
  • FPN
  • Mask RCNN
  • RetinaNet(one stage,focal loss)

Speed Perspective

  • SPPnet
  • R-FCN
  • YOLOv1
  • YOLOv2
  • SSD
  • DeNet

2 Innovation

优化了 two-stage head 部分的结构
classes*p*p 变成

3 Advantages

  • 比 YOLOv2 快
  • 比 Mask RCNN 精度高

4 Methods

Faster RCNN 和 light head RCNN 虽然都是因为头部过重的原因,但是性能不佳的部位不一样,前者是因为 R-CNN subnet(global average pooling),后者是因为 RoI-wraping(position sensitive scores map 过厚)

4.1 R-CNN subnet

From accuracy perspective

  • Although Faster R-CNN is good at RoI classification, it usually involves global average pooling1 in order to reduce the computation of first fully connected layer, which is harmful for spatial localization.
  • For R-FCN, it directly pools the prediction results after the position-sensitive pooling and the performance is usually not as strong as Faster R-CNN without RoI-wise computation layers

From speed perpetive

  • Faster RCNN 需要把每一个 proposal 丢到头部 structure 中,当 proposal 较多时,就会慢。
  • R-FCN 虽然用了 cost-free RCNN-subnet(每个proposal 计算是共享的),但是 ROI pooling 的 scores map 特别大(channel 很多,c*k*k),速度也会慢下来。

这里写图片描述

基于这种先验,作者 propose to utilize a simple, cheap fully-connected layer for our R-CNN subnet,见图2最后一行的 Light Head R-CNN

这里写图片描述

10*p*p 换成 *p*p 和 1*p*p ,效果不会下降1个点

4.2 Thin feature maps for RoI warping

图2中,红色框框处,相比与R-FCN,light head RCNN 的 RoI-wraping 部分 thin 很多

4.3 LightHead RCNN for Object Detection

4.3.1 Basic feature extractor

  • Large(L)backbone:ResNet 101
  • Small(S)backbone:Xception-like 结构 ,如下图

这里写图片描述

4.3.2 Thin feature maps

C5 之后
结构如下:

这里写图片描述

部位在下图绿色部分,替换了 R-FCN 的1*1 convolution

这里写图片描述

4.3.3 R-CNN subnet

RoI-warping 之后
single 2048 FC + two sibling fully connected to predict RoI classification and regression,Only 4 channels are applied for each bounding box location because we share the regression between different classes(class-agnostic).

这里写图片描述

4.3.4 RPN

C4之后

  • ratios:{1:1,1:2,2:1}
  • scales:{ 32 2 , 64 2 , 128 2 , 256 2 , 512 2 }

5 Experiments

8 GPU,2 images per GPU
each image has 2000/1000 RoIs for training/testing

5.1 Baselines

作者实现的 R-FCN(B2) 和 公开的 R-FCN(B1)

这里写图片描述

改进

  • resize the shorter edge: 800 pixels, max size of the longer edge to 1200
  • 5 anchors scales for RPN { 32 2 , 64 2 , 128 2 , 256 2 , 512 2 }
  • double regression loss(作者发现 regression loss 比 classification loss 小)
  • We select 256 samples ranked based on the loss for backpropagation. We use 2000 RoIs per image for training and 1000 RoIs for testing.

5.2 Thin feature maps for RoI warping

channels 大幅度下降,但是 have comparable performance.

这里写图片描述

但是,thin feature 可以 integrate feature pyramid network,This is almost impossible for the original R-FCN as the memory consumption will be high if we want to perform position-sensitive pooling on the high-resolution feature maps like Conv2 (Resnet stage 2).

Note: 用 RoI pooling 比 PSRoI pooling好,因为 feature map 更多(49×)

5.3 Large separable convolution

1*1 vs 下图绿色部分

这里写图片描述

也即是

这里写图片描述

结果如下

这里写图片描述

5.4 R-CNN subnet

fc 2048 channels without dropout
Large(L)backbone:ResNet 101

这里写图片描述

5.5 High Accuracy

5.4 节基础上,一些技巧继续提高精度,Large(L)backbone:ResNet 101

  • RoIAlign
  • multi-scale train,randomly sample the scale from 600 700 800 900 1000 pixels
  • thresold of NMS,replace 0.3 with 0.5

这里写图片描述

下表是和其它网络进行PK,
light head+feature pyramid + align 效果最佳。注意测试集和table6 不太一样,所以效果有一点点差别(40.6 vs 40.8)

这里写图片描述

效果如下

这里写图片描述

5.6 High Speed

以 table 7 的网络作为backbone,S 网络,for fast inference speed,作者做了5点改进,这里不再赘述,详情请看论文4.4节。

这里写图片描述

和其它网络的速度精度pk

这里写图片描述

效果图

这里写图片描述

Q&A

一作直播的时候听者提问2:

速度上来说,是简化Head提升更多还是简化base model的提升更多?

如果你是resnet 101这样大网络,即使把后端减得特别小,也不会对你的网络速度提升特别多,因为有很大的计算量是在base model的那部分。在这样的前提下,你就需要先把你的base model给砍得特别小,比如把它做到145M这样的一个很高效的Xception的网络。如果是在小模型情况下,就需要简化Head。需要根据不同的情况下,具体来比较两种方法。

为什么Light-Head可以比two-stage要好?

Light-Head的结果比R-FCN和Faster R-CNN这样的two-stage结果要高。这个是怎么样达到比别人高的呢?相比R-FCN,我们其实是在第二个stage上加了一个廉价的只有一个全联接层的子网络,这个子网络能提1.8个点。在前面我们还加了一个比较大的kernel,因为我们pooling的feature map比较薄,所以可以上一个比较大的kernel size,然后这个也会对你的结果提0.6个点左右(对faster也同样会涨点)。

ROI的数量设多少?

我们用的是一千个ROI做测试。Light-Head R-CNN对ROI的数量的敏感度是介于R-FCN和Faster R-CNN之间的。因为R-FCN是一个在第二个stage没有计算量的框架,而faster它是在第二个stage上堆了很多计算量。而我们的第二个stage很轻量,但也并不是没有计算量。

如果用的是ROI pooling的话,跟RFCN网络所说的位置敏感性的初衷有所冲突吗?

如果用ROI pooling 后面直接voting出最后结果确实不太好,没有位置敏感性,但是Light-Head里面有一个轻量的fc来处理全局的位置信息

参考

猜你喜欢

转载自blog.csdn.net/bryant_meng/article/details/82156372
今日推荐