[Paper Review] IoU-balanced Loss Functions for Single-stage Object Detection
This paper proposes IoU-balanced loss functions to improve localization accuracy in single-stage object detectors by aligning classification and localization tasks. It introduces IoU-balanced classification loss to prioritize high-IoU positive samples and IoU-balanced localization loss to reduce gradients from low-IoU predictions, achieving up to 1.7% AP and 2.4% AP75 gains on COCO.
Single-stage object detectors have been widely applied in computer vision applications due to their high efficiency. However, we find that the loss functions adopted by single-stage object detectors hurt the localization accuracy seriously. Firstly, the standard cross-entropy loss for classification is independent of the localization task and drives all the positive examples to learn as high classification scores as possible regardless of localization accuracy during training. As a result, there will be many detections that have high classification scores but low IoU or detections that have low classification scores but high IoU. Secondly, for the standard smooth L1 loss, the gradient is dominated by the outliers that have poor localization accuracy during training. The above two problems will decrease the localization accuracy of single-stage detectors. In this work, IoU-balanced loss functions that consist of IoU-balanced classification loss and IoU-balanced localization loss are proposed to solve the above problems. The IoU-balanced classification loss pays more attention to positive examples with high IoU and can enhance the correlation between classification and localization tasks. The IoU-balanced localization loss decreases the gradient of examples with low IoU and increases the gradient of examples with high IoU, which can improve the localization accuracy of models. Extensive experiments on challenging public datasets such as MS COCO, PASCAL VOC and Cityscapes demonstrate that both IoU-balanced losses can bring substantial improvement for the popular single-stage detectors, especially for the localization accuracy. On COCO test-dev, the proposed methods can substantially improve AP by $1.0\%\sim1.7\%$ and AP75 by $1.0\%\sim2.4\%$. On PASCAL VOC, it can also substantially improve AP by $1.3\%\sim1.5\%$ and AP80, AP90 by $1.6\%\sim3.9\%$.
Motivation & Objective
- Address the misalignment between classification and localization in single-stage detectors, where high classification scores do not correlate with accurate bounding boxes.
- Identify that standard cross-entropy and smooth L1 losses degrade localization by ignoring IoU during training.
- Propose a unified loss framework that explicitly incorporates IoU to improve correlation between classification confidence and localization quality.
- Improve model generalization and robustness on challenging benchmarks by reducing the influence of low-IoU, hard-to-localize examples during backpropagation.
Proposed method
- Introduce IoU-balanced classification loss that reweights positive samples based on their IoU with ground-truth boxes, giving higher weight to high-IoU positives.
- Design IoU-balanced localization loss that scales gradients by IoU, reducing influence from low-IoU predictions and amplifying gradients from high-IoU ones.
- Use a learnable temperature parameter in the classification loss to control the sharpness of the IoU-weighting distribution.
- Apply the losses within standard single-stage detectors like RetinaNet and YOLO, without architectural changes.
- Train end-to-end using standard optimization, with the new losses replacing standard cross-entropy and smooth L1 losses.
- Ensure gradient flow is preserved while emphasizing high-quality detections during backpropagation.
Experimental results
Research questions
- RQ1How does ignoring IoU during classification training affect the localization performance of single-stage detectors?
- RQ2To what extent can reweighting positive samples by their IoU improve the correlation between classification confidence and localization accuracy?
- RQ3Can modifying the localization loss to downweight low-IoU predictions lead to better regression convergence and generalization?
- RQ4What is the impact of IoU-balanced losses on standard detection benchmarks like COCO, PASCAL VOC, and Cityscapes?
- RQ5Does the proposed method improve both AP and AP75, indicating gains in both average and high-IoU detection performance?
Key findings
- On MS COCO test-dev, the proposed IoU-balanced losses improve AP by 1.0% to 1.7% and AP75 by 1.0% to 2.4% across multiple single-stage detectors.
- On PASCAL VOC, the method achieves a 1.3% to 1.5% improvement in AP, and up to 3.9% gain in AP90, indicating strong gains in high-IoU detection.
- The IoU-balanced localization loss significantly reduces the influence of outliers with poor localization accuracy during training.
- The IoU-balanced classification loss enhances the correlation between classification confidence and IoU, reducing false positives with high scores but low localization quality.
- The gains are consistent across different backbone architectures and detector heads, demonstrating generalization across models.
- The improvements are achieved without architectural changes or additional inference cost, making the method practical for real-world deployment.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.