知行编程网知行编程网  2022-07-14 10:00 知行编程网 隐藏边栏 |   抢沙发  10 
文章评分 0 次,平均分 0.0

港大同济伯克利推出目标检测新范式:Sparse R-CNN

作者 | 孙培泽   报道 | 机器之心

全新的目标检测范式Sparse R-CNN

本文主要介绍一下我们最近的一篇工作:

港大同济伯克利推出目标检测新范式:Sparse R-CNN


沿着目标检测领域中 Dense 和 Dense-to-Sparse 的框架,Sparse R-CNN 建立了一种彻底的 Sparse 框架, 脱离 anchor box,reference point,Region Proposal Network(RPN) 等概念,无需 Non-Maximum Suppression(NMS) 后处理, 在标准的 COCO benchmark 上使用 ResNet-50 FPN 单模型在标准 3x training schedule 达到了 44.5 AP 和 22 FPS。


  • Paper: https://arxiv.org/abs/2011.12450

  • Code: https://github.com/PeizeSun/SparseR-CNN


1. Motivation

我们先简单回顾一下目标检测领域中主流的两大类方法。

  • 第一大类是从非 Deep 时代就被广泛应用的 dense detector,例如 DPM,YOLO,RetinaNet,FCOS。在 dense detector 中, 大量的 object candidates 例如 sliding-windows,anchor-boxes, reference-points 等被提前预设在图像网格或者特征图网格上,然后直接预测这些 candidates 到 gt 的 scaling/offest 和物体类别。

  • 第二大类是 dense-to-sparse detector,例如,R-CNN 家族。这类方法的特点是对一组 sparse 的 candidates 预测回归和分类,而这组 sparse 的 candidates 来自于 dense detector。


这两类框架推动了整个领域的学术研究和工业应用。目标检测领域看似已经饱和,然而 dense 属性的一些固有局限总让人难以满意:

  • NMS 后处理

  • many-to-one 正负样本分配

  • prior candidates 的设计


所以,一个很自然的思考方向就是:能不能设计一种彻底的 sparse 框架?最近,DETR 给出了一种 sparse 的设计方案。candidates 是一组 sparse 的 learnable object queries,正负样本分配是 one-to-one 的 optimal bipartite matching,无需 nms 直接输出最终的检测结果。然而,DETR 中每个 object query 都和全局的特征图做 attention 交互,这本质上也是 dense。而我们认为,sparse 的检测框架应该体现在两个方面:sparse candidates 和 sparse feature interaction。基于此,我们提出了 Sparse R-CNN。

Sparse R-CNN 抛弃了 anchor boxes 或者 reference point 等 dense 概念,直接从 a sparse set of learnable proposals 出发,没有 NMS 后处理,整个网络异常干净和简洁,可以看做是一个全新的检测范式。

港大同济伯克利推出目标检测新范式:Sparse R-CNN


2.Sparse R-CNN

Sparse R-CNN 的 object candidates 是一组可学习的参数,N*4,N 代表 object candidates 的个数,一般为 100~300,4 代表物体框的四个边界。这组参数和整个网络中的其他参数一起被训练优化。That's it,完全没有 dense detector 中成千上万的枚举。这组 sparse 的 object candidates 作为 proposal boxes 用以提取 Region of Interest(RoI),预测回归和分类。

港大同济伯克利推出目标检测新范式:Sparse R-CNN


这组学习到的 proposal boxes 可以理解为图像中可能出现物体的位置的统计值,这样 coarse 的表征提取出来的 RoI feature 显然不足以精确定位和分类物体。于是,我们引入一种特征层面的 candidates,proposal features,这也是一组可学习的参数,N*d,N 代表 object candidates 的个数,与 proposal boxes 一一对应,d 代表 feature 的维度,一般为 256。这组 proposal features 与 proposal boxes 提取出来的 RoI feature 做一对一的交互,从而使得 RoI feature 的特征更有利于定位和分类物体。相比于原始的 2-fc Head,我们的设计称为 Dynamic Instance Interactive Head。

港大同济伯克利推出目标检测新范式:Sparse R-CNN


Sparse R-CNN 的两个显著特点就是 sparse object candidatessparse feature interaction,既没有 dense 的成千上万的 candidates,也没有 dense 的 global feature interaction。Sparse R-CNN 可以看作是目标检测框架从 dense 到 dense-to-sparse 到 sparse 的一个方向拓展。

3. Architecture Design

Sparse R-CNN 的网络设计原型是 R-CNN 家族。

  • Backbone 是基于 ResNet 的 FPN。

  • Head 是一组 iterative 的 Dynamic Instance Interactive Head,上一个 head 的 output features 和 output boxes 作为下一个 head 的 proposal features 和 proposal boxes。Proposal features 在与 RoI features 交互之前做 self-attention。

  • 训练的损失函数是基于 optimal bipartite matching 的 set prediction loss。


港大同济伯克利推出目标检测新范式:Sparse R-CNN


从 Faster R-CNN(40.2 AP) 出发,直接将 RPN 替换为 a sparse set of learnable proposal boxes,AP 降到 18.5;引入 iterative 结构提升 AP 到 32.2;引入 dynamic instance interaction 最终提升到 42.3 AP。

4. Performance

我们沿用了 Detectron2 的 3x training schedule,因此将 Sparse R-CNN 和 Detectorn2 中的 detectors 做比较(很多方法没有报道 3x 的性能,所以没有列出)。同时,我们也列出了同样不需要 NMS 后处理的 DETR 和 Deformable DETR 的性能。Sparse R-CNN 在检测精度,推理时间和训练收敛速度都展现了相当有竞争力的性能。

港大同济伯克利推出目标检测新范式:Sparse R-CNN


5. Conclusion

R-CNN 和 Fast R-CNN 出现后的一段时期内,目标检测领域的一个重要研究方向是提出更高效的 region proposal generator。Faster R-CNN 和 RPN 作为其中的佼佼者展现出广泛而持续的影响力。Sparse R-CNN 首次展示了简单的一组可学习的参数作为 proposal boxes 即可达到 comparable 的性能。我们希望我们的工作能够带给大家一些关于 end-to-end object detection 的启发。


原文链接:https://zhuanlan.zhihu.com/p/310058362


<section data-brushtype="text" style="padding-right: 0em;padding-left: 0em;white-space: normal;letter-spacing: 0.544px;color: rgb(62, 62, 62);font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;widows: 1;word-spacing: 2px;caret-color: rgb(255, 0, 0);text-align: center;"><strong style="color: rgb(0, 0, 0);font-family: -apple-system-font, system-ui, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;"><span style="letter-spacing: 0.5px;font-size: 14px;"><strong style="font-size: 16px;letter-spacing: 0.544px;"><span style="letter-spacing: 0.5px;">—</span></strong>完<strong style="font-size: 16px;letter-spacing: 0.544px;"><span style="letter-spacing: 0.5px;font-size: 14px;"><strong style="font-size: 16px;letter-spacing: 0.544px;"><span style="letter-spacing: 0.5px;">—</span></strong></span></strong></span></strong></section><pre><pre><section style="letter-spacing: 0.544px;white-space: normal;font-family: -apple-system-font, system-ui, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;"><section powered-by="xiumi.us"><section style="margin-top: 15px;margin-bottom: 25px;opacity: 0.8;"><section><section style="letter-spacing: 0.544px;"><section powered-by="xiumi.us"><section style="margin-top: 15px;margin-bottom: 25px;opacity: 0.8;"><section><section style="margin-bottom: 15px;padding-right: 0em;padding-left: 0em;color: rgb(127, 127, 127);font-size: 12px;font-family: sans-serif;line-height: 25.5938px;letter-spacing: 3px;text-align: center;"><span style="color: rgb(0, 0, 0);"><strong><span style="font-size: 16px;font-family: 微软雅黑;caret-color: red;">为您推荐</span></strong></span></section><section style="margin-top: 5px;margin-bottom: 5px;padding-right: 0em;padding-left: 0em;min-height: 1em;font-family: sans-serif;letter-spacing: 0px;opacity: 0.8;line-height: normal;text-align: center;">一文了解深度推荐算法的演进</section><section style="margin-top: 5px;margin-bottom: 5px;padding-right: 0em;padding-left: 0em;min-height: 1em;font-family: sans-serif;letter-spacing: 0px;opacity: 0.8;line-height: normal;text-align: center;">干货 | 算法工程师超实用技术路线图</section><section style="margin-top: 5px;margin-bottom: 5px;padding-right: 0em;padding-left: 0em;min-height: 1em;font-family: sans-serif;letter-spacing: 0px;opacity: 0.8;line-height: normal;text-align: center;"><span style="font-size: 14px;">13个算法工程师必须掌握的PyTorch Tricks</span></section><section style="margin-top: 5px;margin-bottom: 5px;padding-right: 0em;padding-left: 0em;min-height: 1em;font-family: sans-serif;letter-spacing: 0px;opacity: 0.8;line-height: normal;text-align: center;"><span style="font-size: 14px;">吴恩达上新:生成对抗网络(GAN)专项课程</span><br  /></section><section style="margin-top: 5px;margin-bottom: 5px;padding-right: 0em;padding-left: 0em;min-height: 1em;font-family: sans-serif;letter-spacing: 0px;opacity: 0.8;line-height: normal;text-align: center;">拿到2021灰飞烟灭算法岗offer的大佬们是啥样的<span style="font-size: 14px;">?</span></section></section></section></section></section></section></section></section></section>

港大同济伯克利推出目标检测新范式:Sparse R-CNN

本篇文章来源于: 深度学习这件小事

本文为原创文章,版权归所有,欢迎分享本文,转载请保留出处!

知行编程网
知行编程网 关注:1    粉丝:1
这个人很懒,什么都没写

发表评论

表情 格式 链接 私密 签到
扫一扫二维码分享