Towards Data-Efficient Detection Transformers

Wen Wang, Jing Zhang, Yang Cao, Yongliang Shen, Dacheng Tao

Abstract

Detection Transformers (DETRs) have revolutionized object detection by removing the need for hand-crafted components like anchors and Non-Maximum Suppression (NMS). However, they are notoriously "data-hungry," performing poorly on small datasets compared to traditional CNN-based detectors. This paper identifies sparse feature sampling as the missing link for data efficiency and introduces a simple label augmentation strategy to provide richer supervision, allowing DETR-style models to excel even with limited training data.

The Data-Hungry Nature of DETRs

While DETRs perform brilliantly on massive datasets like COCO (118k images), their performance craters on smaller datasets like Cityscapes (3k images). For instance, on Cityscapes, a standard DETR achieves less than half the accuracy of a Faster R-CNN. This performance gap makes DETRs impractical for many real-world applications where labeled data is scarce or expensive to obtain.

Figure 1: Comparison of model performance on COCO 2017 vs. Cityscapes, highlighting the significant performance drop for DETR-based models on smaller datasets.

Methods: Bridging the Gap

The authors conducted a "diagnostic" experiment, performing a step-by-step transformation from a data-efficient detector (Sparse R-CNN) to a data-hungry one (DETR). They found that the most critical factor for data efficiency is Sparse Feature Sampling.

Figure 2: Ablation study showing the performance impact of transforming Sparse R-CNN (SRCN) into a DETR-like architecture.

Based on these findings, they propose two main improvements:

  1. Sparse Feature Sampling (DE-DETR): Standard DETRs use "global" cross-attention, which is difficult to learn with limited data. The authors modify the decoder so that each query only samples features from a local region (using RoIAlign) based on the bounding box predicted by the previous layer. This introduces a "spatial prior" that helps the model focus on objects faster.
  2. Label Augmentation (DELA-DETR): DETRs typically use one-to-one bipartite matching, providing a sparse supervisory signal. The authors propose repeating ground-truth labels during training (matching each object to multiple queries) to provide a denser signal, helping the model learn more effectively from fewer images.

Experimental Results

The authors evaluated their methods on benchmarks specifically chosen to test data efficiency, including Cityscapes and sub-sampled COCO 2017 (1%, 2%, 5%, and 10% subsets).

  • Cityscapes Performance: The baseline DETR scored a meager 11.5 AP. Their improved version (DELA-DETR) jumped to 24.5 AP. When applied to the more modern CondDETR, they reached 29.5 AP, surpassing the heavy-duty Deformable DETR.
  • Low-Data COCO: On 1% COCO (~1,180 images), the method significantly outperformed the baseline, demonstrating meaningful detection capabilities with a tiny fraction of the usual data.
  • Convergence and Scaling: Even on the full COCO dataset, the method provided a boost. DELA-DETR improved the standard DETR from 33.6 to 41.9 AP (when trained for 50 epochs), proving that these data-efficient techniques also accelerate convergence.

Key Insights

  • Inductive Bias is Essential: CNNs have a built-in "locality" bias. Transformers lack this and must learn it, requiring massive data. By forcing sparse local sampling, the authors re-introduce this vital inductive bias.
  • Efficiency of Sparsity: Sparse sampling allows the model to use multi-scale features without the quadratic computational cost of global attention.
  • Rethinking One-to-One Matching: While one-to-one matching removes the need for NMS, it is a weak signal for data-starved models. Label augmentation acts as a bridge, providing dense supervision while maintaining architectural simplicity.

Limitations and Future Work

Because label augmentation matches multiple queries to the same object, the model may produce duplicate detections, requiring a small NMS step at the end. This slightly deviates from the "pure" end-to-end DETR philosophy. Additionally, this study focuses primarily on the transformer decoder; the encoder still uses standard attention, which remains a target for future optimization.

Summary updated

BibTeX
@inproceedings{wang2022towards,
  author = {Wen Wang and Jing Zhang and Yang Cao and Yongliang Shen and Dacheng Tao},
  title = {{Towards Data-Efficient Detection Transformers}},
  booktitle = {European Conference on Computer Vision},
  year = {2022},
  doi = {10.1007/978-3-031-20077-9\_6},
}
Figure