Tensorflow object detection API 源码阅读笔记:Mask R-CNN

这篇我们追寻Tensorflow object detection API 源码中Mask R-CNN的痕迹。先说结论: Tensorflow object detection API 实现了ROI align,实现了mask branch(略有不同)。目前没有提供mask的预训练模型。

检测系列的总结博客和知乎中非常多,如:

目标检测-RCNN系列

Mask-RCNN技术解析

CNN 在图像分割中的简史:从 R-CNN 到 Mask R-CNN

我们还是主要关注Tensorflow object detection API 的代码实现细节。

ROI align vs ROI pooling
ROI pooling由于取整的问题,得到的特征和ROI的坐标(原图上)不是完全对应的。ROI Pooling层解析
(Caffe)
。原始的ROI pooling就是spp的特殊情况(先量化到格点上,然后再分块max pool,与spp一样每块可能大小有细微差别;而ROI Align不进行量化,直接均匀分块,然后用双线性插值求ROI中每个格点的值)。
FAQs: how to sample grid points within a cell?
• 4 regular points in 2x2 sub-cells
• other implementation could work

Tensorflow object detection API这里对ROI pooling的实现不一样: Additionally, instead of using the ROI Pooling layer and Position-sensitive ROI Pooling layers used by [31, 6], we use Tensorflow’s “crop and resize” operation which uses bilinear interpolation to resample part of an image onto a fixed sized grid. 代码为

"""
ROI就是features_to_crop(第一阶段特征提取器得到的feature map)上的一块crop,是依据RPN的proposal_boxes截取的。
"""
def _compute_second_stage_input_feature_maps(self, features_to_crop,
                 
  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 6
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值