Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

CAT: Cross Attention in Vision Transformer

About

Since Transformer has found widespread use in NLP, the potential of Transformer in CV has been realized and has inspired many new approaches. However, the computation required for replacing word tokens with image patches for Transformer after the tokenization of the image is vast(e.g., ViT), which bottlenecks model training and inference. In this paper, we propose a new attention mechanism in Transformer termed Cross Attention, which alternates attention inner the image patch instead of the whole image to capture local information and apply attention between image patches which are divided from single-channel feature maps capture global information. Both operations have less computation than standard self-attention in Transformer. By alternately applying attention inner patch and between patches, we implement cross attention to maintain the performance with lower computational cost and build a hierarchical network called Cross Attention Transformer(CAT) for other vision tasks. Our base model achieves state-of-the-arts on ImageNet-1K, and improves the performance of other methods on COCO and ADE20K, illustrating that our network has the potential to serve as general backbones. The code and models are available at \url{https://github.com/linhezheng19/CAT}.

Hezheng Lin, Xing Cheng, Xiangyu Wu, Fan Yang, Dong Shen, Zhongyuan Wang, Qing Song, Wei Yuan• 2021

Related benchmarks

TaskDatasetResultRank
Semantic segmentationADE20K (val)
mIoU43.6
2731
Object DetectionCOCO 2017 (val)--
2454
Image ClassificationImageNet (val)
Top-1 Acc82.8
1206
Instance SegmentationCOCO 2017 (val)--
1144
ClassificationMIT-BIH Arrhythmia Dataset
Accuracy94.2
13
RegressionETT Dataset
MAE0.187
7
Showing 6 of 6 rows

Other info

Follow for update