Global Context Vision Transformers

Ali Hatamizadeh, Hongxu Yin, Greg Heinrich, Jan Kautz, Pavlo Molchanov
6/20/2022
251 citations
cs.CVcs.AIcs.LG
transformer-attention

Official code: NVlabs/GCVit (450 stars, Python, last commit 2023-12-22). Most starred: huggingface/pytorch-image-models, a community implementation (37,303 stars, Python, Apache-2.0, PyTorch, last commit 2026-04-29, 83× the official stars). 1 more implementation below.

Abstract

We propose global context vision transformer (GC ViT), a novel architecture that enhances parameter and compute utilization for computer vision. Our method leverages global context self-attention modules, joint with standard local self-attention, to effectively and efficiently model both long and short-range spatial interactions, without the need for expensive operations such as computing attention masks or shifting local windows.

Show full abstract

In addition, we address the lack of the inductive bias in ViTs, and propose to leverage a modified fused inverted residual blocks in our architecture. Our proposed GC ViT achieves state-of-the-art results across image classification, object detection and semantic segmentation tasks. On ImageNet-1K dataset for classification, the variants of GC ViT with 51M, 90M and 201M parameters achieve 84.3%, 85.0% and 85.7% Top-1 accuracy, respectively, at 224 image resolution and without any pre-training, hence surpassing comparably-sized prior art such as CNN-based ConvNeXt and ViT-based MaxViT and Swin Transformer by a large margin. Pre-trained GC ViT backbones in downstream tasks of object detection, instance segmentation, and semantic segmentation using MS COCO and ADE20K datasets outperform prior work consistently. Specifically, GC ViT with a 4-scale DINO detection head achieves a box AP of 58.3 on MS COCO dataset.

View on arXivView PDF

Code Implementations(2)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
NVlabs/GCVitOfficial450Python–2023-12-22
huggingface/pytorch-image-modelsCommunity37,303PythonApache-2.02026-04-29
NVlabs/GCVitOfficial100%

[ICML 2023] Official PyTorch implementation of Global Context Vision Transformers

45052Python, ShellJun 18, 20222 years agoNOASSERTION
ade20kbackbonecocodeep-learningimagenet+8 more
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

37,3035,234Python, MDXFeb 2, 20197 months agoApache-2.0
augmixconvnextdistributed-trainingefficientnetimage-classification+15 more

Similar Papers

Cite this paper

@article{hatamizadeh2022global,
  title  = {Global Context Vision Transformers},
  author = {Ali Hatamizadeh and Hongxu Yin and Greg Heinrich and Jan Kautz and Pavlo Molchanov},
  year   = {2022},
  eprint = {2206.09959},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2206.09959},
  journal = {ICML 2023 2023}
}

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

Discussion