A Study on Self-Supervised Object Detection Pretraining

Trung Dang, Simon Kornblith, Huy Thong Nguyen, Peter Chin, Maryam Khademi

Abstract

Standard self-supervised learning (SSL) methods typically focus on instance-level representations, which are highly effective for image classification but sub-optimal for dense downstream tasks like object detection. This study investigates a region-based pretraining framework built upon the Bootstrap Your Own Latent (BYOL) architecture. By systematically evaluating box sampling strategies, feature extraction methods, and auxiliary tasks, the authors demonstrate that dense pretraining significantly outperforms global instance-level SSL. Notably, the research reveals that common SSL enhancements, such as multi-crop augmentations and auxiliary box-prediction tasks, fail to yield the expected performance gains for object detection, suggesting that spatial tasks require specialized pretraining strategies distinct from those used in classification.

Introduction

Most breakthroughs in self-supervised learning (SSL), such as SimCLR and BYOL, have focused on instance-level representation learning. These methods operate on the principle that different augmentations of the same image should yield similar global feature vectors. While this approach has revolutionized image classification, it remains sub-optimal for object detection. Detection requires "dense" spatial information—the ability to identify not just the presence of an object, but its precise location and the relationships between its constituent parts.

Existing "dense" SSL methods attempt to bridge this gap by comparing local patches or bounding boxes. However, the field lacks a consensus on the optimal design choices for these frameworks. This paper systematically investigates box sampling strategies, feature extraction methods, and the utility of auxiliary tasks—such as predicting box coordinates—to determine their impact on downstream performance on datasets like MS-COCO.

Methodology

The authors propose a general framework for dense pretraining based on the Bootstrap Your Own Latent (BYOL) architecture. Unlike standard BYOL, which compares whole-image embeddings, this framework focuses on localized regions through a four-step process:

  1. View Generation: Multiple augmented views of a single image are created.
  2. Box Sampling: $K$ bounding boxes are randomly sampled in a "base" view and projected onto the corresponding augmented views.
  3. Feature Extraction: Features for these specific boxes are extracted from the backbone's feature map using RoIAlign, a standard tool in object detection.
  4. Similarity Maximization: An "online" network is trained to predict the box features generated by a "target" network (which is an exponential moving average of the online network).

Additionally, the study explores two auxiliary tasks designed to instill "detection-awareness" during pretraining:

  • Box Prediction: A contrastive loss used to identify which box in one view corresponds to a specific box in another.
  • Box Regression: A Transformer decoder used to predict the actual coordinates of a box based on its extracted features.

Experimental Setup

Pretraining was conducted on the ImageNet dataset (~1.28 million images), the standard benchmark for self-supervised representation learning. To evaluate the effectiveness of the pretrained backbones, the models were finetuned on MS-COCO (~118k images) for object detection and instance segmentation tasks using a Faster R-CNN with a Feature Pyramid Network (FPN) backbone.

Key Insights and Results

Dense vs. Instance-Level Pretraining

The primary finding is that pretraining with a focus on local boxes consistently outperforms global, instance-level pretraining for detection tasks. The dense pretraining method achieved 40.8 AP on COCO, a significant improvement over the 39.1 AP achieved by standard BYOL. This suggests that region-based SSL provides a superior "spatial prior" for downstream localization tasks.

The Multi-Crop Paradox

In standard SSL, "multi-crop" augmentations (using many small crops of an image) are known to significantly boost performance. Surprisingly, the authors found that multi-crop was not effective for dense pretraining. This indicates that for detection, the model benefits more from seeing larger, coherent spatial contexts rather than fragmented local patches.

Simplicity in Sampling and Extraction

The study found that complex "selective search" or object-proposal algorithms for box sampling are unnecessary; simple random box sampling is robust and performs equally well. Furthermore, using a $1 \times 1$ RoIAlign (effectively extracting a single point's feature) performed slightly better than more complex $3 \times 3$ or $7 \times 7$ alignments. This suggests that maintaining high-level semantic consistency is more critical during pretraining than capturing fine-grained local texture.

The Failure of Auxiliary Tasks

Intuitively, auxiliary tasks like Box Regression or Box Prediction should help a model become a better detector. However, these tasks actually had an adverse effect on finetuning performance. The authors hypothesize that the gap between these specific proxy tasks and the complexities of supervised detection is currently too wide for the tasks to be beneficial during the pretraining phase.

Discussion and Conclusion

This study confirms that region-based pretraining is a powerful tool for improving object detection performance. However, it also highlights a significant challenge: many "tricks" that work for image classification do not translate to dense spatial tasks. The negative results regarding auxiliary tasks suggest that simply adding localization-based losses is insufficient to bridge the gap between SSL and supervised detection.

Future research should explore more sophisticated methods for aligning self-supervised proxy tasks with the requirements of benchmarks like COCO. Additionally, while this study focused on the ResNet-50 architecture, investigating how these dense spatial priors interact with Vision Transformers (ViTs) remains a promising avenue for future work.

Summary updated

BibTeX
@inproceedings{dang2022study,
  author = {Trung Dang and Simon Kornblith and Huy Thong Nguyen and Peter Chin and Maryam Khademi},
  title = {{A Study on Self-Supervised Object Detection Pretraining}},
  booktitle = {Workshops @ ECCV},
  year = {2022},
}
Figure