Skip to main content
QUICK REVIEW

[Paper Review] Rethinking Transformer-based Set Prediction for Object Detection

Zhiqing Sun, Shengcao Cao|arXiv (Cornell University)|Nov 21, 2020
Advanced Neural Network ApplicationsComputer Science8 citations
TL;DR

This paper proposes TSP-FCOS and TSP-RCNN, two improved Transformer-based set prediction models for object detection that accelerate training convergence and boost accuracy by addressing key limitations in DETR, such as unstable Hungarian loss and inefficient cross-attention. The models achieve state-of-the-art COCO AP scores with significantly faster convergence—reducing training time from 500 epochs to under 50 epochs—while outperforming DETR, FCOS, and Faster R-CNN in detection accuracy.

ABSTRACT

DETR is a recently proposed Transformer-based method which views object detection as a set prediction problem and achieves state-of-the-art performance but demands extra-long training time to converge. In this paper, we investigate the causes of the optimization difficulty in the training of DETR. Our examinations reveal several factors contributing to the slow convergence of DETR, primarily the issues with the Hungarian loss and the Transformer cross-attention mechanism. To overcome these issues we propose two solutions, namely, TSP-FCOS (Transformer-based Set Prediction with FCOS) and TSP-RCNN (Transformer-based Set Prediction with RCNN). Experimental results show that the proposed methods not only converge much faster than the original DETR, but also significantly outperform DETR and other baselines in terms of detection accuracy.

Motivation & Objective

  • To investigate the root causes of slow convergence in DETR, a state-of-the-art end-to-end Transformer-based object detector.
  • To address optimization difficulties stemming from the Hungarian loss and the cross-attention mechanism in DETR.
  • To develop faster, more accurate set prediction models based on Transformer architecture that eliminate post-processing steps.
  • To improve detection performance, especially for small objects, while reducing training time compared to DETR.
  • To validate the effectiveness of the proposed models on the COCO 2017 benchmark with single-model, single-scale evaluation.

Proposed method

  • Propose TSP-FCOS and TSP-RCNN as improved variants of encoder-only DETR with feature pyramids, inspired by FCOS and Faster R-CNN architectures.
  • Introduce a novel Feature of Interest (FoI) selection mechanism in TSP-FCOS to enhance multi-level feature handling in the Transformer encoder.
  • Design a new bipartite matching scheme to stabilize the Hungarian loss and accelerate training convergence.
  • Use a 36-epoch (3×) training schedule without random crop augmentation for ablation and convergence analysis.
  • Apply the same 96-epoch (8×) schedule with random crop as in DETR for comparison with state-of-the-art models.
  • Integrate deformable convolutions with the TSP framework to evaluate compatibility and performance gains.
Figure 1: AP results on COCO validation set: original DETR v.s. matching distilled DETR. We can see that matching distillation accelerates the training of DETR in the first few epochs.
Figure 1: AP results on COCO validation set: original DETR v.s. matching distilled DETR. We can see that matching distillation accelerates the training of DETR in the first few epochs.

Experimental results

Research questions

  • RQ1What causes the slow convergence of DETR during training, particularly in terms of loss and attention mechanisms?
  • RQ2How does removing the cross-attention module in DETR affect performance, especially on small versus large objects?
  • RQ3Can a modified bipartite matching scheme stabilize training and accelerate convergence in Transformer-based set prediction?
  • RQ4To what extent can the TSP-FCOS and TSP-RCNN frameworks improve detection accuracy and training speed compared to DETR and baseline detectors?
  • RQ5How well do the TSP models generalize with deformable convolutions and different backbone architectures?

Key findings

  • TSP-RCNN achieves state-of-the-art AP of 51.9 on COCO 2017 with ResNet-101-DCN, outperforming DETR-DC5 and other baselines.
  • TSP-FCOS and TSP-RCNN converge in under 50 epochs, significantly faster than DETR’s 500 epochs, while achieving higher accuracy.
  • TSP-RCNN achieves 47.4 AP with ResNet-101-DCN, surpassing Faster R-CNN+ and Deformable DETR under the same training schedule.
  • The ablation study confirms that set prediction loss contributes more than positional encoding to performance gains in TSP-RCNN.
  • TSP-RCNN+ achieves 51.9 AP with ResNet-101-DCN, demonstrating strong performance even with a shorter training schedule.
  • The proposed models show strong compatibility with deformable convolutions, further improving performance when combined.
Figure 2: Sparsity (negative entropy) of Transformer cross-attention in each layer, obtained by evaluation on the COCO validation data. Different line styles represent different layers. We can see that the sparsity consistently increases, especially for the $1^{st}$ cross-attention layer between enc
Figure 2: Sparsity (negative entropy) of Transformer cross-attention in each layer, obtained by evaluation on the COCO validation data. Different line styles represent different layers. We can see that the sparsity consistently increases, especially for the $1^{st}$ cross-attention layer between enc

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.