Hot Anchors: A Heuristic Anchors Sampling Method in RCNN-Based Object Detection

Jinpeng Zhang, Jinming Zhang, Shan YuSensors 2018 · OpenReview

TL;DR

This paper introduces "Hot Anchors," a novel heuristic method for sampling candidate object detection boxes in two-stage detectors like Faster R-CNN. By leveraging CNN feature map activations, Hot Anchors intelligently select promising regions, significantly improving detection accuracy and efficiency compared to traditional uniform sampling.

What Problem Does This Paper Address?

Object detection, particularly in complex scenes, relies on generating numerous "candidate boxes" (anchors) to identify potential objects. However, most of these anchors are background noise, leading to massive computational overhead and an imbalance between object and non-object samples. This imbalance hinders training and reduces detection performance. Existing methods either generate too many anchors (two-stage detectors) or struggle with accuracy due to imbalance (one-stage detectors). This paper aims to bridge this gap by proposing a smarter way to select anchors, focusing on their location rather than just uniform distribution.

Methods

The core innovation is the "Hot Anchors" sampling strategy. Instead of uniformly distributing anchors across feature maps, this method uses the activation values of CNN feature maps as a heuristic.

  • Hot Feature Map: For each stage of a CNN's feature maps, the authors sum the channels to create a "hot feature map." This map highlights regions with high activation, which are more likely to contain objects.
  • Heuristic Sampling: Pixels in the hot feature map exceeding a dynamically determined threshold (based on the mean pixel value) are considered "hot" and are used to generate anchors. This focuses anchor generation on promising areas.
  • Multi-scale Hot Anchors: The method can be applied to feature maps from different CNN stages, creating multi-scale hot anchors for better detection of objects of various sizes.
  • Positive and Negative Anchor Selection: The method extends to selecting both positive (object) and negative (background) anchors by using high and low activation thresholds, respectively.
  • Hit Distance Histogram: To evaluate anchor quality, the authors introduce a metric based on the distance between an anchor's center and the nearest ground-truth box center. A smaller distance indicates a better anchor.

Datasets

  • COCO2014: This dataset is used extensively for training and evaluation, including its training set (approx. 110k images, 860k ground-truth boxes) and mini-validation set (approx. 5k images).

Key Insights and Ideas

  • Feature Maps Hold the Key: The activation patterns within CNN feature maps are highly informative for guiding anchor selection, far more so than simple image geometry.
  • Beyond Uniformity: Uniform anchor sampling, while simple, is suboptimal because it treats all locations equally, ignoring the inherent spatial biases learned by CNNs.
  • Efficiency Through Intelligence: By focusing on "hot" regions, the number of anchors can be drastically reduced without sacrificing (and often improving) detection quality. This directly addresses the computational burden of two-stage detectors.
  • Hybrid Approach: Hot Anchors combine the benefits of heuristic sampling (using feature information) with the robustness of uniform sampling (controlled by CNN pooling operations), leading to superior performance.

Key Results

  • Improved Hit Rate: Hot Anchors achieve a significantly higher target hit rate compared to uniform and edge-based anchor sampling methods, especially at lower sampling coverage rates. For instance, with a sampling coverage rate of 2%, Hot Anchors achieve a hit rate of ~60%, while uniform anchors reach only ~40% (Figure 4).
  • Better Anchor Quality: Hit distance histograms show that Hot Anchors result in a much tighter distribution of distances to ground-truth boxes, indicating higher quality anchors with less deviation.
  • Enhanced Detection Performance: When integrated into Faster R-CNN and Light Head R-CNN, Hot Anchors lead to substantial improvements in mean average precision (mAP). For example, with 5k anchors, Faster R-CNN with Hot Anchors achieves 20.6% mAP, a +5.3% improvement over uniform anchors (Table 1).
  • Increased Efficiency: The method also improves inference speed (frames per second, fps). For instance, Light Head RCNN with Hot Anchors achieves 15 fps with 5k anchors, a +6 fps improvement over uniform anchors (Table 2).

Limitations and Future Work

  • Generalizability to One-Stage Detectors: While the paper focuses on two-stage detectors, the authors suggest that Hot Anchors could potentially benefit one-stage algorithms in the future.
  • Anchor Location Optimization: The paper primarily focuses on optimizing anchor locations. Future work could explore optimizing scales and ratios in conjunction with locations.
  • Adaptive Thresholding: The method uses adaptive thresholds for positive and negative anchors. Further research could explore more sophisticated adaptive strategies.

Summary updated

Abstract

In the image object detection task, a huge number of candidate boxes are generated to match with a relatively very small amount of ground-truth boxes, and through this method the learning samples can be created. But in fact the vast majority of the candidate boxes do not contain valid object instances and should be recognized and rejected during the training and evaluation of the network. This leads to extra high computation burden and a serious imbalance problem between object and none-object samples, thereby impeding the algorithm’s performance. Here we propose a new heuristic sampling method to generate candidate boxes for two-stage detection algorithms. It is generally applicable to the current two-stage detection algorithms to improve their detection performance. Experiments on COCO dataset showed that, relative to the baseline model, this new method could significantly increase the detection accuracy and efficiency.
BibTeX
@inproceedings{zhang2018hot,
  author = {Jinpeng Zhang and Jinming Zhang and Shan Yu},
  title = {{Hot Anchors: A Heuristic Anchors Sampling Method in RCNN-Based Object Detection}},
  booktitle = {Sensors},
  year = {2018},
  url = {https://openreview.net/forum?id=Q5gy445O9k},
}
Figure