Learning Globally Optimized Object Detector via Policy Gradient

Yongming Rao, Dahua Lin, Jiwen Lu, Jie Zhou

Introduction

Standard object detection frameworks, such as Faster R-CNN, typically treat the detection task as a set of independent classification and regression sub-problems during training. However, at inference time, these models are evaluated on the global quality of the entire set of predictions using metrics like mean Average Precision (mAP). This discrepancy creates a fundamental "gap" between the training objective and the actual performance metric. This paper introduces a novel training strategy using Policy Gradients (specifically the REINFORCE algorithm) to optimize detectors directly for mAP, ensuring that the model is "globally aware" during the learning phase.

The Training-Inference Gap

During training, a loss function evaluates each candidate bounding box (anchor or Region of Interest) in isolation, asking if it contains a specific object class and how well it aligns with the ground truth. In contrast, inference involves post-processing steps like Non-Maximum Suppression (NMS) to eliminate redundant detections. Because the standard training process does not account for NMS or the collective behavior of the predicted boxes, models often produce high-confidence but redundant boxes that negatively impact the final mAP score.

Methodology: Global Optimization via Policy Gradient

To bridge this gap, the authors frame object detection as a Reinforcement Learning (RL) problem. In this formulation:

  • Agent: The object detector itself.
  • Environment: The input image.
  • Action: The selection of a specific set of bounding boxes from the pool of candidates.
  • Reward: The mAP of the selected set relative to the ground truth.
Overview of the globally optimized detection framework using policy gradients to bridge the gap between training and inference objectives.

Optimizing for mAP directly is challenging because the action space (all possible combinations of boxes) is vast. The authors employ several techniques to make this tractable:

  1. Gradient Adjustment: Instead of replacing the standard loss, they modify the cross-entropy gradient. The gradient for each box is adaptively scaled based on its contribution to the overall image mAP.
  2. Baseline Subtraction: To manage the high variance of RL signals, they subtract a "baseline" reward (the mAP of the current state) from the reward of a specific action. This ensures that only actions improving the current result provide a positive learning signal.
  3. Joint Training: The policy gradient is combined with standard cross-entropy loss, providing a stable "anchor" for the model while the policy gradient fine-tunes it for global optimality.

Notably, this approach requires no changes to the model architecture and adds no computational overhead during inference.

Experimental Results

The researchers evaluated their approach on the COCO (Common Objects in Context) dataset using a ResNet-101 backbone. The method demonstrated significant performance improvements across various frameworks:

  • Faster R-CNN: Achieved a 2.0 point increase in COCO-style mAP (from 36.3% to 38.3%).
  • Faster R-CNN with FPN: Improved mAP by 1.8 points (from 37.7% to 39.5%).
  • Small Object Detection: There was a notable improvement in $mAP_S$, which is typically a difficult area for standard detectors.

The "globally optimized" detector was found to produce fewer high-confidence false positives compared to baselines, outperforming other optimization strategies like Online Hard Example Mining (OHEM) and Soft-NMS.

Conclusion and Future Work

By treating the selection of bounding boxes as a policy to be optimized, this work successfully aligns the training objective of object detectors with their evaluation metrics. While the training process becomes more complex due to mAP calculation and sampling, the resulting performance gains without inference-time costs are significant. Future research may extend this global optimization strategy to one-stage detectors like YOLO or SSD and further refine the stability of the policy gradient training.

Summary updated

BibTeX
@inproceedings{rao2018learning,
  author = {Yongming Rao and Dahua Lin and Jiwen Lu and Jie Zhou},
  title = {{Learning Globally Optimized Object Detector via Policy Gradient}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2018},
  doi = {10.1109/cvpr.2018.00648},
}
Figure