Skip to main content
QUICK REVIEW

[논문 리뷰] CSWin Transformer: A General Vision Transformer Backbone with Cross-Shaped Windows

Xiaoyi Dong, Jianmin Bao|arXiv (Cornell University)|2021. 07. 01.
CCD and CMOS Imaging Sensors참고 문헌 71인용 수 101
한 줄 요약

CSWin Transformer는 가로·세로 스트라이프를 병렬로 활용하는 십자형 윈도우 자기주의와 로컬하게 강화된 위치 인코딩을 도입하여, 분류, 탐지 및 세분화에서 강력한 성능을 보이는 확장 가능한 범용 비전 백본을 만든다.

ABSTRACT

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. The code and models are available at https://github.com/microsoft/CSWin-Transformer.

연구 동기 및 목표

  • 향상된 효율성과 장거리 모델링을 갖춘 범용 비전 트랜스포머 백본 개발.
  • 가로 및 세로 스트라이프에서 병렬로 주의를 계산하는 십자형 윈도우 자기주의 메커니즘을 제안.
  • 로컬 위치 바이어스 및 입력 해상도 유연성 향상을 위한 Locally-Enhanced Positional Encoding (LePE) 도입.
  • 계층적 CSWin Transformer 아키텍처를 구축하고 ImageNet-1K, COCO, ADE20K에서 검증.
  • 유사 FLOPs 하에서 Swin Transformer 대비 개선을 시연하고, 더 큰 사전학습 데이터로 규모를 확장.

제안 방법

  • 가로 및 세로 스트라이프 주의에 대해 멀티헤드를 두 개의 병렬 그룹으로 나누는 Cross-Shaped Window (CSWin) 자기주를 정의한다.
  • 동일 너비 sw의 스트라이프 내에서 주의를 계산하고, 스트라이프 너비는 깊이에 따라 조정하여 용량과 비용의 균형을 맞춘다.
  • 블록 내에서 가로 및 세로 주의가 병렬로 실행되도록 헤드를 두 그룹으로 분할하되, 추가 계산 없이 수행한다.
  • 투사된 값에 작용하고 임의의 입력 해상도를 지원하는 self-attention의 평행 모듈로 추가되는 Locally-Enhanced Positional Encoding (LePE)을 도입한다.
  • 겹치는 임베딩을 가진 4단계 계층적 CSWin Transformer를 구성하고, 채널 수와 헤드 구성이 지정된 네 가지 변형 CSWin-T/S/B/L을 구축한다.
  • ImageNet-1K 분류, COCO 객체 탐지/인스턴스 세분화, 그리고 ADE20K 시맨틱 세분화에서 ImageNet-21K 사전학습 여부에 따라 평가한다.

실험 결과

연구 질문

  • RQ1십자형 윈도우를 통해 CSWin 자기주가 효율적으로 더 큰 효과적 수용영역(receptive fields)을 달성할 수 있는가?
  • RQ2병렬 가로/세로 스트라이프 주의가 계산량을 크게 늘리지 않으면서 모델링 능력을 향상시키는가?
  • RQ3LePE가 다양한 입력 해상도 및 다운스트림 작업에서 견고한 위치 인코딩을 제공하는가?
  • RQ4Swin 및 다른 비전 트랜스포머와 비교하여 일반 백본으로서 CSWin Transformer가 분류, 탐지 및 세분화에서 어떻게 성능을 보이는가?

주요 결과

  • CSWin-T는 4.3G FLOPs에서 ImageNet-1K의 Top-1 82.7%를 달성하여 유사 예산 하의 Swin-T 및 DeiT-S를 능가한다.
  • 비슷한 FLOPs 및 모델 크기에서 CSWin-S와 CSWin-B는 ImageNet-1K에서 Swin-S 및 Swin-B를 능가한다.
  • COCO 객체 탐지에서 CSWin-B는 53.9 box AP 및 46.4 mask AP를 달성해 Swin-B를 상당한 차이로 능가한다.
  • ADE20K 세분화에서 CSWin-B는 53.9 mIoU(일부 설정에서 52.2 mIoU) 를 달성하고, CSWin-L은 ImageNet-21K 사전학습으로 55.7 mIoU에 도달하여 기존 SOTA 백본을 능가한다.
  • ImageNet-21K 사전학습으로 CSWin-B/L은 각각 ImageNet-1K에서 87.0/87.5 Top-1 정확도를 달성하며 더 큰 데이터의 이점을 보인다.

더 나은 연구,지금 바로 시작하세요

연구 설계부터 논문 작성까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.