Exploring Plain Vision Transformer Backbones for Object Detection

Yanghao Li, Hanzi Mao, Ross B. Girshick, Kaiming He

Abstract

We explore the plain, non-hierarchical Vision Transformer (ViT) as a backbone network for object detection. This design enables the original ViT architecture to be fine-tuned for object detection without needing to redesign a hierarchical backbone for pre-training. With minimal adaptations for fine-tuning, our plain-backbone detector can achieve competitive results. Surprisingly, we observe: (i) it is sufficient to build a simple feature pyramid from a single-scale feature map and (ii) it is sufficient to use window attention aided with very few cross-window propagation blocks. Our detector, named ViTDet, competes with leading hierarchical methods, reaching up to 61.3 AP on COCO.

Introduction: Challenging the Hierarchical Paradigm

For years, the standard design for object detection has relied on hierarchical backbones like ResNet or Swin Transformers. These architectures produce feature maps at multiple scales (e.g., 1/4, 1/8, 1/16, 1/32) to detect objects of varying sizes. While effective, this creates a coupling problem: using a new, powerful ViT model for detection often requires a complete architectural redesign to make it hierarchical before pre-training can even begin.

This paper asks a fundamental question: Can we use the original, plain, single-scale ViT for detection? By doing so, researchers could leverage any off-the-shelf pre-trained ViT without modifying its core structure, simplifying the pipeline and improving hardware efficiency.

Methodology: The ViTDet Architecture

The authors introduce ViTDet, which adapts a plain ViT backbone for detection using three minimal modifications during the fine-tuning stage:

  1. Simple Feature Pyramid: Instead of relying on the backbone to provide multi-scale features, ViTDet extracts the final feature map (typically at 1/16 scale) and applies parallel convolutions or deconvolutions to generate a pyramid of scales (1/4 to 1/32). This "neck" handles multi-scale requirements, allowing the backbone to remain "plain."
  2. Window Attention: To manage the high-resolution images required for detection, ViTDet uses non-overlapping window attention. Notably, it avoids the complex "shifted windows" used in models like Swin.
  3. Cross-Window Propagation: To facilitate information flow between isolated windows, a small number of "propagation blocks" (e.g., 4 out of 24 in ViT-L) are used. These can be global self-attention or simple convolutions.
Comparison between traditional hierarchical backbones with FPN and the proposed plain backbone with a simple feature pyramid.

Crucially, these adaptations are only introduced during fine-tuning. The backbone remains a standard ViT during pre-training, which is most effective when using self-supervised methods like Masked Autoencoders (MAE).

Key Results and Insights

The researchers evaluated ViTDet on the COCO and LVIS benchmarks, finding that the plain backbone approach is not only viable but highly competitive.

The Sufficiency of Simple Pyramids

One of the most surprising findings is that a simple feature pyramid built from a single scale performs as well as, or better than, a traditional Feature Pyramid Network (FPN) that relies on a hierarchical backbone.

Performance comparison of different pyramid designs on ViT-B and ViT-L backbones. The simple feature pyramid (c) achieves the best results.

Performance Highlights

  • State-of-the-Art Accuracy: ViTDet with a ViT-Huge backbone reached 61.3 AP on COCO, matching or exceeding top hierarchical models.
  • LVIS Success: On the long-tailed LVIS dataset, ViTDet achieved 48.1 mask AP, a 5-point improvement over strong baselines.
  • Scaling and Efficiency: As model size increases (ViT-L/H), the plain backbone becomes superior in terms of the accuracy-to-speed tradeoff. Because plain ViTs use uniform blocks, they are more hardware-friendly and offer better "wall-clock" performance on GPUs compared to complex hierarchical Transformers.

Conclusion

ViTDet demonstrates that the long-held assumption that object detection requires a hierarchical backbone is incorrect. By moving the multi-scale logic to a simple "neck" and utilizing the robust features learned through MAE pre-training, plain ViTs can serve as powerful, efficient, and flexible backbones for computer vision tasks. This study paves the way for a more unified architecture between vision and language processing, both utilizing the same fundamental Transformer blocks.

Summary updated

BibTeX
@inproceedings{li2022exploring,
  author = {Yanghao Li and Hanzi Mao and Ross B. Girshick and Kaiming He},
  title = {{Exploring Plain Vision Transformer Backbones for Object Detection}},
  booktitle = {European Conference on Computer Vision},
  year = {2022},
  url = {https://openreview.net/forum?id=ntt4Yes46uq},
}
Figure