Skip to main content
QUICK REVIEW

[Paper Review] Anchor Box Optimization for Object Detection

Yuanyi Zhong, Jianfeng Wang|arXiv (Cornell University)|Dec 2, 2018
Advanced Neural Network ApplicationsComputer Science25 references15 citations
TL;DR

This paper proposes a method to dynamically learn anchor box shapes during training using stochastic gradient descent, enabling object detectors to automatically adapt anchor sizes and aspect ratios to data distribution and network capacity. The approach achieves consistent mAP gains of ≥1% across multiple benchmarks like COCO and Pascal VOC without increasing inference cost.

ABSTRACT

In this paper, we propose a general approach to optimize anchor boxes for object detection. Nowadays, anchor boxes are widely adopted in state-of-the-art detection frameworks. However, these frameworks usually pre-define anchor box shapes in heuristic ways and fix the sizes during training. To improve the accuracy and reduce the effort of designing anchor boxes, we propose to dynamically learn the anchor shapes, which allows the anchors to automatically adapt to the data distribution and the network learning capability. The learning approach can be easily implemented with stochastic gradient descent and can be plugged into any anchor box-based detection framework. The extra training cost is almost negligible and it has no impact on the inference time or memory cost. Exhaustive experiments demonstrate that the proposed anchor optimization method consistently achieves significant improvement ($\ge 1\%$ mAP absolute gain) over the baseline methods on several benchmark datasets including Pascal VOC 07+12, MS COCO and Brainwash. Meanwhile, the robustness is also verified towards different anchor initialization methods and the number of anchor shapes, which greatly simplifies the problem of anchor box design.

Motivation & Objective

  • To address the suboptimal performance caused by heuristic, fixed anchor box designs in object detection frameworks.
  • To eliminate the need for manual anchor shape tuning by making anchor dimensions trainable during training.
  • To improve detection accuracy across diverse datasets and detector architectures without increasing inference cost.
  • To demonstrate robustness of the method across different anchor initialization strategies and numbers of anchor shapes.

Proposed method

  • Treat anchor width and height as learnable parameters updated via stochastic gradient descent during training.
  • Introduce a soft assignment warm-up strategy to stabilize early training by gradually assigning ground-truth boxes to anchors.
  • Apply online clustering to refine anchor shapes during training, improving convergence and adaptability.
  • Use batch normalization without shifting (BN) to stabilize training, especially when combined with anchor optimization.
  • Integrate the method into existing anchor-based detectors like YOLOv2 and Faster R-CNN with minimal architectural changes.
  • Maintain inference efficiency by not modifying the inference network, ensuring no runtime or memory overhead.

Experimental results

Research questions

  • RQ1Can anchor box shapes be effectively learned during training to improve detection accuracy?
  • RQ2How does anchor optimization perform across different initialization methods (e.g., uniform, k-means, COCO-based)?
  • RQ3Does the method remain effective when varying the number of anchor shapes?
  • RQ4What training techniques are essential for stable and effective anchor optimization?
  • RQ5Can the method be generalized across one-stage and two-stage detectors?

Key findings

  • The proposed method achieves a 1.2% absolute mAP gain on the Brainwash dataset when initialized with k-means anchors, improving from 78.98% to 80.18%.
  • On Pascal VOC 07+12 with YOLOv2, the method improves mAP by 1.0% (from 78.52% to 79.52%) when using ResNet50 FPN.
  • On COCO 2017, the method improves mAP@.5:.95 by 0.31 points (from 36.78% to 37.09%) with Faster R-CNN and ResNet50 FPN.
  • The method consistently improves performance across different anchor initialization methods, including uniform, k-means, and COCO-based anchors.
  • The improvement is robust across different numbers of anchor shapes, with gains ranging from 0.5% to 1.2% mAP regardless of anchor count.
  • The method increases RPN recall on COCO 2017 by 0.83% at top 50 proposals and 0.51% at top 100, indicating better proposal quality.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.