CSWin Transformer: A General Vision Transformer Backbone with Cross-Shaped Windows
CSWin Transformer: универсальный визион-трансформерный бэкенд с поперечно-образными окнами
2022-06-01
SCID: 54.1/ahfpzeht
Discuss with AI
COCO detection / ADE20K segmentationCSWin TransformerCross-Shaped Window self-attentionImageNet-1K / ImageNet-21KLocally-enhanced Positional Encoding (LePE)
Figures from the paper
Abstract (AI)
We present CSWin Transformer, an efficient and effective Transformer-based backbone for general-purpose vision tasks. A challenging issue in Transformer design is that global self-attention is very expensive to compute whereas local self-attention often limits the field of interactions of each token. To address this issue, we develop the Cross-Shaped Window self-attention mechanism for computing self-attention in the horizontal and vertical stripes in parallel that form a cross-shaped window, with each stripe obtained by splitting the input feature into stripes of equal width. We provide a mathematical analysis of the effect of the stripe width and vary the stripe width for different layers of the Transformer network which achieves strong modeling capability while limiting the computation cost. We also introduce Locally-enhanced Positional Encoding (LePE), which handles the local positional information better than existing encoding schemes. LePE naturally supports arbitrary input resolutions, and is thus especially effective and friendly for downstream tasks. Incorporated with these designs and a hierarchical structure, CSWin Transformer demonstrates competitive performance on common vision tasks. Specifically, it achieves 85.4% Top-1 accuracy on ImageNet-1K without any extra training data or label, 53.9 box AP and 46.4 mask AP on the COCO detection task, and 52.2 mIOU on the ADE20K semantic segmentation task, surpassing previous state-of-the-art Swin Transformer backbone by +1.2, +2.0, +1.4, and +2.0 respectively under the similar FLOPs setting. By further pretraining on the larger dataset ImageNet-21K, we achieve 87.5% Top-1 accuracy on ImageNet-1K and high segmentation performance on ADE20K with 55.7 mIoU.11Code and pretrain model is available at https://github.com/microsoft/CSWin-Transformer
Key Findings
1
CSWin Transformer with hierarchical structure achieves 85.4% Top-1 on ImageNet-1K without extra data, surpassing Swin Transformer by +1.2 under similar FLOPs.
2
CSWin achieves 53.9 box AP and 46.4 mask AP on COCO detection, and 52.2 mIoU on ADE20K segmentation, improving over Swin by +2.0, +1.4, and +2.0 respectively under similar FLOPs.
3
Introduced Cross-Shaped Window (CSWin) self-attention computing self-attention in parallel over horizontal and vertical stripes forming cross-shaped windows.
4
Pretraining on ImageNet-21K yields 87.5% Top-1 on ImageNet-1K and improves ADE20K segmentation to 55.7 mIoU.
5
Proposed Locally-enhanced Positional Encoding (LePE) that better handles local positional information and naturally supports arbitrary input resolutions.
6
Varying stripe width across Transformer layers provides strong modeling capability while limiting computational cost, supported by mathematical analysis.
Research Object
CSWin Transformer backbone (vision Transformer architecture with Cross-Shaped Window self-attention and Locally-enhanced Positional Encoding)
Research Subject
Design and evaluation of cross-shaped-window self-attention, stripe-width scheduling, and Locally-enhanced Positional Encoding to improve modeling capability, computational efficiency, and downstream vision task performance
Publication Details
Publication Date
2022-06-01
Journal
Publisher
ISSN
Cited by
1310
Access Type
Author Information
Download PDF
Subscribe to digest
References available in scid.ai14
Exploiting Generative AI to Scale up Intelligent Tutoring Systems2023
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows2021
Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions2021
Rethinking Semantic Segmentation from a Sequence-to-Sequence Perspective with Transformers2021
Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNet2021
Pre-Trained Image Processing Transformer2021
Transformer in Transformer2021
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale2020
Longformer: The Long-Document Transformer2020
Squeeze-and-Excitation Networks2018
Aggregated Residual Transformations for Deep Neural Networks2017
Deep Residual Learning for Image Recognition2016
Very Deep Convolutional Networks for Large-Scale Image Recognition2014
ImageNet: A large-scale hierarchical image database2009