English

DMFormer: Closing the Gap Between CNN and Vision Transformers

Computer Vision and Pattern Recognition 2022-11-30 v3 Artificial Intelligence Machine Learning

Abstract

Vision transformers have shown excellent performance in computer vision tasks. As the computation cost of their self-attention mechanism is expensive, recent works tried to replace the self-attention mechanism in vision transformers with convolutional operations, which is more efficient with built-in inductive bias. However, these efforts either ignore multi-level features or lack dynamic prosperity, leading to sub-optimal performance. In this paper, we propose a Dynamic Multi-level Attention mechanism (DMA), which captures different patterns of input images by multiple kernel sizes and enables input-adaptive weights with a gating mechanism. Based on DMA, we present an efficient backbone network named DMFormer. DMFormer adopts the overall architecture of vision transformers, while replacing the self-attention mechanism with our proposed DMA. Extensive experimental results on ImageNet-1K and ADE20K datasets demonstrated that DMFormer achieves state-of-the-art performance, which outperforms similar-sized vision transformers(ViTs) and convolutional neural networks (CNNs).

Keywords

Cite

@article{arxiv.2209.07738,
  title  = {DMFormer: Closing the Gap Between CNN and Vision Transformers},
  author = {Zimian Wei and Hengyue Pan and Lujun Li and Menglong Lu and Xin Niu and Peijie Dong and Dongsheng Li},
  journal= {arXiv preprint arXiv:2209.07738},
  year   = {2022}
}
R2 v1 2026-06-28T01:25:16.809Z