CrossViT: Cross-Attention Multi-Scale Vision Transformer for Image Classification

CrossViT: мультишкальный визуальный трансформер с перекрёстным вниманием для классификации изображений
Rameswar Panda, Chun-Fu Richard Chen, Quanfu Fan
2021-10-01

CrossViTImageNet1Kcross-attention token fusiondual-branch transformermulti-scale vision transformer
The recently developed vision transformer (ViT) has achieved promising results on image classification compared to convolutional neural networks. Inspired by this, in this paper, we study how to learn multi-scale feature representations in transformer models for image classification. To this end, we propose a dual-branch transformer to com-bine image patches (i.e., tokens in a transformer) of different sizes to produce stronger image features. Our approach processes small-patch and large-patch tokens with two separate branches of different computational complexity and these tokens are then fused purely by attention multiple times to complement each other. Furthermore, to reduce computation, we develop a simple yet effective token fusion module based on cross attention, which uses a single token for each branch as a query to exchange information with other branches. Our proposed cross-attention only requires linear time for both computational and memory complexity instead of quadratic time otherwise. Extensive experiments demonstrate that our approach performs better than or on par with several concurrent works on vision transformer, in addition to efficient CNN models. For example, on the ImageNet1K dataset, with some architectural changes, our approach outperforms the recent DeiT by a large margin of 2% with a small to moderate increase in FLOPs and model parameters. Our source codes and models are available at https://github.com/IBM/CrossViT.
1
Branches are fused multiple times purely by attention, allowing tokens of different sizes to complement each other.
2
Extensive experiments show CrossViT matches or surpasses several concurrent vision transformer works and efficient CNN models.
3
Introduced a token fusion module based on cross-attention using a single token per branch as query, reducing computation
4
On ImageNet1K, with architectural changes CrossViT outperforms DeiT by ~2% accuracy with only a small to moderate increase in FLOPs and parameters.
5
Proposed CrossViT: a dual-branch transformer that processes small-patch and large-patch tokens separately to learn multi-scale image features.
6
The cross-attention fusion requires linear time for both computational and memory complexity instead of quadratic time.

CrossViT dual-branch multi-scale vision transformer model for image classification

Learning and fusing multi-scale (small-patch and large-patch token) feature representations via cross-attention token fusion to improve image classification performance and efficiency (linear time/memory cross-attention)

Publication Details
Publication Date
2021-10-01
Journal
Publisher
ISSN
Cited by
2053
Access Type
Author Information
Authors
Rameswar Panda
Chun-Fu Richard Chen
Quanfu Fan
Explore further
Open the scid.ai AI chat with a ready-made request: it will find papers on a similar topic and help build a literature review.
Find similar papers in the chat →
Make a presentation
100%