SSD损失函数与训练分析

匹配策略

Matching strategy During training we need to determine which default boxes correspond to a ground truth detection and train the network accordingly. For each ground truth box we are selecting from default boxes that vary over location, aspect ratio, and scale. We begin by matching each ground truth box to the default box with the best jaccard overlap (as in MultiBox [7]). Unlike MultiBox, we then match default boxes to any ground truth with jaccard overlap higher than a threshold (0.5). This simplifies the learning problem, allowing the network to predict high scores for multiple overlapping default boxes rather than requiring it to pick only the one with maximum overlap.

训练目的

The SSD training objective is derived from the MultiBox objective[7,8] but is extended to handle multiple object categories. Let x i j p = { 1 , 0 } x_{ij}^p= \{ 1,0\} xijp={1,0} be an indicator for matching the i i i-th default box to the j j j-th ground truth box of category p. In the matching strategy above, we can have ∑ i x i j p ≥ 1 \sum_ix_{ij}^p\ge1 ixijp1.
The overall objective loss function is a weighted sum of the localization loss (loc) and the confidence loss (conf):
L ( x , c , l , g ) = 1 N ( L c o n f ( x , c ) + α L l o c ( x , l , g ) ) L(x,c,l,g)=\frac{1}{N}(L_{conf}(x,c)+\alpha L_{loc}(x,l,g)) L(x,c,l,g)=N1(Lconf(x,c)+αLloc(x,l,g))

SSD 损失函数由两部分组成,一部分是目标框的位置损失,另一部分是类别置信度损失。 l , g l,g l,g分别为预测框和真实框的位置参数。
where N is the number of matched default boxes. If N = 0 N=0 N=0, we set the loss to 0. The localization loss is a Smooth L1 loss between the predicted box ( l ) (l) (l) and the ground truth box ( g ) (g) (g) parameters. Similar to Faster R-CNN, we regress to offsets for the center ( c x , c y ) (cx,cy) (cx,cy) of the default bounding box (d) and for its width (w) and height(h).

在这里插入图片描述
The confidence loss is the softmax loss over multiple classes confidences ( c ) (c) (c).

在这里插入图片描述
α \alpha α 是一个加权系数,用来衡量位置损失在总损失中占的比例。
and the weight term α \alpha α is set to 1 by cross validation.

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Gallant Hu

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值