关于目标检测:目标检测中的FPNRPN

42次阅读

共计 1123 个字符,预计需要花费 3 分钟才能阅读完成。

在聊 Feature Pyramid Networks(FPN)和 Region Proposal Networks(RPN)之间先相熟一下 Faster R-CNN 的背景。
Faster RCNN 分为四个工作:

  • Conv Layers。用几组根底的 conv+relu+maxpooling 层提取图像的 feature map。
  • Region Proposal Networks。RPN 网络用于生成 region proposals。该层通过 softmax 判断 anchors 属于 positive 或者 negative,再利用 bounding box regression 修改 anchors 取得准确的 proposals。
  • Roi Pooling。该层收集输出的 feature maps 和 proposals,综合这些信息后提取 proposal feature maps,送入后续全连贯层断定指标类别。
  • Classification。利用 proposal feature maps 计算 proposal 的类别,同时再次 bounding box regression 取得检测框最终的准确地位。


one stage 算法如 yolo 系列相比,Faster RCNN 做为典型的 two stage 算法最大的区别就在于其先通过 RPN 找到 proposal,在对 proposa 分类,经验了两个网络。

RPN

RPN 网络的工作是找到 proposals输出:feature map。输入:proposal。
总体流程:生成 anchors -> softmax 分类器提取 positvie anchors -> bbox reg 回归 positive anchors -> Proposal Layer 生成 proposals

1.softmax 断定 positive 与 negative

在 feature map 上,设置了稀稀拉拉的候选 Anchor。而后用 cnn 去判断哪些 Anchor 是外面有指标的 positive anchor,哪些是没指标的 negative anchor。所以,RPN 做的只是个二分类!

2. 对 proposals 进行 bounding box regression

图中红框为 positive anchors,绿框为 GT。anchor 和 GT 的梯度能够有 dx, dy, dw, dh 四个变换示意,bounding box regression 通过线性回归学习到这个四个梯度,使 anchor 一直迫近 GT,从而取得更准确的 proposal。

RPN

Reference

1.FPN: https://arxiv.org/abs/1612.03…
2.Faster R-CNN: https://ieeexplore.ieee.org/s…
3.https://zhuanlan.zhihu.com/p/…

正文完
 0