CVMar 27, 2021

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

arXiv:2103.14899v22107 citationsHas Code
AI Analysis

This work addresses the challenge of multi-scale feature extraction in vision transformers for image classification, offering an incremental improvement over existing methods.

The authors tackled the problem of learning multi-scale feature representations in vision transformers for image classification by proposing a dual-branch transformer that fuses tokens of different sizes using cross-attention, achieving a 2% improvement over DeiT on ImageNet1K with moderate increases in FLOPs and parameters.

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 combine 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 \url{https://github.com/IBM/CrossViT}.

Code Implementations15 repos

Data from Papers with Code (CC-BY-SA-4.0)

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes