文献阅读 - SSD: Single Shot MultiBox Detector

SSD: Single Shot MultiBox Detector


W. Liu, et al., SSD: Single Shot MultiBox Detector, ECCV (2016).


摘要

SSD(single shot detector):将边界框(bounding boxes)的输出空间离散化为一组锚点框

锚点框(anchors,default boxes,default bounding boxes):位于各特征图(feature map)的所有位置上,代表不同长宽比、不同尺度的边界框

推理阶段:在每个锚点框上,SSD网络对所有类别评分(score),并对锚点框形状进行调整以配匹目标形状。

SSD网络对多个分辨率不同的特征图进行预测,并将结果合并,以处理不同尺寸的目标。

SSD网络取消了生成候选区域(proposal generation)和特征重采样(pixel or feature resampling)两个阶段,将全部计算整合到单一网络中。

1 引言

主流目标检测:假设边界框(hypothesize bounding boxes)、特征重采样(resample pixels or features for each box)、分类器(high-quality classifier)。

SSD网络改进:

(1)取消了生成边界框候选区(bounding box proposals)和特征重采样(pixel or feature resampling)两个阶段;
(2)使用小尺寸卷积核滤波器预测目标类别(object categories)、边界框位置偏移(offsets in bounding box locations);
(3)使用独立预测器(滤波器)预测不同纵横比的目标;
(4)将预测滤波器作用于特征提取网络后端隐含层的输出特征图(multiple feature maps from the later stages of a network),以实现多尺度检测(perform detection at multiple scales)。

本文贡献:

(1)SSD网络检测速度均优于YOLO、Faster R-CNN,准确率远优于YOLO、与Faster R-CNN持平;
(2)SSD网络的核心在于使用小尺寸卷积核滤波器预测一组锚点框的类别评分、边界偏移(predicting category scores and box offsets for a fixed set of default bounding boxes using small convolutional filters applied to feature maps);
(3)使用多尺度特征图、不同长宽比锚点框预测;
(4)端到端训练(end-to-end training)、平衡检测速度与准确率(improving the speed vs accuracy trade-off)。

2 SSD(Single Shot Detector)

2.1 模型

SSD方法基于前向卷积网络(a feed-forward convolutional network),生成一组固定尺寸的锚点框集合及锚点框对应的目标类别评分,并通过非极大抑制(non-maximum suppression)生成最终检测结果。

多尺度特征图检测(multi-scale feature maps for detection)
卷积预测器(convolutional predictors for detection)

在这里插入图片描述

特征图尺寸: m × n m \times n m×n、通道数: p p p

预测器: 3 × 3 × p 3 \times 3 \times p 3×3×p小尺寸卷积核(small kernel),预测目标的一个类别评分(a score for a category)或相对于锚点框坐标的一个形状偏移(a shape offset relative to the default box coordinates)

锚点框和长宽比(default boxes and aspect ratios)

特征图上的每个给定位置有 k k k个锚点框,每个锚点框需计算 c c c个类别的评分和相对于原始锚点框形状(the original default box shape)的 4 4 4个偏移,因此每个特征图上共有 ( c + 4 ) k (c + 4)k (c+4)k个滤波器。对于尺寸为 m × n m \times n m×n的特征图,共有 ( c + 4 ) k m n (c + 4)kmn (c+4)kmn个输出。

在这里插入图片描述

假设共有 c c c个类别及 4 4 4个相对于锚点框坐标的形状偏移,对一个特征图上每个锚点框形状( { a r } \{a_{r}\} { ar}),需要 c + 4 c + 4 c+4个卷积预测器,输出 m × n × ( c + 4 ) m \times n \times (c + 4) m×n×(c+4)个预测值;则该特征图上, k = ∣ { a r } ∣ k = |\{a_{r}\}| k={ ar}个锚点框形状共需要 ( c + 4 ) k (c + 4)k (c+4)k个预测器,输出 m × n × [ ( c + 4 ) × k ] m \times n \times \left[(c + 4) \times k\right] m×n×[(c+4)×k]个预测值。
即,预测器的卷积核尺寸为: 3 × 3 × p 3 \times 3 \times p 3×3×p,通道数为: ( c + 4 ) × k (c + 4) \times k (c+4)×k

2.2 训练

配匹策略(matching strategy)

在训练过程中,需要确定与真实边界框(a ground truth detection)对应的锚点框,并训练网络。对于每个真实边界框,需从不同位置、不同长宽比、不同尺度的锚点框中选择。

重叠度(jaccard overlap,intersection over union,IoU)

配匹策略:与某个真实边界框IoU大于阈值(threshold)(0.5)的所有锚点框。

损失函数(training objective)

匹配标识(an indicator for matching): x i j p = { 1 , 0 } x_{ij}^{p} = \{1, 0\} xijp={ 1,0},表示锚点框 i i i是否与类别为 p p p的真实边界框 j j j配匹。根据配匹策略可知,可能出现 ∑ i x i j p ≥ 1 \sum_{i} x_{ij}^{p} \geq 1 ixijp1的情况。

总损失函数(overall objective lossfunction):位置损失与置信度损失的加权和,

L ( x , c , l , g ) = 1 N ( L c o n f ( x , c ) + α L l o c ( x , l , g ) ) \mathcal{L}(x, c, l, g) = \frac{1}{N} \left( \mathcal{L}_{\mathrm{conf}}(x, c) + \alpha \mathcal{L}_{\mathrm{loc}}(x, l, g) \right) L(x,c,l,g)=N1(Lconf(x,c)+αLloc(x,l,g))

其中, N N N为匹配的锚点框总数。若 N = 0 N = 0 N=0,则将 L \mathcal{L} L设置为 0 0 0

位置损失(localization loss,loc) L l o c ( x , l , g ) \mathcal{L}_{\mathrm{loc}}(x, l, g) L

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值