Table of Contents
Fetching ...

Inner-IoU: More Effective Intersection over Union Loss with Auxiliary Bounding Box

Hao Zhang, Cong Xu, Shuaijie Zhang

TL;DR

The paper addresses the generalization limits of IoU-based bounding box regression losses across detectors and tasks. It introduces Inner-IoU, a scale-controlled loss that uses auxiliary bounding boxes of ratio-scaled sizes to compute IoU-based losses, enabling targeted acceleration of high- and low-IoU samples without adding extra loss terms. The method can be plugged into existing losses such as $L_{GIoU}$, $L_{DIoU}$, $L_{CIoU}$, $L_{EIoU}$, and $L_{SIoU}$ by defining $L_{Inner-…}=L_{…}+IoU-IoU^{inner}$, where $IoU^{inner}$ is computed with auxiliary boxes. Through simulation and cross-detector experiments (e.g., YOLOv7-tiny on VOC07/12 and YOLOv5s on AI-TOD), Inner-IoU improves convergence speed and detection accuracy, demonstrating strong generalization and practical impact for small-target detection and diverse datasets.

Abstract

With the rapid development of detectors, Bounding Box Regression (BBR) loss function has constantly updated and optimized. However, the existing IoU-based BBR still focus on accelerating convergence by adding new loss terms, ignoring the limitations of IoU loss term itself. Although theoretically IoU loss can effectively describe the state of bounding box regression,in practical applications, it cannot adjust itself according to different detectors and detection tasks, and does not have strong generalization. Based on the above, we first analyzed the BBR model and concluded that distinguishing different regression samples and using different scales of auxiliary bounding boxes to calculate losses can effectively accelerate the bounding box regression process. For high IoU samples, using smaller auxiliary bounding boxes to calculate losses can accelerate convergence, while larger auxiliary bounding boxes are suitable for low IoU samples. Then, we propose Inner-IoU loss, which calculates IoU loss through auxiliary bounding boxes. For different datasets and detectors, we introduce a scaling factor ratio to control the scale size of the auxiliary bounding boxes for calculating losses. Finally, integrate Inner-IoU into the existing IoU-based loss functions for simulation and comparative experiments. The experiment result demonstrate a further enhancement in detection performance with the utilization of the method proposed in this paper, verifying the effectiveness and generalization ability of Inner-IoU loss. Code is available at https://github.com/malagoutou/Inner-IoU.

Inner-IoU: More Effective Intersection over Union Loss with Auxiliary Bounding Box

TL;DR

The paper addresses the generalization limits of IoU-based bounding box regression losses across detectors and tasks. It introduces Inner-IoU, a scale-controlled loss that uses auxiliary bounding boxes of ratio-scaled sizes to compute IoU-based losses, enabling targeted acceleration of high- and low-IoU samples without adding extra loss terms. The method can be plugged into existing losses such as , , , , and by defining , where is computed with auxiliary boxes. Through simulation and cross-detector experiments (e.g., YOLOv7-tiny on VOC07/12 and YOLOv5s on AI-TOD), Inner-IoU improves convergence speed and detection accuracy, demonstrating strong generalization and practical impact for small-target detection and diverse datasets.

Abstract

With the rapid development of detectors, Bounding Box Regression (BBR) loss function has constantly updated and optimized. However, the existing IoU-based BBR still focus on accelerating convergence by adding new loss terms, ignoring the limitations of IoU loss term itself. Although theoretically IoU loss can effectively describe the state of bounding box regression,in practical applications, it cannot adjust itself according to different detectors and detection tasks, and does not have strong generalization. Based on the above, we first analyzed the BBR model and concluded that distinguishing different regression samples and using different scales of auxiliary bounding boxes to calculate losses can effectively accelerate the bounding box regression process. For high IoU samples, using smaller auxiliary bounding boxes to calculate losses can accelerate convergence, while larger auxiliary bounding boxes are suitable for low IoU samples. Then, we propose Inner-IoU loss, which calculates IoU loss through auxiliary bounding boxes. For different datasets and detectors, we introduce a scaling factor ratio to control the scale size of the auxiliary bounding boxes for calculating losses. Finally, integrate Inner-IoU into the existing IoU-based loss functions for simulation and comparative experiments. The experiment result demonstrate a further enhancement in detection performance with the utilization of the method proposed in this paper, verifying the effectiveness and generalization ability of Inner-IoU loss. Code is available at https://github.com/malagoutou/Inner-IoU.
Paper Structure (11 sections, 27 equations, 8 figures, 2 tables)

This paper contains 11 sections, 27 equations, 8 figures, 2 tables.

Figures (8)

  • Figure 1: Description of Inner-IoU
  • Figure 2: Detection examples on the test set of PASCAL VOC 2007 using YOLOv7-tiny by $L_{CIoU}$ and $L_{Inner-CIoU}$. From left to right, they represent the CIoU method, Inner-CIoU (ratio=0.7), Inner-CIoU (ratio=0.75) and Inner-CIoU (ratio=0.8).
  • Figure 3: Regression change curves for different scale bounding boxes(a) IoU-Deviation Curve(b) ABS(Grad)-Deviation Curve
  • Figure 4: Detection examples on the test set of AI-TOD using YOLOv5s by $L_{SIoU}$ (first row) and $L_{Inner-SIoU}$(second row).
  • Figure 5: Blue points denote the anchors and green bounding boxes represent the different sizes of the target box (a) high IoU regression sample (b) low IoU regression sample
  • ...and 3 more figures