# AP-Loss for Accurate One-Stage Object Detection

arXiv: https://arxiv.org/abs/2008.07294 · HTML: https://mlsanity.com/paper/2008.07294/

## Key facts

- Cited by 24 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 17 Aug 2020.

## Built on by (most cited first, 24 of 24)

- [YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors](https://mlsanity.com/paper/2207.02696/) (2022)
- [YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information](https://mlsanity.com/paper/2402.13616/) (2024)
- [YOLOv12: Attention-Centric Real-Time Object Detectors](https://mlsanity.com/paper/2502.12524/) (2025)
- [GrooMeD-NMS: Grouped Mathematically Differentiable NMS for Monocular 3D Object Detection](https://mlsanity.com/paper/2103.17202/) (2021)
- [Focal and Efficient IOU Loss for Accurate Bounding Box Regression](https://mlsanity.com/paper/2101.08158/) (2021)
- [Rank-DETR for High Quality Object Detection](https://mlsanity.com/paper/2310.08854/) (2023)
- [Stochastic Optimization of Areas Under Precision-Recall Curves with Provable Convergence](https://mlsanity.com/paper/2104.08736/) (2021)
- [VLM-PL: Advanced Pseudo Labeling Approach for Class Incremental Object Detection via Vision-Language Model](https://mlsanity.com/paper/2403.05346/) (2024)
- [Rank & Sort Loss for Object Detection and Instance Segmentation](https://mlsanity.com/paper/2107.11669/) (2021)
- [AutoLoss-Zero: Searching Loss Functions from Scratch for Generic Tasks](https://mlsanity.com/paper/2103.14026/) (2021)
- [RankED: Addressing Imbalance and Uncertainty in Edge Detection Using Ranking-based Losses](https://mlsanity.com/paper/2403.01795/) (2024)
- [MoCaE: Mixture of Calibrated Experts Significantly Improves Object Detection](https://mlsanity.com/paper/2309.14976/) (2023)
- [YOLO-PPA based Efficient Traffic Sign Detection for Cruise Control in Autonomous Driving](https://mlsanity.com/paper/2409.03320/) (2024)
- [Long-tail Detection with Effective Class-Margins](https://mlsanity.com/paper/2301.09724/) (2023)
- [Exploring the Algorithm-Dependent Generalization of AUPRC Optimization with List Stability](https://mlsanity.com/paper/2209.13262/) (2022)
- [Deep AUC Maximization for Medical Image Classification: Challenges and Opportunities](https://mlsanity.com/paper/2111.02400/) (2021)
- [Correlation Loss: Enforcing Correlation between Classification and Localization](https://mlsanity.com/paper/2301.01019/) (2023)
- [Class Uncertainty: A Measure to Mitigate Class Imbalance](https://mlsanity.com/paper/2311.14090/) (2023)
- [A systematic study of the foreground-background imbalance problem in deep learning for object detection](https://mlsanity.com/paper/2306.16539/) (2023)
- [Bucketed Ranking-based Losses for Efficient Training of Object Detectors](https://mlsanity.com/paper/2407.14204/) (2024)
- [Exact Reformulation and Optimization for Direct Metric Optimization in Binary Imbalanced Classification](https://mlsanity.com/paper/2507.15240/) (2025)
- [CPR++: Object Localization via Single Coarse Point Supervision](https://mlsanity.com/paper/2401.17203/) (2024)
- [SuperGF: Unifying Local and Global Features for Visual Localization](https://mlsanity.com/paper/2212.13105/) (2022)
- [Deep Reinforcement Learning-Based User Scheduling for Collaborative Perception](https://mlsanity.com/paper/2502.10456/) (2025)

## Abstract (arXiv)

One-stage object detectors are trained by optimizing classification-loss and localization-loss simultaneously, with the former suffering much from extreme foreground-background class imbalance issue due to the large number of anchors. This paper alleviates this issue by proposing a novel framework to replace the classification task in one-stage detectors with a ranking task, and adopting the Average-Precision loss (AP-loss) for the ranking problem. Due to its non-differentiability and non-convexity, the AP-loss cannot be optimized directly. For this purpose, we develop a novel optimization algorithm, which seamlessly combines the error-driven update scheme in perceptron learning and backpropagation algorithm in deep networks. We provide in-depth analyses on the good convergence property and computational complexity of the proposed algorithm, both theoretically and empirically. Experimental results demonstrate notable improvement in addressing the imbalance issue in object detection over existing AP-based optimization algorithms. An improved state-of-the-art performance is achieved in one-stage detectors based on AP-loss over detectors using classification-losses on various standard benchmarks. The proposed framework is also highly versatile in accommodating different network architectures. Code is available at https://github.com/cccorn/AP-loss .
