【DIoU】《Distance-IoU Loss:Faster and Better Learning for Bounding Box Regression》

在这里插入图片描述

AAAI-2020



1 Background and Motivation

在这里插入图片描述

IoU-loss not provide any moving gradient for non-overlapping cases.

在这里插入图片描述

GIoU-Loss 相较于 IoU-Loss 有提升,但仍 suffer from the problems of slow convergence and inaccurate regression

在这里插入图片描述
仔细分析下,不相交时 L G I o U = 2 − I o U + U C = 2 + U C L_{GIoU} = 2 - IoU + \frac{U}{C} = 2 + \frac{U}{C} LGIoU=2IoU+CU=2+CU

降低 L G I o U L_{GIoU} LGIoU 的方式有两种,缩小 U U U 也即 predict 靠近 GT,或者增大 C C C 也即扩大闭包(图1第一行所示,这种方式是我们不想看到的)

且 GT 与 prediction 属于包含关系时,GIoU-Loss 退化成了 IoU-Loss

在这里插入图片描述

本文 incorporating the normalized distance,提出 Distance-IoU(D-IoU),比 GIoU-Loss 收敛更快

基于 overlap area, central point distance and aspect ratio, 提出 Complete IoU(CIoU),leading to faster convergence and better performance

此外,D-IoU 也能 adopted into non-maximum suppression (NMS) to
act as the criterion(DIoU-NMS

which not only the overlap area but also the distance between central points of two bounding boxes are considered when suppressing redundant boxes, making it more robust for the cases with occlusions.

2 Related Work

  • Object Detection
  • Loss Function for Bounding Box Regression
  • Non-Maximum Suppression

3 Advantages / Contributions

  • DIoU Loss
  • CIoU Loss
  • DIoU NMS

4 Method

4.1 Analysis to IoU and GIoU Losses

在这里插入图片描述

target box (7种不同 aspect ratio 绿色的框框)的中心点在 (10,10)

anchor box (7种不同 aspect ratio 红色的框框)散布在其周围,uniformly scattered at 5,000 points,半径为 3

x7 是表示有 7 个 scale,分别为 0.5, 0.67, 0.75, 1, 1.33, 1.5 and 2,图示仅展现了某一种 scale,即面积为 1 的 7 种 sacle

共 7x7x7x5000 个 regression cases(每个空间位置同一 scale 7种 aspect ratio anchor 和 7 种 aspect ratio target 一共 7x7 种 regression case,5000 个位置,7 种 scale 就是 7x7x7x5000 种 regression cases 了)

迭代方式
在这里插入图片描述
明显看出 DIoU-Loss 和 CIoU-Loss 收敛的比较快

在这里插入图片描述
图4(a)可以看出,仅与 target bbox 有 overlap 的 anchor box,loss 才下降了
图4(b)可以看出,GIoU loss is with slow convergence especially for the boxes at horizontal and vertical orientations. 水平竖直方向如果 predict 和 target 有 overlap 且尺寸接近时,U 和 C 很接近,此时 LGIoU 就和 LIoU 相仿了

4.2 The Proposed Method

1)Distance-IoU Loss(DIoU)

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

相比于 IoU-Loss 和 GIoU-Loss

一样:

  • 一样 invariant to the scale
  • 和 GIoU-Loss 一样,non-overlapping 的时候也可以 provide moving directions for bounding boxes
  • 和 GIoU-Loss 一样取值范围 [0,2)

区别:

  • can directly minimize the distance of two boxes, and thus converges much faster than GIoU loss.
  • 包含情况下 DIoU loss 比 GIoU loss 收敛更快

2)Complete IoU Loss(CIoU)

在这里插入图片描述
α \alpha α is a positive trade-off parameter
v v v measures the consistency of aspect ratio
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

在 DIoU 的基础上引入了 aspect ratio 的监督,看到 v v v 第一反应是 4 π 2 \frac{4}{\pi^2} π24 背后的原理是什么,看这个图就秒懂了

在这里插入图片描述

原来是 ( 2 π ) 2 (\frac{2}{\pi})^2 (π2)2,对 arctan 宽高比做一个归一化,那问题又来了,为啥要 arctan 一下,应该是压缩数据范围吧(防止比值过大过小)

看看梯度

在这里插入图片描述
ps:这个正负号感觉。。。我算出来怎么正负号正好反了

w w w h h h 范围都是 [0,1],过小很容易梯度爆炸,作者处理时把 1 w 2 + h 2 \frac{1}{w^2+h^2} w2+h21 置为了1

但看看下面的例子,距离我保持了,aspect ratio 我也保持了,好像 DIoU 和 CIoU 都 GG 了,哈哈
在这里插入图片描述
来自损失函数之DIoU Loss和CIoU Loss

3)Non-Maximum Suppression using DIoU

在这里插入图片描述
在这里插入图片描述

  • s i s_i si is the classification score

  • ε ε ε is the NMS threshold

  • M M M predicted box with the highest score

相当于提升了阈值(保留的框框更多), ε + R D I o U ε+R_{DIoU} ε+RDIoU,在原来阈值的基础上,引入了部分距离信息(越近 R R R 越小越容易被抑制掉,越远 R R R 越大越容易被保留)作为阈值

5 Experiments

5.1 Datasets

PASCAL VOC
MS COCO

5.2 YOLO v3 on PASCAL VOC

在这里插入图片描述
在这里插入图片描述

5.3 SSD on PASCAL VOC

We have observed that for dense anchor algorithms, increasing the regression loss properly can improve the performance.
在这里插入图片描述

5.4 Faster R-CNN on MS COCO

在这里插入图片描述
作用到二阶段的时候,DIoU 没有那么给力了,作者的解释是

在这里插入图片描述

DIoU 小目标可以,CIoU 小目标不如 IoU,CIoU+DIoU-NMS 缓解了 CIoU 小目标的 adverse effects

为啥 CIoU 的小目标没有 DIoU 的猛,作者也解释了

在这里插入图片描述

5.5 Discussion on DIoU-NMS

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

6 Conclusion(own) / Future work

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值