Skip to main content
QUICK REVIEW

[Paper Review] Conditional DETR V2: Efficient Detection Transformer with Box Queries

Xiaokang Chen, Fangyun Wei|arXiv (Cornell University)|Jul 18, 2022
Advanced Neural Network ApplicationsComputer Science17 citations
TL;DR

This paper proposes Conditional DETR V2, an efficient object detection transformer that reformulates object queries as learnable box queries—comprising reference point embeddings and image-dependent box transformations—enabling faster training convergence and improved accuracy. By integrating axial self-attention (Horizontal-Vertical Attention), it reduces memory usage by 74% and increases inference speed by 1.6×, achieving 44.8 AP at 16.4 FPS on COCO with a DC5-ResNet-50 backbone.

ABSTRACT

In this paper, we are interested in Detection Transformer (DETR), an end-to-end object detection approach based on a transformer encoder-decoder architecture without hand-crafted postprocessing, such as NMS. Inspired by Conditional DETR, an improved DETR with fast training convergence, that presented box queries (originally called spatial queries) for internal decoder layers, we reformulate the object query into the format of the box query that is a composition of the embeddings of the reference point and the transformation of the box with respect to the reference point. This reformulation indicates the connection between the object query in DETR and the anchor box that is widely studied in Faster R-CNN. Furthermore, we learn the box queries from the image content, further improving the detection quality of Conditional DETR still with fast training convergence. In addition, we adopt the idea of axial self-attention to save the memory cost and accelerate the encoder. The resulting detector, called Conditional DETR V2, achieves better results than Conditional DETR, saves the memory cost and runs more efficiently. For example, for the DC$5$-ResNet-$50$ backbone, our approach achieves $44.8$ AP with $16.4$ FPS on the COCO $val$ set and compared to Conditional DETR, it runs $1.6 imes$ faster, saves $74$\% of the overall memory cost, and improves $1.0$ AP score.

Motivation & Objective

  • To improve the efficiency and accuracy of DETR by reformulating object queries into a box query format that connects DETR with anchor-based detectors like Faster R-CNN.
  • To accelerate training convergence and inference speed by learning box queries from image content rather than fixing them as learnable parameters.
  • To reduce the memory cost and computational burden of the transformer encoder, especially for high-resolution feature maps, via a novel axial self-attention mechanism.
  • To achieve a better speed-accuracy trade-off compared to existing DETR variants, particularly on high-resolution backbones like DC5-ResNet-50.

Proposed method

  • Reformulates the object query in DETR as a box query composed of the embedding of a reference point and a predicted transformation vector that encodes box scale and offset relative to the reference point.
  • Learns the reference points from image features by predicting objectness scores across the feature map and selecting top-scoring points as reference locations.
  • Predicts the box transformation (scale and offset) from the encoder feature at each reference point, making the query image-dependent and adaptive.
  • Introduces Horizontal-Vertical Attention (HVA), which performs self-attention independently along horizontal and vertical axes to reduce memory and computation in the encoder.
  • Uses the same cross-attention formulation for all decoder layers, including the first, by incorporating image-dependent reference point embeddings and transformations.
  • Applies sinusoidal positional encoding to reference points to preserve spatial inductive bias in the box query representation.

Experimental results

Research questions

  • RQ1Can reformulating object queries as box queries improve detection performance and training efficiency in DETR?
  • RQ2Does learning box queries from image content instead of using fixed learnable parameters enhance localization accuracy and generalization?
  • RQ3Can axial self-attention effectively reduce memory and computation costs in the transformer encoder without sacrificing performance?
  • RQ4How does the proposed method compare to existing DETR variants in terms of speed, accuracy, and memory efficiency on standard benchmarks?

Key findings

  • Conditional DETR V2 achieves 44.8 AP on COCO val with a DC5-ResNet-50 backbone, matching the performance of Conditional DETR but with significantly improved efficiency.
  • The model runs 1.6× faster than Conditional DETR, achieving 16.4 FPS compared to 10 FPS on the same backbone.
  • Memory usage is reduced by 74% compared to Conditional DETR, dropping from 18,631M to 4,844M for the DC5-ResNet-50 backbone.
  • The Horizontal-Vertical Attention mechanism reduces memory cost by 74% and accelerates inference by 60% on high-resolution features, especially benefiting DC5 backbones.
  • The method achieves the best speed-accuracy trade-off among all compared DETR variants, outperforming Anchor DETR (44.2 AP at 16 FPS) with higher accuracy and better efficiency.
  • Visualization confirms that reference points are predominantly located within object regions, indicating effective localization through image-dependent query learning.

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.