[Paper Review] Towards Accurate One-Stage Object Detection with AP-Loss
This paper proposes AP-loss, a novel ranking-based loss function that replaces traditional classification loss in one-stage object detectors to better address foreground-background class imbalance. By combining error-driven learning with backpropagation, the method optimizes the non-differentiable Average Precision loss, achieving state-of-the-art mAP improvements across COCO, VOC2007, and VOC2012 benchmarks without architectural changes.
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 verify good convergence property of the proposed algorithm theoretically and empirically. Experimental results demonstrate notable performance improvement in state-of-the-art one-stage detectors based on AP-loss over different kinds of classification-losses on various benchmarks, without changing the network architectures. Code is available at https://github.com/cccorn/AP-loss.
Motivation & Objective
- Address the severe foreground-background class imbalance in one-stage object detectors, which biases classification loss optimization.
- Overcome the limitations of existing classification losses (e.g., Focal Loss, balanced loss) that treat samples independently and rely on hand-crafted hyperparameters.
- Align the training objective more closely with the actual evaluation metric (mAP) by modeling sample relationships through a ranking task.
- Develop an effective optimization method for the non-differentiable and non-convex AP-loss, which is not amenable to standard gradient descent.
- Demonstrate that replacing standard classification loss with AP-loss leads to consistent performance gains across multiple benchmarks without architectural modifications.
Proposed method
- Replace the classification head in one-stage detectors with a ranking head that outputs scores for pairwise comparisons between anchors.
- Construct the AP-loss as the dot product between the primary terms of AP (derived from pairwise score differences) and the ground-truth label vector.
- Introduce a non-differentiable 'activation function' (step function) on pairwise differences to compute the primary terms of AP-loss.
- Propose a novel error-driven update scheme inspired by perceptron learning to pass gradients through the non-differentiable activation function.
- Combine the error-driven update with backpropagation to propagate gradients to network weights, enabling end-to-end training.
- Use a smooth approximation (sigmoid) of the step function in ablation studies to compare with approximate gradient methods, while the main method uses the exact non-differentiable form with error-driven updates.
Experimental results
Research questions
- RQ1Can replacing the classification task with a ranking task in one-stage detectors lead to better generalization and mAP performance?
- RQ2Is it possible to effectively optimize the non-differentiable Average Precision (AP) loss using a gradient-based deep learning framework?
- RQ3How does the proposed error-driven optimization scheme compare to approximate gradient and structured hinge loss methods in terms of convergence and final performance?
- RQ4Does AP-loss improve detection performance across diverse benchmarks (COCO, VOC2007, VOC2012) without architectural changes or advanced components?
- RQ5Can the proposed method achieve state-of-the-art results while maintaining inference speed comparable to the baseline detector?
Key findings
- The proposed AP-loss method achieves a 3.0% mAP improvement on the COCO test-dev set (42.1% mAP) compared to the baseline RetinaNet500 with focal loss (37.4% mAP).
- On VOC2007, the method achieves 45.0% mAP, outperforming the baseline RetinaNet500 (38.5% mAP) and all other compared one-stage detectors.
- On VOC2012, the method achieves 45.1% mAP, surpassing the best baseline (RefineDet512 with ResNet-101 at 45.7% mAP) and demonstrating consistent gains.
- The error-driven optimization scheme converges faster and achieves higher performance than approximate gradient and structured hinge loss methods, which either fail to converge or plateau below the true AP-loss limit.
- The method maintains the same inference speed (~11 fps on Titan X) as the baseline RetinaNet, confirming no computational overhead from the loss function change.
- The performance gain is achieved solely by replacing the classification loss with AP-loss, without using advanced techniques like deformable convolutions or SNIP, indicating the method's strong standalone effectiveness.
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.