提出一种分层视觉Transformer,用移位窗口提升效率与精度。
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows

- 采用移位窗口机制,局部计算注意力并跨窗口连接
- 图像分类87.3%准确率,目标检测58.7盒AP,语义分割53.5 mIoU
- 适合各类视觉任务,尤其擅长高分辨率图像处理
本文提出一种新型视觉Transformer——Swin Transformer,可作为计算机视觉的通用主干网络。针对视觉与语言在尺度变化和像素分辨率上的差异,设计了一种分层Transformer,其表示通过移位窗口计算。该机制将自注意力限制在非重叠局部窗口内以提升效率,同时支持跨窗口连接。该架构具有多尺度建模能力,且计算复杂度与图像尺寸呈线性关系。Swin Transformer在多项视觉任务中表现优异:图像分类达到ImageNet-1K上87.3%的Top-1准确率;目标检测在COCO test-dev上取得58.7盒AP和51.1掩码AP;语义分割在ADE20K val集上达53.5 mIoU。相比此前最优模型,检测性能提升+2.7盒AP和+2.6掩码AP,分割提升+3.2 mIoU。该设计对全MLP架构也具优势。代码与模型已公开。
原文摘要 · Abstract (English)
This paper presents a new vision Transformer, called Swin Transformer, that capably serves as a general-purpose backbone for computer vision. Challenges in adapting Transformer from language to vision arise from differences between the two domains, such as large variations in the scale of visual entities and the high resolution of pixels in images compared to words in text. To address these differences, we propose a hierarchical Transformer whose representation is computed with \textbf{S}hifted \textbf{win}dows. The shifted windowing scheme brings greater efficiency by limiting self-attention computation to non-overlapping local windows while also allowing for cross-window connection. This hierarchical architecture has the flexibility to model at various scales and has linear computational complexity with respect to image size. These qualities of Swin Transformer make it compatible with a broad range of vision tasks, including image classification (87.3 top-1 accuracy on ImageNet-1K) and dense prediction tasks such as object detection (58.7 box AP and 51.1 mask AP on COCO test-dev) and semantic segmentation (53.5 mIoU on ADE20K val). Its performance surpasses the previous state-of-the-art by a large margin of +2.7 box AP and +2.6 mask AP on COCO, and +3.2 mIoU on ADE20K, demonstrating the potential of Transformer-based models as vision backbones. The hierarchical design and the shifted window approach also prove beneficial for all-MLP architectures. The code and models are publicly available at~\url{https://github.com/microsoft/Swin-Transformer}.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。