Fast Convergence of DETR with Spatially Modulated Co-Attention

Peng Gao, Minghang Zheng, Xiaogang Wang, Jifeng Dai, Hongsheng Li
1/19/2021
422 citations
cs.CV
transformer-attention

Official code: gaopengcuhk/SMCA-DETR (169 stars, Python, last commit 2021-10-14).

Abstract

The recently proposed Detection Transformer (DETR) model successfully applies Transformer to objects detection and achieves comparable performance with two-stage object detection frameworks, such as Faster-RCNN. However, DETR suffers from its slow convergence.

Show full abstract

Training DETR \cite{carion2020end} from scratch needs 500 epochs to achieve a high accuracy. To accelerate its convergence, we propose a simple yet effective scheme for improving the DETR framework, namely Spatially Modulated Co-Attention (SMCA) mechanism. The core idea of SMCA is to conduct regression-aware co-attention in DETR by constraining co-attention responses to be high near initially estimated bounding box locations. Our proposed SMCA increases DETR's convergence speed by replacing the original co-attention mechanism in the decoder while keeping other operations in DETR unchanged. Furthermore, by integrating multi-head and scale-selection attention designs into SMCA, our fully-fledged SMCA can achieve better performance compared to DETR with a dilated convolution-based backbone (45.6 mAP at 108 epochs vs. 43.3 mAP at 500 epochs). We perform extensive ablation studies on COCO dataset to validate the effectiveness of the proposed SMCA.

View on arXivView PDF

Code Implementations(1)

16923Python, CudaAug 4, 20215 years ago

Similar Papers

Cite this paper

@article{gao2021fast,
  title  = {Fast Convergence of DETR with Spatially Modulated Co-Attention},
  author = {Peng Gao and Minghang Zheng and Xiaogang Wang and Jifeng Dai and Hongsheng Li},
  year   = {2021},
  eprint = {2101.07448},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2101.07448}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2101.07448.svg)](https://codeofpaper.com/paper/2101.07448)

Discussion