CrossViT: Cross-Attention Multi-Scale Vision Transformer for Image Classification
CrossViT: мультишкальный визуальный трансформер с перекрёстным вниманием для классификации изображений
2021-10-01
SCID: 54.1/cbk5uc86
Discuss with AI
CrossViTImageNet1Kcross-attention token fusiondual-branch transformermulti-scale vision transformer
Figures from the paper
Abstract (AI)
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.
Key Findings
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.
Research Object
CrossViT dual-branch multi-scale vision transformer model for image classification
Research Subject
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
Download PDF
Subscribe to digest
References available in scid.ai13
Exploiting Generative AI to Scale up Intelligent Tutoring Systems2023
ImageNet: A large-scale hierarchical image database2009
AI-Assisted Pipeline for Dynamic Generation of Trustworthy Health Supplement Content at Scale2018
Squeeze-and-Excitation Networks2018
Learning Multiple Layers of Features from Tiny Images2024
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale2020
Aggregated Residual Transformations for Deep Neural Networks2017
Non-local Neural Networks2018
ECA-Net: Efficient Channel Attention for Deep Convolutional Neural Networks2020
Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions2021
mixup: Beyond Empirical Risk Minimization2017
Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNet2021
Transformer in Transformer2021