Gaussian Guided IoU: A Better Metric for Balanced Learning on Object Detection

Shengkai Wu, Jinrong Yang, Hangcheng Yu, Lijun Gou, Xiaoping Li

Abstract

Modern object detection relies heavily on the Intersection over Union (IoU) metric to evaluate the quality of predicted bounding boxes. However, standard IoU is "center-blind," ignoring the alignment of box centers. This leads to training instabilities, particularly for slender objects, and limits localization precision. This paper proposes Gaussian Guided IoU (GGIoU), a metric that rewards center-to-center closeness. By incorporating GGIoU into anchor assignment and loss functions, the authors demonstrate significant performance gains on standard benchmarks like MS COCO and specialized datasets like the Stacked Carton Dataset (SCD).

The Limitations of Standard IoU

Anchor-based detectors (e.g., Faster R-CNN, RetinaNet) use IoU to categorize candidate boxes as positive or negative samples. Standard IoU suffers from two primary flaws:

  1. The Slender Object Dilemma: For thin or elongated objects, achieving a high area overlap is mathematically difficult. This often results in a single positive anchor, providing insufficient supervision for the model.
  2. Receptive Field Mismatch: Neural network features are tied to specific receptive fields. If an anchor has high IoU but its center is distant from the object's center, the features used for prediction are poorly aligned with the object, degrading final precision.
Comparison of IoU and GGIoU values across different bounding box configurations. Note how GGIoU differentiates cases with identical IoU but different center alignments.

Gaussian Guided IoU (GGIoU)

To address these issues, the authors introduce GGIoU, which integrates a Gaussian distance between the centers of the anchor and the ground truth box.

Key Components

  • Dynamic Variance: Unlike static distance metrics, GGIoU calculates the Gaussian "spread" based on the dimensions of the overlap region. This ensures the metric is sensitive to the shared spatial context between boxes.
  • GGIoU-Balanced Learning:
    • Assignment: GGIoU is used to select positive anchors. This naturally increases the number of positive samples for slender objects because center alignment is prioritized alongside area overlap.
  • Loss Function: GGIoU weights the localization loss, forcing the model to prioritize features that are well-aligned with the object's center, leading to sharper localization.

Experimental Results

The researchers evaluated GGIoU across MS COCO, PASCAL VOC, and the Stacked Carton Dataset (SCD). The latter is particularly challenging due to its density of slender objects (box edges).

Performance Gains

GGIoU consistently improved Mean Average Precision (mAP) across various backbones. On MS COCO, RetinaNet saw improvements of 1.4% to 2.0%. The most striking results appeared at high-precision thresholds. On the SCD dataset, the improvement at $AP_{90}$ reached a massive 11.1%, compared to a modest 0.65% at $AP_{50}$.

Improvements in Average Precision (AP) as the IoU threshold becomes more stringent, highlighting GGIoU's superior localization capabilities.

Robustness to Shape

By using GGIoU for anchor assignment, slender objects (e.g., umbrellas, wine glasses) that typically struggle with single-anchor supervision received more balanced training signals. On the SCD dataset, performance for these difficult shapes improved by an average of 1.7% to 1.8%.

Conclusion

Gaussian Guided IoU provides a more nuanced metric for object detection by accounting for center alignment. While it requires some hyperparameter tuning and has primarily been tested on anchor-based architectures, its ability to provide stable supervision for slender objects and achieve high-precision localization makes it a powerful alternative to standard IoU.

Summary updated

BibTeX
@inproceedings{wu2022gaussian,
  author = {Shengkai Wu and Jinrong Yang and Hangcheng Yu and Lijun Gou and Xiaoping Li},
  title = {{Gaussian Guided IoU: A Better Metric for Balanced Learning on Object Detection}},
  booktitle = {IET Comput. Vis},
  year = {2022},
  url = {https://openreview.net/forum?id=_8gfQ0MUBnH},
}
Figure