Unleashing Vanilla Vision Transformer with Masked Image Modeling for Object Detection

Yuxin Fang, Shusheng Yang, Shijie Wang, Yixiao Ge, Ying Shan +1 more
4/6/2022
71 citations
cs.CV
transformer-attentioncontrastive-ssl

Official code: hustvl/MIMDet (343 stars, Python, MIT, last commit 2023-10-21).

Abstract

We present an approach to efficiently and effectively adapt a masked image modeling (MIM) pre-trained vanilla Vision Transformer (ViT) for object detection, which is based on our two novel observations: (i) A MIM pre-trained vanilla ViT encoder can work surprisingly well in the challenging object-level recognition scenario even with randomly sampled partial observations, e.g., only 25% $\sim$ 50% of the input embeddings. (ii) In order to construct multi-scale representations for object detection from single-scale ViT, a randomly initialized compact convolutional stem supplants the pre-trained large kernel patchify stem, and its intermediate features can naturally serve as the higher resolution inputs of a feature pyramid network without further upsampling or other manipulations. While the pre-trained ViT is only regarded as the 3$^{rd}$-stage of our detector's backbone instead of the whole feature extractor.

Show full abstract

This results in a ConvNet-ViT hybrid feature extractor. The proposed detector, named MIMDet, enables a MIM pre-trained vanilla ViT to outperform hierarchical Swin Transformer by 2.5 box AP and 2.6 mask AP on COCO, and achieves better results compared with the previous best adapted vanilla ViT detector using a more modest fine-tuning recipe while converging 2.8$\times$ faster. Code and pre-trained models are available at https://github.com/hustvl/MIMDet.

View on arXivView PDF

Code Implementations(1)

hustvl/MIMDetOfficial100%
MIT

[ICCV 2023] You Only Look at One Partial Sequence

34330PythonApr 1, 20223 years agoMIT
computer-visioninstance-segmentationmaemasked-image-modelingobject-detection+2 more

Similar Papers

Cite this paper

@article{fang2022unleashing,
  title  = {Unleashing Vanilla Vision Transformer with Masked Image Modeling for Object Detection},
  author = {Yuxin Fang and Shusheng Yang and Shijie Wang and Yixiao Ge and Ying Shan and Xinggang Wang},
  year   = {2022},
  eprint = {2204.02964},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2204.02964}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2204.02964.svg)](https://codeofpaper.com/paper/2204.02964)

Discussion