[Paper Review] End-to-end training of object class detectors for mean average precision
This paper proposes end-to-end training of CNN-based object detectors using mean average precision (mAP) as the loss, including non-maximum suppression (NMS) during training. It introduces novel pseudo-gradient estimators for piecewise-constant functions to enable backpropagation through mAP with NMS, achieving performance on par with standard Fast R-CNN while ensuring training and inference use identical objectives.
We present a method for training CNN-based object class detectors directly using mean average precision (mAP) as the training loss, in a truly end-to-end fashion that includes non-maximum suppression (NMS) at training time. This contrasts with the traditional approach of training a CNN for a window classification loss, then applying NMS only at test time, when mAP is used as the evaluation metric in place of classification accuracy. However, mAP following NMS forms a piecewise-constant structured loss over thousands of windows, with gradients that do not convey useful information for gradient descent. Hence, we define new, general gradient-like quantities for piecewise constant functions, which have wide applicability. We describe how to calculate these efficiently for mAP following NMS, enabling to train a detector based on Fast R-CNN directly for mAP. This model achieves equivalent performance to the standard Fast R-CNN on the PASCAL VOC 2007 and 2012 datasets, while being conceptually more appealing as the very same model and loss are used at both training and test time.
Motivation & Objective
- To address the disconnect between training with window classification accuracy and evaluating with mAP at test time.
- To enable true end-to-end training of object detectors by incorporating NMS and mAP as the training objective.
- To overcome the challenge of optimizing non-differentiable, piecewise-constant mAP with NMS by defining new gradient-like quantities.
- To develop a method that is compatible with standard deep learning frameworks and does not require expensive max-oracle computation.
Proposed method
- Proposes two pseudo-gradient estimators—MEE (Mean of Expected Edits) and SDE (Score Difference Estimator)—for piecewise-constant functions to approximate gradients of mAP after NMS.
- Introduces a differentiable mAP loss layer that computes mAP over detections following NMS, enabling backpropagation through the entire detection pipeline.
- Applies the method within the Fast R-CNN framework, training the full detector end-to-end using stochastic gradient descent with mAP as the loss.
- Uses NMS during training to ensure that the model learns to optimize the final evaluation metric, including the non-local effects of suppression.
- Employs score regularisation and gradient clipping to stabilize training, as raw mAP gradients are sparse and high-variance.
- Designs the method to be plug-and-play in existing deep learning frameworks like Caffe, requiring no changes to optimisation algorithms.
Experimental results
Research questions
- RQ1Can object detectors be trained directly for mAP with NMS included in the training process, rather than only at test time?
- RQ2How can gradients be approximated for the piecewise-constant mAP loss following NMS, given that standard backpropagation fails?
- RQ3Does end-to-end training for mAP with NMS yield performance equivalent to standard training for window classification accuracy?
- RQ4Can the proposed pseudo-gradient estimators generalize to other piecewise-constant losses, such as those used in information retrieval?
- RQ5Is the method stable and scalable in practice, and does it avoid the need for expensive max-oracle computation?
Key findings
- The proposed method achieves mAP performance equivalent to standard Fast R-CNN on both PASCAL VOC 2007 and 2012 datasets when training with mAP and NMS.
- The MEE pseudo-gradient estimator slightly outperforms SDE across all experiments, particularly due to its robustness to score distance variations.
- VGG16 models outperform AlexNet models, confirming the benefit of deeper architectures when training with mAP.
- Ablation studies show that key training modifications—such as foreground sampling ratio, batch size, score regularisation, and gradient clipping—are essential for stable training.
- Training fails without gradient clipping or score regularisation, as gradients become numerically unstable and cause score explosion.
- The method outperforms prior work like Song et al. [19] in training stability and generality, while avoiding the need for class-specific models or max-oracle computation.
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.