Source-linked AI summary

Distance-IoU Loss: Faster and Better Learning for Bounding Box Regression

Zhaohui Zheng, Ping Wang, Wei Liu, Jinze Li, Rongguang Ye, Dongwei Ren

arXiv:1911.08287v1cs.CV

TL;DR

Bounding-box regression losses are not fully aligned with IoU and existing IoU-based losses can converge slowly or regress inaccurately. The paper introduces DIoU and CIoU losses plus DIoU-NMS, achieving faster convergence, better regression performance, and superior benchmark results.

  • Problem

    Existing IoU and GIoU losses have slow convergence and inaccurate regression, motivating faster and more accurate bounding-box regression.

  • Method

    The paper proposes DIoU using normalized center-distance, CIoU combining overlap, center distance, and aspect ratio, and DIoU-NMS using IoU with center distance.

  • Results

    The proposed losses and DIoU-NMS achieve superior results across object-detection benchmarks, with CIoU yielding 5.67% AP and 8.95% AP75 gains on PASCAL VOC.

  • Takeaways & Limitations

    DIoU, CIoU, and DIoU-NMS can be incorporated into object-detection pipelines to improve convergence and detection performance.

  • Takeaways & Limitations

    IoU and GIoU losses cannot guarantee regression accuracy when incorporated into object-detection pipelines.

Abstract

from arXiv · show

Bounding box regression is the crucial step in object detection. In existing methods, while $\ell_n$-norm loss is widely adopted for bounding box regression, it is not tailored to the evaluation metric, i.e., Intersection over Union (IoU). Recently, IoU loss and generalized IoU (GIoU) loss have been proposed to benefit the IoU metric, but still suffer from the problems of slow convergence and inaccurate regression. In this paper, we propose a Distance-IoU (DIoU) loss by incorporating the normalized distance between the predicted box and the target box, which converges much faster in training than IoU and GIoU losses. Furthermore, this paper summarizes three geometric factors in bounding box regression, \ie, overlap area, central point distance and aspect ratio, based on which a Complete IoU (CIoU) loss is proposed, thereby leading to faster convergence and better performance. By incorporating DIoU and CIoU losses into state-of-the-art object detection algorithms, e.g., YOLO v3, SSD and Faster RCNN, we achieve notable performance gains in terms of not only IoU metric but also GIoU metric. Moreover, DIoU can be easily adopted into non-maximum suppression (NMS) to act as the criterion, further boosting performance improvement. The source code and trained models are available at https://github.com/Zzh-tju/DIoU.

Related Work

Related work spans object detection architectures, bounding-box regression losses, and non-maximum suppression. Prior studies explore alternative box representations, scale-aware regression objectives, IoU-based losses, and improved suppression strategies.

  • The paper surveys object detection methods, bounding-box regression losses, and non-maximum suppression.
  • Object detection methods: Alternative detection methods predict central axis lines, corner pairs, or multiple points, while FSAF uses an anchor-free branch for online feature selection.
  • Bounding-box regression losses: ℓ_n-norm losses are scale-sensitive; YOLO v1 uses square roots for w and h, whereas YOLO v3 uses 2 − wh to mitigate scale effects.
  • Bounding-box regression losses: IoU loss provides scale invariance, while GIoU loss addresses vanishing gradients for non-overlapping boxes but retains unresolved limitations.
  • Non-maximum suppression: Soft-NMS continuously penalizes neighboring detection scores by IoU, and IoU-Net predicts localization confidence to guide suppression.

Analysis to IoU and GIoU Losses

Simulation experiments expose distinct limitations of IoU and GIoU losses across comprehensive variations in box distance, scale, and aspect ratio. IoU fails on non-overlapping boxes, while GIoU broadens applicability but converges slowly and can retain large regression errors.

  • Simulation setup: The simulation covers 1,715,000 regression cases spanning box distance, scale, and aspect ratio.It uses 7 unit target boxes with aspect ratios 1:4, 1:3, 1:2, 1:1, 2:1, 3:1, and 4:1, plus 5,000 scattered anchor points.
  • IoU loss limitations: IoU loss only works for overlapping target boxes because its gradient is always 0 for non-overlapping anchors.Consequently, non-overlapping anchors remain stationary during regression.
  • GIoU loss limitations: GIoU loss enlarges the basin of cases it can handle, including non-overlapping boxes, by adding a penalty term.The penalty term is based on minimizing |C − A ∪ B|.
  • GIoU loss limitations: GIoU loss can still produce large errors for horizontally and vertically oriented boxes because its penalty often becomes small or zero.When boxes have inclusion relationships, GIoU nearly degrades to IoU loss.
  • Overall limitations: Overall, IoU loss converges to bad solutions for non-overlapping cases, whereas GIoU loss converges slowly for horizontal and vertical orientations.Neither loss guarantees regression accuracy when incorporated into an object detection pipeline.

The Proposed Method

The proposed method introduces DIoU loss by penalizing normalized central-point distance and CIoU loss by additionally enforcing aspect-ratio consistency. It also extends DIoU to NMS, jointly considering overlap and central-point distance to reduce false suppression.

  • DIoU Loss: DIoU loss penalizes the normalized Euclidean distance between predicted and target box centers, normalized by the enclosing box diagonal.The penalty uses central points b and bgt, distance ρ(·), and enclosing-box diagonal c.
  • DIoU Loss: DIoU directly minimizes center distance, providing faster convergence than GIoU loss and moving directions for non-overlapping boxes.It remains scale-invariant; when boxes perfectly match, LIoU = LGIoU = LDIoU = 0, while LGIoU = LDIoU → 2 for far-away boxes.
  • CIoU Loss: CIoU loss combines overlap area and central-point distance with a penalty enforcing consistency of bounding-box aspect ratios.The method identifies overlap area, center distance, and aspect ratio as the three geometric factors for regression.
  • CIoU Loss: The CIoU formulation prioritizes overlap-area regression, especially when predicted and target boxes do not overlap.Its optimization follows DIoU, with an aspect-ratio gradient specified separately.
  • DIoU-NMS: DIoU-NMS uses both IoU and center distance to avoid suppressing detections whose distant centers likely correspond to different objects.It can be integrated into any object-detection pipeline with only a few lines of code.

Experimental Results

Experiments on PASCAL VOC and MS COCO evaluate DIoU and CIoU within YOLOv3, SSD, and Faster R-CNN. CIoU and DIoU-NMS improve detection performance over IoU/GIoU-based baselines, with especially strong gains reported for YOLOv3 and improved medium- and large-object detection with Faster R-CNN.

  • YOLOv3 on PASCAL VOC: 5.91% AP and 9.88% AP75 are the gains from combining CIoU loss with DIoU-NMS for YOLOv3 on PASCAL VOC.The passage also reports consistent conclusions under the GIoU metric.
  • Faster R-CNN on MS COCO: For Faster R-CNN on MS COCO, GIoU provides only a small gain over IoU, whereas DIoU and CIoU still improve AP and AP75.The improvements are attributed to the detector's initially high IoU levels and dense anchor boxes.
  • Faster R-CNN on MS COCO: CIoU performs much better for medium and large objects, while DIoU-NMS relieves adverse effects for small objects.This result is reported for Faster R-CNN on MS COCO.
  • DIoU-NMS: DIoU-NMS further improves performance over original NMS in most cases and better preserves correct detection boxes.The original-NMS thresholds are ε = 0.45 for YOLOv3 and SSD and ε = 0.50 for Faster R-CNN.

Conclusion

The paper proposes DIoU and CIoU losses for bounding box regression, together with DIoU-NMS for suppressing redundant detection boxes. These methods provide faster convergence, better performance, and superior benchmark results within object detection pipelines.

  • Conclusion: The paper proposes DIoU and CIoU losses for bounding box regression, along with DIoU-NMS for suppressing redundant detection boxes.These methods can be incorporated into any object detection pipeline.
  • Conclusion: DIoU loss achieves faster convergence than GIoU loss by directly minimizing the normalized distance between predicted and target central points.The normalized central-point distance is the mechanism underlying DIoU’s convergence advantage.
  • Conclusion: CIoU loss considers overlap area, central point distance, and aspect ratio, leading to faster convergence and better performance.These three geometric properties jointly guide the complete IoU formulation.
  • Conclusion: The proposed losses and DIoU-NMS achieve superior results on benchmarks.The conclusion presents these methods as broadly applicable to object detection pipelines.
Loading 1911.08287v1…