Rethinking Training from Scratch for Object Detection

Yang Li, Hong Zhang, Yu ZhangarXiv 2021

Abstract

Object detection models traditionally rely on ImageNet pre-training, a process that is computationally expensive and assumes classification features are optimal for detection. This paper introduces Direct Detection Pre-training (DDP), a coarse-to-fine strategy that bypasses ImageNet entirely. By pre-training on the target detection dataset at low resolution and then fine-tuning at high resolution, DDP achieves an 11x speedup in the pre-training phase and a +1.8 mAP improvement over ImageNet-based models on the COCO benchmark.

Introduction

The "de-facto" standard for object detection involves fine-tuning a model pre-trained on ImageNet. While effective, this dependency is time-consuming and relies on the assumption that classification-centric features translate perfectly to localization tasks. Previous attempts to train "from scratch" on target datasets often required excessively long training schedules (up to 6x) and specialized normalization techniques like Synchronized Batch Normalization (SyncBN) to handle small batch sizes at high resolutions.

The authors propose a "fast scratch" pipeline that is both efficient and high-performing, designed to work within the memory constraints of consumer-grade GPUs.

Methods: Direct Detection Pre-training (DDP)

The core of the DDP approach is a two-phase pipeline that decouples feature learning from high-resolution refinement:

  1. Coarse Pre-training Phase: The model is trained on the target detection dataset (e.g., MS-COCO) using low-resolution images (e.g., 448x448). The reduced resolution allows for significantly larger batch sizes (e.g., 8 or 16) on standard 11GB GPUs, enabling the effective use of standard Batch Normalization (BN) without the overhead of SyncBN.
  2. Fine Fine-tuning Phase: The model is then fine-tuned on the same dataset using standard high-resolution images (e.g., 1333x800).
Training curves comparing Direct Detection Pre-training (DDP) against ImageNet and Scratch baselines.

Technical Innovations

  • Resizing and Augmentation: The authors found that "ImageNet-style" resizing (resizing followed by random cropping) is superior to other methods like "Stitcher," as it provides stronger data augmentation during the coarse phase.
  • Fixed Batch Normalization: During the high-resolution fine-tuning phase, freezing all BN parameters (Fixed BN) was found to yield the best accuracy and faster training speeds.
  • Strong Supervision: Unlike previous methods that only used classification labels, DDP utilizes bounding boxes and masks during pre-training, providing a more relevant signal for detection tasks.

Key Results

The DDP strategy demonstrates significant advantages in both speed and accuracy across standard benchmarks like MS-COCO.

Comparison of bbox mAP vs. total training time for various pre-training strategies.
  • Efficiency: Direct pre-training is 11x faster than traditional ImageNet pre-training. The entire pipeline is memory-efficient, requiring only ~8GB of VRAM.
  • Performance: On COCO, DDP achieved 40.0 mAP with a 1x schedule, outperforming the ImageNet-pre-trained baseline (38.2 mAP) by +1.8 points. It also surpasses previous state-of-the-art "scratch" methods that required much longer 6x schedules.
  • Versatility: The strategy is effective for both traditional CNNs and modern Transformer-based backbones like the Swin Transformer.

Discussion and Limitations

While DDP offers a powerful alternative to ImageNet pre-training, it faces challenges in extremely data-scarce environments. In scenarios like PASCAL VOC with very few images, the target dataset may lack the diversity required to learn a robust universal representation during the coarse phase. Future work may involve leveraging massive detection-specific datasets like Objects365 to further refine these efficient training strategies and potentially eliminate the need for classification-based pre-training entirely.

Conclusion

Rethinking the training pipeline for object detection reveals that high resolution is not a prerequisite for effective feature learning. By leveraging low-resolution pre-training on target datasets, DDP provides a faster, more accurate, and more accessible path to high-performance object detection without the need for external classification data.

Summary updated

BibTeX
@misc{li2021rethinking,
  author = {Yang Li and Hong Zhang and Yu Zhang},
  title = {{Rethinking Training from Scratch for Object Detection}},
  year = {2021},
  eprint = {2106.03112},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2106.03112},
}
Figure