Improving Transferability for Domain Adaptive Detection Transformers

Kaixiong Gong, Shuang Li, Shugang Li, Rui Zhang, Chi Harold Liu, Qiang Chen · DOI

Introduction

Object detection has undergone a significant paradigm shift with the advent of DEtection TRansformer (DETR) architectures. While these models achieve remarkable performance on standard benchmarks, their efficacy often diminishes when deployed in real-world scenarios characterized by "domain shift"—variations in weather, lighting, or geographic location. Domain Adaptive Object Detection (DAOD) seeks to mitigate this performance drop by aligning a model trained on a labeled "source" domain (e.g., sunny weather) with an unlabeled "target" domain (e.g., foggy weather).

Traditional DAOD research has primarily focused on convolutional neural networks (CNNs), such as Faster R-CNN. Early attempts to adapt DETR-style detectors often resorted to exhaustive alignment across all transformer layers, including the encoder and decoder. However, this "heavy-handed" approach is computationally intensive and can inadvertently distort the delicate spatial representations necessary for precise bounding box regression. This paper introduces $O^2net$, a streamlined framework that strategically aligns features at the backbone and decoder levels to achieve state-of-the-art transferability.

The $O^2net$ Framework

The researchers identify two critical questions for transformer-based DAOD: where to align and how to align. $O^2net$ addresses these through two specialized modules designed for the backbone and the decoder, respectively.

Object-Aware Alignment (OAA)

Standard alignment techniques often attempt to match global image statistics between domains. However, in driving scenarios, background elements (like road textures or sky) vary significantly more than the objects of interest (like cars or pedestrians). $O^2net$ employs Object-Aware Alignment (OAA) within the CNN backbone.

OAA utilizes class-agnostic pseudo-labels—initial predictions generated by the model on the target data—to identify potential foreground regions. By focusing the alignment process on these regions, the backbone learns to extract domain-invariant features for objects while ignoring distracting background shifts. This targeted approach provides a cleaner signal for adaptation compared to global alignment.

Optimal Transport based Alignment (OTA)

In the decoder stage, traditional adversarial training—where a discriminator tries to distinguish between source and target features—can be unstable. Such methods often fail to preserve the geometric and positional information that transformers rely on for detection.

To solve this, $O^2net$ introduces Optimal Transport based Alignment (OTA). Using Sliced Wasserstein Distance (SWD), the framework treats feature distributions as a transportation problem. It minimizes the mathematical "cost" of transforming the source distribution into the target distribution. This method closes the domain gap while respecting the intrinsic spatial structure of the data, ensuring that the decoder's ability to localize objects remains intact.

Strategic Alignment: The "Where" Matters

A key insight of this research is that aligning every layer of the transformer is counterproductive. The authors demonstrate that the CNN backbone provides the foundational feature extraction, while the decoder produces the final task-specific output. By focusing adaptation efforts on these two "poles" of the architecture, $O^2net$ avoids the computational overhead of aligning intermediate encoder layers without sacrificing accuracy. This makes the model more efficient and less prone to feature distortion.

Experimental Evaluation

The $O^2net$ framework was evaluated across three challenging domain adaptation scenarios:

  • Weather Adaptation (Cityscapes $\to$ Foggy Cityscapes): $O^2net$ achieved 46.8 mAP, significantly outperforming the previous state-of-the-art (41.3 mAP).
  • Synthetic to Real (Sim10k $\to$ Cityscapes): The model reached 54.1 car AP, a notable improvement over the source-only baseline (47.4) and existing transformer-based competitors (52.6).
  • Scene Adaptation (Cityscapes $\to$ BDD100k): The method proved robust across diverse real-world driving environments.

Qualitative analysis via t-SNE visualizations confirmed that $O^2net$ successfully clusters source and target features in the latent space, effectively bridging the gap that causes source-only models to fail.

Conclusion

$O^2net$ represents a significant step forward in making transformer-based detectors viable for real-world deployment. By combining object-aware backbone alignment with geometry-preserving optimal transport in the decoder, the framework achieves superior transferability with greater efficiency than previous methods. While the approach remains dependent on the quality of initial pseudo-labels, its ability to maintain spatial integrity during adaptation sets a new standard for Domain Adaptive Object Detection.

Summary updated

BibTeX
@inproceedings{gong2022improving,
  author = {Kaixiong Gong and Shuang Li and Shugang Li and Rui Zhang and Chi Harold Liu and Qiang Chen},
  title = {{Improving Transferability for Domain Adaptive Detection Transformers}},
  booktitle = {ACM Multimedia},
  year = {2022},
  doi = {10.1145/3503161.3548246},
}
Figure