AdaMixer: A Fast-Converging Query-Based Object Detector

Ziteng Gao, Limin Wang, Bing Han, Sheng GuoCVPR 2022

Abstract

Traditional object detectors employ the dense paradigm of scanning over locations and scales in an image. The recent query-based object detectors break this convention by decoding image features with a set of learnable queries. However, this paradigm still suffers from slow convergence, limited performance, and design complexity of extra networks between backbone and decoder. In this paper, we find that the key to these issues is the adaptability of decoders for casting queries to varying objects. Accordingly, we propose a fast-converging query-based detector, named AdaMixer, by improving the adaptability of query-based decoding processes in two aspects. First, each query adaptively samples features over space and scales based on estimated offsets, which allows AdaMixer to efficiently attend to the coherent regions of objects. Then, we dynamically decode these sampled features with an adaptive MLP-Mixer under the guidance of each query. Thanks to these two critical designs, AdaMixer enjoys architectural simplicity without requiring dense attentional encoders or explicit pyramid networks. On the challenging MS COCO benchmark, AdaMixer with ResNet-50 as the backbone, with 12 training epochs, reaches up to 45.0 AP on the validation set along with 27.9 APs in detecting small objects. With the longer training scheme, AdaMixer with ResNeXt-101-DCN and Swin-S reaches 49.5 and 51.3 AP. Our work sheds light on a simple, accurate, and fast converging architecture for query-based object detectors.

Introduction

Object detection has traditionally relied on a "dense" paradigm, where models scan thousands of predefined locations and scales—known as anchors—across an image. Recently, query-based detectors like DETR (DEtection TRansformer) shifted this toward a "sparse" paradigm, utilizing a small set of learnable "queries" to represent potential objects. While this approach simplifies the detection pipeline by removing hand-crafted components like Non-Maximum Suppression (NMS), it introduces new challenges.

Query-based models often suffer from slow convergence, frequently requiring hundreds of training epochs to learn where to attend within an image. Furthermore, they typically rely on complex "neck" components, such as Feature Pyramid Networks (FPNs) or dense Transformer encoders, to bridge the gap between the backbone and the decoder. AdaMixer addresses these issues by enhancing the adaptability of the decoder, allowing for a simpler, faster-converging architecture.

Methodology

AdaMixer simplifies the detection pipeline by concentrating the model's intelligence within an adaptive decoder. This design eliminates the need for heavy encoders or explicit pyramid networks. The architecture is built upon three primary innovations:

Adaptive 3D Feature Sampling

Instead of merging different feature scales through a traditional FPN, AdaMixer treats multi-scale features as a continuous 3D volume, where the $x$ and $y$ axes represent spatial dimensions and the $z$-axis represents the scale. Each query adaptively calculates offsets to sample points from this 3D space. This mechanism allows the model to perform bilinear interpolation between scales, effectively "zooming in" or "zooming out" to find the optimal representation for an object regardless of its size.

Adaptive Content Decoding (Adaptive Mixing)

Once features are sampled, they are processed by an adaptive MLP-Mixer. Unlike standard MLPs that use fixed weights, AdaMixer uses the query itself to generate the weights for the MLP dynamically. This "Adaptive Mixing" ensures that the processing logic is customized to the specific object the query is targeting. By allowing the query to guide the transformation of sampled features, the model effectively bridges the semantic gap between different object categories.

Position-aware Self-Attention

To improve communication between queries and reduce redundant detections, AdaMixer incorporates a geometric bias into the self-attention mechanism. By utilizing "Intersection over Foreground" (IoF) metrics, the model helps queries understand their spatial relationships and overlaps. This allows the architecture to naturally suppress duplicate detections, further simplifying the post-processing requirements.

Experimental Results

The performance of AdaMixer was evaluated on the MS COCO 2017 benchmark, using the trainval35k subset for training and the minival subset for validation.

Convergence and Accuracy

AdaMixer demonstrates remarkable convergence speed. Using a ResNet-50 backbone, the model achieves 42.7 AP in just 12 epochs (the standard 1x schedule). For comparison, the original DETR required 500 epochs to reach similar performance levels. When the training schedule is extended to 36 epochs, AdaMixer reaches 47.0 AP with ResNet-50 and up to 51.3 AP when paired with a Swin-S backbone.

Small Object Detection

The adaptive 3D sampling proves particularly effective for small objects. On the 1x training schedule, AdaMixer achieves 27.9 $AP_s$, significantly outperforming other query-based competitors like Sparse R-CNN, which reaches 20.7 $AP_s$ under similar conditions.

Efficiency

Despite its high performance, AdaMixer remains computationally efficient. The ResNet-50 version requires only 132 GFLOPs. However, the authors note that the parameter count is relatively high due to the linear layers required to generate dynamic weights for the Adaptive Mixing stage.

Conclusion

AdaMixer represents a significant step forward for query-based object detection. By replacing complex neck architectures with a highly adaptive decoder, it achieves state-of-the-art performance with significantly faster convergence. Future research will focus on optimizing the parameter efficiency of the dynamic weight generation process to make the model more suitable for deployment on resource-constrained edge devices.

Summary updated

BibTeX
@inproceedings{gao2022adamixer,
  author = {Ziteng Gao and Limin Wang and Bing Han and Sheng Guo},
  title = {{AdaMixer: A Fast-Converging Query-Based Object Detector}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2022},
  url = {https://openreview.net/forum?id=C__MJJdfhvW},
}
Figure