DN-DETR: Accelerate DETR Training by Introducing Query DeNoising

Feng Li, Hao Zhang, Shilong Liu, Jian Guo, Lionel M. Ni +1 more
3/2/2022
cs.CVcs.AI

Official code: IDEA-Research/detrex (2,300 stars, Apache-2.0, PyTorch, last commit 2025-09-11). 1 more implementation below.

Abstract

We present in this paper a novel denoising training method to speedup DETR (DEtection TRansformer) training and offer a deepened understanding of the slow convergence issue of DETR-like methods. We show that the slow convergence results from the instability of bipartite graph matching which causes inconsistent optimization goals in early training stages. To address this issue, except for the Hungarian loss, our method additionally feeds ground-truth bounding boxes with noises into Transformer decoder and trains the model to reconstruct the original boxes, which effectively reduces the bipartite graph matching difficulty and leads to a faster convergence. Our method is universal and can be easily plugged into any DETR-like methods by adding dozens of lines of code to achieve a remarkable improvement. As a result, our DN-DETR results in a remarkable improvement ($+1.9$AP) under the same setting and achieves the best result (AP $43.4$ and $48.6$ with $12$ and $50$ epochs of training respectively) among DETR-like methods with ResNet-$50$ backbone. Compared with the baseline under the same setting, DN-DETR achieves comparable performance with $50\%$ training epochs. Code is available at \url{https://github.com/FengLi-ust/DN-DETR}.

View on arXivView PDF

Code Implementations(2)

PyTorchApache-2.0

detrex is a research platform for DETR-based object detection, segmentation, pose estimation and other visual recognition tasks.

2,300247C++, CudaAug 1, 20221 years agoApache-2.0
anchor-detrconditional-detrdab-detrdeformable-detrdeta+11 more
Apache-2.0

[CVPR 2022 Oral] Official implementation of DN-DETR

60973C++, CudaMar 2, 20222 years agoApache-2.0
detrobject-detection

Similar Papers

Cite this paper

@article{li2022dndetr,
  title  = {DN-DETR: Accelerate DETR Training by Introducing Query DeNoising},
  author = {Feng Li and Hao Zhang and Shilong Liu and Jian Guo and Lionel M. Ni and Lei Zhang},
  year   = {2022},
  eprint = {2203.01305},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2203.01305}
}

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/2203.01305.svg)](https://codeofpaper.com/paper/2203.01305)

Discussion