Keywords: computer vision, image recognition, self-attention, transformer, large-scale training
Abstract: While the Transformer architecture has become the de-facto standard for natural language processing tasks, its applications to computer vision remain limited. In vision, attention is either applied in conjunction with convolutional networks, or used to replace certain components of convolutional networks while keeping their overall structure in place. We show that this reliance on CNNs is not necessary and a pure transformer applied directly to sequences of image patches can perform very well on image classification tasks. When pre-trained on large amounts of data and transferred to multiple mid-sized or small image recognition benchmarks (ImageNet, CIFAR-100, VTAB, etc.), Vision Transformer (ViT) attains excellent results compared to state-of-the-art convolutional networks while requiring substantially fewer computational resources to train.
One-sentence Summary: Transformers applied directly to image patches and pre-trained on large datasets work really well on image classification.
Code Of Ethics: I acknowledge that I and all co-authors of this work have read and commit to adhering to the ICLR Code of Ethics
Code: [![github](/images/github_icon.svg) google-research/vision_transformer](https://github.com/google-research/vision_transformer) + [![Papers with Code](/images/pwc_icon.svg) 128 community implementations](https://paperswithcode.com/paper/?openreview=YicbFdNTTy)
Data: [CIFAR-10](https://paperswithcode.com/dataset/cifar-10), [CIFAR-100](https://paperswithcode.com/dataset/cifar-100), [ImageNet](https://paperswithcode.com/dataset/imagenet), [ImageNet-W](https://paperswithcode.com/dataset/imagenet-w), [JFT-300M](https://paperswithcode.com/dataset/jft-300m), [ObjectNet](https://paperswithcode.com/dataset/objectnet), [OmniBenchmark](https://paperswithcode.com/dataset/omnibenchmark), [Oxford 102 Flower](https://paperswithcode.com/dataset/oxford-102-flower), [VizWiz-Classification](https://paperswithcode.com/dataset/vizwiz-classification)
Community Implementations: [![CatalyzeX](/images/catalyzex_icon.svg) 15 code implementations](https://www.catalyzex.com/paper/arxiv:2010.11929/code)