【论文速读】Faster RCNN

翻译:

http://noahsnail.com/2018/01/03/2018-01-03-Faster%20R-CNN%E8%AE%BA%E6%96%87%E7%BF%BB%E8%AF%91%E2%80%94%E2%80%94%E4%B8%AD%E8%8B%B1%E6%96%87%E5%AF%B9%E7%85%A7/


https://blog.csdn.net/sloanqin/article/details/51545125

https://blog.csdn.net/u011718701/article/details/53758927

https://blog.csdn.net/wopawn/article/details/52223282

Faster RCNN

解决提出区域框的问题

亮点:

1) 引入RPN层共享特征——解决了区域建议网络速度慢的问题

【RPN做什么】

在卷积特征层输入n*n(n=3)的滑动窗口(图像上的anchor以滑动窗口为中心,3尺度3长宽比),每个移动窗口会映射成一个低维特征,该特征会输入到2层fc层(reg、cls)

【为什么要RPN】

共享卷积计算

【RPN好处】

平移不变性

尺度不变性——模板9种

长宽比

 

模型

Loss

 

i

the index of an anchor in a mini-batch

Cls

pi

the predicted probability of anchor i being an object. (0、1)

Pi*

(1、0)

Reg

 

ti

a vector representing the 4 parameterized coordinates of the predicted bounding box

t∗i

the ground-truth box associated with a positive anchor.

cls

二值分类object vs. not object

正类:

1)the anchor/anchors with the highest Intersection-overUnion (IoU) overlap with a ground-truth box

2)an anchor that has an IoU overlap higher than 0.7

负类:

IoU ratio is lower than 0.3 for all ground-truth boxes

Reg

where x, y, w, and h denote the box’s center coordinates and its width and height.

Variables x, xa, and x∗ are for the predicted box, anchor box, and ground-truth box respectively (likewise for y, w, h). E

ach regressor is responsible for one scale and one aspect ratio, and the k regressors do not share weights.

其他

stochastic gradient descent (SGD)

 采样策略:“image-centric” sampling strategy——randomly sample 256 anchors in an image to compute the loss function of a mini-batch

采样比例:the sampled positive and negative anchors have a ratio of up to 1:1. If there are fewer than 128 positive samples in an image, we pad the mini-batch with negative ones.

 

Anchor

Anchors是一组大小固定的参考窗口,对任意图像任意滑窗位置都是9个模板

三种尺度{128^2,256^2,512^2}×三种长宽比{1:1,1:2,2:1}

 

根据图像大小计算滑窗中心点对应原图区域的中心点,通过原图中心点和size就可以得到滑窗位置和原图位置的映射关系,由此得到原图位置并根据与Ground Truth重复率贴上正负标签,让RPN学习该Anchors是否有物体即可。

训练

1用预训练模型初始化网络参数,然后fine-tune训练RPN

2用预训练模型初始化网络参数,并使用RPN网络输出的regionproposals来fine-tune训练Fast R-CNN,

3用2中的网络初始化RPN,固定共有的conv层(参数不再变化),只fine-tunedRPN独有的层

使用数据【随机选取256个anchor,对训练集标记区域和实际区域做比较,确定为前景(IOU>0.7的建议框或者IOU最高)、背景(IOU<0.3建议框);使用mini-batch=256,50%前景样本50%背景样本】,用模型finetune,获取整幅图像的特征conv5,得到特征图

4固定共有的conv层,fine-tuneFast R-CNN的FC层

5重复3、4

 

 

 测试

A:训练集中所有的图像

(1)经过CNN传播至共享卷积层得到特征图

(2)特征图经过RPN得到区域建议和区域得分,对区域得分使用NMS(0.7),输出前top N个区域建议

C: 前top N个区域建议

(3)将(2)+C输入ROI,提取对应区域建议的特征

D:分类结果+对应的四个实值(边框信息)

(4)用nms进行筛选,得到最终的bounding box,类别及其score



  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值