Efficient Decoder-Free Object Detection with Transformers

Peixian Chen, Mengdan Zhang, Yunhang Shen, Kekai Sheng, Yuting Gao, Xing Sun, Ke Li, Chunhua Shen

Introduction

In recent years, Vision Transformers (ViTs) have established themselves as the state-of-the-art for a variety of computer vision tasks. However, their adoption in real-time object detection has been hindered by two significant challenges: high computational overhead and exceptionally slow training convergence. The DEtection TRansformer (DETR) family of models successfully eliminated the need for many hand-designed components, such as non-maximum suppression (NMS), but introduced a complex decoder mechanism that often requires hundreds of epochs to train effectively.

This paper introduces DFFT (Decoder-Free Fully Transformer-based), a novel architecture that challenges the necessity of the Transformer decoder. By simplifying the detection pipeline into an encoder-only, single-level prediction task, DFFT achieves superior accuracy compared to traditional models while significantly reducing computational costs and training time.

Rethinking the Detection Pipeline

Traditional object detectors often rely on a "Feature Pyramid Network" (FPN) to handle objects at multiple scales, while Transformer-based models like DETR use a sequence of decoder layers to refine object queries. DFFT departs from both conventions by utilizing a streamlined, three-part architecture designed for maximum efficiency.

1. Detection-Oriented Transformer (DOT) Backbone

The DOT backbone is a lightweight feature extractor designed specifically for the nuances of detection. Unlike standard ViTs that focus primarily on global context, DOT employs a hybrid attention mechanism. It combines local spatial-wise attention to maintain computational efficiency with global channel-wise attention to capture broader context. A critical innovation here is the Semantic-Augmented Attention (SAA) module, which facilitates the flow of semantic information across different scales. This ensures that as the network grows deeper, crucial low-level details—necessary for detecting small objects—are preserved rather than lost.

2. Scale-Aggregated Encoder (SAE)

While most modern detectors predict objects across multiple feature levels to account for size variance, DFFT simplifies this process. The Scale-Aggregated Encoder (SAE) is designed to squash multi-scale features into a single, high-quality feature map. By intelligently aggregating these scales, the model can perform predictions on a single level without sacrificing the ability to detect objects of varying sizes. This reduction in the number of "anchors" or prediction points drastically lowers the computational burden during the final inference stage.

3. Task-Aligned Encoder (TAE)

Object detection requires the model to perform two distinct tasks: classification (identifying the object) and regression (drawing the bounding box). These tasks often have conflicting requirements for feature representation. The Task-Aligned Encoder (TAE) addresses this using group channel-wise attention. This allows the model to process both tasks within a single head without interference, ensuring that the final predictions are "aligned"—meaning the bounding box with the highest spatial accuracy also receives the highest confidence score from the classifier.

Experimental Results

The DFFT model was evaluated on the industry-standard MS COCO benchmark, which contains approximately 160,000 images across 80 categories. The results demonstrate a significant leap in the efficiency-to-performance trade-off:

  • Superior Accuracy: DFFT-Medium achieved a 3.7% higher Average Precision (AP) than the standard DETR model.
  • Rapid Convergence: One of the most striking findings is that DFFT reaches competitive accuracy in just 12 to 36 epochs. In comparison, previous Transformer-based models often required between 50 and 500 epochs to converge, making DFFT over 10x faster to train.
  • Computational Efficiency: When compared to traditional anchor-based detectors like RetinaNet, DFFT-Small provides a 5.5% AP gain while reducing computational costs (GFLOPs) by 70%. Additionally, DFFT-Medium is 22% faster during inference than its DETR counterparts.

Conclusion and Future Work

DFFT proves that the training-inefficient decoder found in many Transformer-based detectors is optional rather than a requirement for high performance. By focusing on a well-designed encoder-only setup and intelligent scale aggregation, DFFT provides a blueprint for high-precision, resource-efficient computer vision.

While the model shows massive improvements in GFLOPs, the authors acknowledge that theoretical computational savings do not always translate linearly to frames-per-second (FPS) across all hardware types. Future research will focus on optimizing the architecture for specific hardware backends and exploring the application of this decoder-free approach to more complex tasks, such as instance segmentation and dense scene understanding.

Summary updated

BibTeX
@inproceedings{chen2022efficient,
  author = {Peixian Chen and Mengdan Zhang and Yunhang Shen and Kekai Sheng and Yuting Gao and Xing Sun and Ke Li and Chunhua Shen},
  title = {{Efficient Decoder-Free Object Detection with Transformers}},
  booktitle = {European Conference on Computer Vision},
  year = {2022},
  doi = {10.1007/978-3-031-20080-9\_5},
}
Figure