Going deeper with Image Transformers

Hugo Touvron, Matthieu Cord, Alexandre Sablayrolles, Gabriel Synnaeve, Hervé Jégou
3/31/2021
cs.CV

Official code: huggingface/pytorch-image-models (36,940 stars, Apache-2.0, PyTorch, last commit 2026-04-29). 1 more implementation below.

Abstract

Transformers have been recently adapted for large scale image classification, achieving high scores shaking up the long supremacy of convolutional neural networks. However the optimization of image transformers has been little studied so far. In this work, we build and optimize deeper transformer networks for image classification. In particular, we investigate the interplay of architecture and optimization of such dedicated transformers. We make two transformers architecture changes that significantly improve the accuracy of deep transformers. This leads us to produce models whose performance does not saturate early with more depth, for instance we obtain 86.5% top-1 accuracy on Imagenet when training with no external data, we thus attain the current SOTA with less FLOPs and parameters. Moreover, our best model establishes the new state of the art on Imagenet with Reassessed labels and Imagenet-V2 / match frequency, in the setting with no additional training data. We share our code and models.

View on arXivView PDF

Code Implementations(2)

PyTorchApache-2.0

The largest collection of PyTorch image encoders / backbones. Including train, eval, inference, export scripts, and pretrained weights -- ResNet, ResNeXT, EfficientNet, NFNet, Vision Transformer (ViT), MobileNetV4, MobileNet-V3 & V2, RegNet, DPN, CSPNet, Swin Transformer, MaxViT, CoAtNet, ConvNeXt, and more

36,9405,171MDX, ShellFeb 2, 20195 months agoApache-2.0
augmixconvnextdistributed-trainingefficientnetimage-classification+15 more
Apache-2.0

Official DeiT repository

4,348591PythonDec 23, 20202 years agoApache-2.0

Similar Papers

Cite this paper

@article{touvron2021going,
  title  = {Going deeper with Image Transformers},
  author = {Hugo Touvron and Matthieu Cord and Alexandre Sablayrolles and Gabriel Synnaeve and Hervé Jégou},
  year   = {2021},
  eprint = {2103.17239},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2103.17239}
}

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/2103.17239.svg)](https://codeofpaper.com/paper/2103.17239)

Discussion