TL;DR
This paper introduces D$^2$ETR, a novel decoder-only object detection architecture that significantly reduces computational cost while maintaining high accuracy. By integrating a computationally efficient cross-scale attention module into the backbone, D$^2$ETR eliminates the need for a separate encoder, streamlining the detection pipeline and achieving competitive results on the COCO benchmark.
What Problem Does This Paper Address?
Modern object detectors, particularly those based on the DETR (DEtection TRansformer) framework, have achieved impressive end-to-end performance without relying on traditional post-processing steps like Non-Maximum Suppression (NMS). However, DETR and its variants suffer from high computational complexity and slow convergence, largely due to their sophisticated encoder-decoder Transformer architecture. While many works have attempted to improve efficiency and accuracy, the core computational burden of the encoder remains a significant bottleneck. This paper aims to address this by proposing a decoder-only approach that leverages the backbone to perform feature fusion and interaction, thereby removing the need for a computationally expensive encoder.
Methods
The core innovation of D$^2$ETR is its decoder-only architecture and the Computationally Efficient Cross-Scale Attention (CECA) module.
- Decoder-Only Architecture: Instead of the traditional encoder-decoder structure, D$^2$ETR uses a Transformer backbone that directly outputs fine-fused feature maps. These features are then fed directly to a Transformer decoder for object prediction. This eliminates the need for a separate encoder, which is identified as a major source of computational overhead.
- Computationally Efficient Cross-Scale Attention (CECA): This novel module is integrated within the backbone. It decouples intra-scale and cross-scale feature interaction. The backbone stages generate feature maps at different scales, and CECA fuses these features by treating higher-level feature maps as queries and lower-level feature maps as keys and values. This approach allows the model to capture fine-grained visual features from lower-level scales while avoiding the computational explosion that would occur if all scales were processed densely. CECA uses a modified spatial reduction operation on key elements to further reduce computational cost.
- Auxiliary Losses: The paper also introduces two auxiliary losses:
- Token Labeling Loss: This loss encourages the model to perform patch-wise classification, improving object localization and recognition capabilities of the Transformer backbone.
- Location-Aware Loss: This loss aims to alleviate the mismatch between localization quality and detection confidence by adding branches that predict the Intersection over Union (IoU) and centerness of predicted bounding boxes.
Datasets
The models were trained and evaluated on the COCO 2017 detection dataset. No new benchmarks were introduced.
Key Insights and Ideas
- Encoder is a Bottleneck: The paper strongly suggests that the encoder in DETR-like architectures, while contributing to performance, is disproportionately computationally expensive. Removing it is a viable path to significant efficiency gains.
- Backbone as Feature Integrator: By integrating the CECA module into the backbone, the authors demonstrate that the backbone can effectively perform feature fusion and interaction across scales, effectively taking over the role of the encoder.
- Cross-Scale Attention Strategy: The specific way CECA queries high-level features and attends to lower-level features is crucial. It allows for fine-grained localization without the prohibitive cost of dense attention on high-resolution, low-level feature maps.
- Auxiliary Losses for Refinement: The token labeling and location-aware losses provide valuable improvements, particularly in enhancing localization and aligning confidence scores with actual detection quality.
Key Results
- D$^2$ETR (with PVT2 backbone): Achieved an AP of 43.2 with a computational complexity of 82 GFLOPS, using 10x fewer training epochs than original DETR.
- Deformable D$^2$ETR (with PVT2 backbone): Achieved the highest detection accuracy of 50.0 AP with a computational complexity of 93 GFLOPS, surpassing other end-to-end detectors.
- Efficiency Gains: D$^2$ETR significantly reduces memory usage (e.g., from 1109MB to 776MB for Deformable DETR vs. Deformable D$^2$ETR) and doubles throughput compared to Deformable DETR.
- Performance vs. Complexity Trade-off: The proposed methods offer a better trade-off between accuracy and computational cost compared to existing DETR variants.
Limitations and Future Work
- Limitations:
- The paper notes that for the vanilla D$^2$ETR, the location-aware loss's centerness component is disabled because its reference points are always zero, meaning it doesn't predict relative positions.
- While token labeling improves D$^2$ETR's performance, it doesn't improve Deformable D$^2$ETR as much, suggesting that the latter's pre-existing multi-scale features already provide strong initialization.
- Future Work:
- The authors suggest that their method's design, particularly the CECA module, could inspire further exploration of backbone architectures for object detection.
- The potential for pre-training with token labeling and its benefits for downstream tasks are highlighted.
- The flexibility of CECA to cooperate with different decoders and backbones is demonstrated, implying potential for further architectural exploration.
Summary updated