Source-linked AI summary

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

Hao Zhang, Cong Xu, Shuaijie Zhang

arXiv:2311.02877v4cs.CVcs.AI

TL;DR

Existing IoU-based bounding box regression losses have weak generalization across detection tasks because they do not adapt the IoU loss itself. The paper proposes Inner-IoU, which uses scale-controlled auxiliary bounding boxes, and reports faster convergence and improved detection performance.

  • Problem

    Existing IoU-based bounding box regression losses do not adjust to different detectors and detection tasks, limiting their generalization.

  • Method

    Inner-IoU calculates IoU loss with auxiliary bounding boxes whose scales are controlled by a scale factor ratio and integrates with existing IoU-based loss functions.

  • Results

    Inner-IoU improves convergence across high- and low-IoU regression scenarios and increases AP50 and mAP50:95 by more than 0.5% in a comparative test-set experiment.

  • Takeaways & Limitations

    Using smaller auxiliary boxes for high-IoU samples and larger auxiliary boxes for low-IoU samples provides a scale-adaptive approach that improves reported detection performance and generalization.

Abstract

from arXiv · show

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.

I. INTRODUCTION

Existing IoU-based bounding-box regression losses mainly add geometric terms, but the IoU component itself has weak adaptability across detection tasks. The paper proposes Inner-IoU, using scale-controlled auxiliary boxes to tailor regression for different IoU samples and improve performance.

  • Motivation: Existing IoU-based losses add geometric constraints but do not address the limited generalization of IoU loss across detection tasks.GIoU, DIoU, CIoU, EIoU, and SIoU extend IoU with additional terms for overlap, distance, width, height, angle, or shape.
  • Motivation: Smaller auxiliary boxes provide a gain for high-IoU samples, whereas larger auxiliary boxes are intended for low-IoU samples.The proposed analysis distinguishes regression samples by IoU and varies auxiliary-box scale accordingly.
  • Method: Inner-IoU uses a scale-factor ratio to generate auxiliary boxes of different sizes and calculate the IoU-based loss without adding new loss terms.The method can be applied to existing IoU-based loss functions.
  • Results: Simulation and comparative experiments report faster regression, improved detection performance and generalization, and state-of-the-art results across datasets with different pixel sizes.The introduction summarizes these findings without providing specific benchmark values in this section.

A. Object Detection

Object detection combines classification and localization, with bounding box regression serving the detector’s localization branch.

  • Object detection includes both object classification and localization.
  • Anchor-based detectors generate anchors, whereas anchor-free detectors do not.Examples of anchor-based methods include Faster R-CNN and YOLO; anchor-free examples include CornerNet and FCOS.
  • Bounding box regression loss functions are used across these detection algorithms.

B. Bounding Box Regression Losses

IoU-based regression losses progressively add geometric constraints to address shortcomings in overlap, distance, shape, and angle modeling.

  • IoU loss replaced l_n-norm loss because its predicted boxes provide more accurate regression results.IoU loss nevertheless cannot solve gradient vanishing for non-overlapping samples.
  • GIoU addresses non-overlap gradient vanishing by introducing the smallest box covering the target and predicted boxes.
  • DIoU adds a normalized center-distance constraint to IoU loss to improve convergence speed and position accuracy.
  • CIoU further adds shape similarity, while EIoU redefines shape loss and uses focal loss to address sample imbalance.
  • SIoU adds the angle between the prediction box and ground-truth box as an additional loss component.

III. METHOD

The method analyzes how IoU and its gradients vary with bounding-box scale, motivating auxiliary boxes whose size is adapted to regression quality.

  • A. Bounding Box Regression Mode Analysis: IoU loss evaluates regression state and propagates gradients to accelerate bounding-box convergence.
  • A. Bounding Box Regression Mode Analysis: The simulations compare IoU and absolute-gradient deviations across positional relationships and bounding-box scales.Fig. 3 uses five anchor–ground-truth positional relationships and different-scale boxes.
  • A. Bounding Box Regression Mode Analysis: Smaller auxiliary boxes produce larger absolute IoU gradients for high-IoU samples.
  • A. Bounding Box Regression Mode Analysis: Larger auxiliary boxes produce larger absolute IoU gradients for low-IoU samples.
  • A. Bounding Box Regression Mode Analysis: Inner-IoU uses auxiliary boxes to accelerate regression without adding new loss terms.The scaling factor ratio controls auxiliary-box size, with smaller boxes for high-IoU samples and larger boxes for low-IoU samples.
  • A. Bounding Box Regression Mode Analysis: Figure 4 compares LSIoU and LInner−SIoU detection examples on AI-TOD using YOLOv5s.

B. Inner-IOU Loss

Inner-IoU computes IoU loss using scale-controlled auxiliary bounding boxes, adapting regression behavior to sample quality and detection settings. Smaller boxes target high-IoU samples, while larger boxes expand regression support for low-IoU samples.

  • Inner-IoU Loss: Inner-IoU introduces a scale factor ratio to generate auxiliary bounding boxes for calculating IoU-based losses.The ratio typically ranges from 0.5 to 1.5 and controls auxiliary-box scale.
  • Inner-IoU Loss: Auxiliary bounding boxes can address weak generalization in existing IoU losses across datasets and detectors.The method integrates with existing IoU-based loss functions rather than adding new loss terms.
  • Inner-IoU Loss: Inner-IoU retains the [0,1] loss range and has a deviation curve similar to IoU loss.The calculation differs primarily in the scale of the auxiliary bounding boxes.
  • Inner-IoU Loss: For ratios below 1, smaller auxiliary boxes narrow the regression range and increase gradient magnitude for high-IoU samples.This configuration is intended to accelerate convergence for samples already having high overlap.
  • Inner-IoU Loss: For ratios above 1, larger auxiliary boxes expand the effective regression range for low-IoU samples.The paper identifies ratio greater than 1 as suitable for low-IoU regression.

A. Simulation Experiment

The simulation evaluates bounding-box regression across varied target shapes and anchor distributions. Using ratio 0.8 for high-IoU samples and 1.2 for low-IoU samples, Inner-IoU converges faster than existing methods.

  • Simulation Experiment: The simulation varies target and anchor aspect ratios across 1:4, 1:3, 1:2, 1:1, 2:1, 3:1, and 4:1.Anchor distributions are centered at (100,100), with differing radii between the two scenarios.
  • Simulation Experiment: The simulation fits 2000 × 7 × 7 anchor boxes to each target box across seven target aspect ratios.Across the experiments, the setup contains 686000 compression cases.
  • Simulation Experiment: For high-IoU regression samples, the simulation sets the scale factor ratio to 0.8.This configuration is used to evaluate convergence in the high-overlap scenario.
  • Simulation Experiment: For low-IoU regression samples, the simulation sets the scale factor ratio to 1.2.The larger auxiliary-box configuration evaluates convergence in the low-overlap scenario.
  • Simulation Experiment: Inner-IoU shows better convergence speed than existing methods in both simulated regression scenarios.The proposed method is represented by the dashed line in Fig. 7.

B. Comparison Experiments

On PASCAL VOC with YOLOv7-tiny, Inner-CIoU and Inner-SIoU outperform their original losses during training and improve test-set detection metrics and localization quality.

  • Comparison Experiments: The comparison uses YOLOv7-tiny trained for 150 epochs on VOC2007 and VOC2012 trainval and evaluated on VOC2007 test.The training set contains 16551 images and the test set contains 4952 images across 20 categories.
  • Comparison Experiments: Detection examples show more accurate positioning and fewer false or missed detections than existing methods.The paper cites Fig. 2 and Fig. 6 for these qualitative comparisons.

YOLOv5 on AI-TOD

On the small-object AI-TOD dataset, YOLOv5s experiments test Inner-IoU’s generalization using SIoU as the comparison. Ratios below 1 benefit high-IoU samples, while ratios above 1 benefit low-IoU samples.

  • YOLOv5 on AI-TOD: The AI-TOD experiment uses YOLOv5s with SIoU as the comparison method to assess generalization.AI-TOD contains 28036 aerial images, eight target types, and 700621 object instances.
  • YOLOv5 on AI-TOD: AI-TOD’s average target size is 12.8 pixels, substantially smaller than those in other target-detection datasets.The dataset is split evenly into 14018 training and 14018 test images.
  • YOLOv5 on AI-TOD: Ratios from 0.7 to 0.8 generate smaller auxiliary boxes and provide gains for high-IoU samples.These settings are less than 1.
  • YOLOv5 on AI-TOD: Ratios greater than 1 generate larger auxiliary boxes and accelerate convergence for low-IoU samples.The experiment also compares detection results on the test set.
  • YOLOv5 on AI-TOD: The method is reported to outperform existing methods across general and very-small-target detection tasks.The conclusion states that its generalization was confirmed through simulation and ablation experiments.
Loading 2311.02877v4…