Bottleneck Transformers for Visual Recognition

Aravind Srinivas, Tsung-Yi Lin, Niki Parmar, Jonathon Shlens, Pieter Abbeel +1 more
1/27/2021
1,243 citations
cs.CVcs.AIcs.LG
transformer-attention

No official code found. Best implementation: leaderj1001/BottleneckTransformers (279 stars). 2 more below.

Abstract

We present BoTNet, a conceptually simple yet powerful backbone architecture that incorporates self-attention for multiple computer vision tasks including image classification, object detection and instance segmentation. By just replacing the spatial convolutions with global self-attention in the final three bottleneck blocks of a ResNet and no other changes, our approach improves upon the baselines significantly on instance segmentation and object detection while also reducing the parameters, with minimal overhead in latency.

Show full abstract

Through the design of BoTNet, we also point out how ResNet bottleneck blocks with self-attention can be viewed as Transformer blocks. Without any bells and whistles, BoTNet achieves 44.4% Mask AP and 49.7% Box AP on the COCO Instance Segmentation benchmark using the Mask R-CNN framework; surpassing the previous best published single model and single scale results of ResNeSt evaluated on the COCO validation set. Finally, we present a simple adaptation of the BoTNet design for image classification, resulting in models that achieve a strong performance of 84.7% top-1 accuracy on the ImageNet benchmark while being up to 1.64x faster in compute time than the popular EfficientNet models on TPU-v3 hardware. We hope our simple and effective approach will serve as a strong baseline for future research in self-attention models for vision

View on arXivView PDF

Code Implementations(3)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
leaderj1001/BottleneckTransformersCommunity279–––
CandiceD17/Bottleneck-Transformers-for-Visual-RecognitionCommunity33–––
NZ99/bottleneck-transformer-flaxCommunity8–––

Bottleneck Transformers for Visual Recognition

27949

PyTorch Implementation of BoTNet. Link to paper: https://arxiv.org/abs/2101.11605

337

A JAX/Flax implementation of Bottleneck Transformers for Visual Recognition

81

Similar Papers

Cite this paper

@article{srinivas2021bottleneck,
  title  = {Bottleneck Transformers for Visual Recognition},
  author = {Aravind Srinivas and Tsung-Yi Lin and Niki Parmar and Jonathon Shlens and Pieter Abbeel and Ashish Vaswani},
  year   = {2021},
  eprint = {2101.11605},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2101.11605}
}

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

Discussion