Abstract
Domain generalization (DG) for object detection aims to enhance detectors' performance in unseen scenarios. This task remains challenging due to complex variations in real-world applications. Recently, diffusion models have demonstrated remarkable capabilities in diverse scene generation, which inspires us to explore their potential for improving DG tasks. Instead of generating images, our method extracts multi-step intermediate features during the diffusion process to obtain domain-invariant features for generalized detection. Furthermore, we propose an efficient knowledge transfer framework that enables detectors to inherit the generalization capabilities of diffusion models through feature and object-level alignment, without increasing inference time. We conduct extensive experiments on six challenging DG benchmarks. The results demonstrate that our method achieves substantial improvements of 14.0% mAP over existing DG approaches across different domains and corruption types. Notably, our method even outperforms most domain adaptation methods without accessing any target domain data. Moreover, the diffusion-guided detectors show consistent improvements of 15.9% mAP on average compared to the baseline. Our work aims to present an effective approach for domain-generalized detection and provide potential insights for robust visual recognition in real-world scenarios.
Introduction
Object detection models are notoriously brittle when faced with "domain shift." A model trained on sunny California highways often fails when deployed in a rainy London alleyway or a snowy mountain pass. This challenge, known as Domain Generalization (DG), involves training a model on a "source" domain so that it performs well on "target" domains it has never encountered during training.
While existing methods use data augmentation or adversarial training to bridge this gap, they often struggle with complex real-world variations. Meanwhile, Diffusion Models (DMs) have shown an incredible ability to understand and represent diverse scenes through their iterative denoising process. The Generalized Diffusion Detector leverages this "visual wisdom" inside diffusion models to make object detectors significantly more robust.
Methodology: Mining Robust Features
The authors propose a two-stage approach to "mine" robust features from diffusion models and integrate them into a practical detection pipeline.
1. The Diffusion-Based Detector ($F_{diff}$)
Instead of using a diffusion model to generate images, the authors use it as a powerful feature extractor. By taking an input image, adding a small amount of noise, and passing it through a frozen diffusion U-Net, they extract features from multiple "timesteps" of the diffusion process. Because diffusion models are trained to recover structure from noise, these features are naturally domain-invariant—they focus on the essential structure of objects rather than domain-specific lighting, weather, or textures.
2. Knowledge Transfer Framework
Diffusion models are computationally expensive and slow for real-time inference. To make the approach practical, the authors utilize a Teacher-Student distillation setup. The diffusion-based detector acts as a "Teacher," while a standard, lightweight detector (such as Faster R-CNN with a ResNet backbone) acts as the "Student."
The student is trained to inherit the teacher's robustness through two primary mechanisms:
- Feature-level Alignment: The student is trained to mimic the intermediate feature maps of the diffusion teacher.
- Object-level Alignment: Both models evaluate the same Region Proposals. The student is penalized if its classification or bounding box coordinates deviate from the teacher’s robust predictions.
Experimental Evaluation
The researchers tested their method on six challenging benchmarks encompassing 13 different datasets, covering cross-camera shifts, adverse weather (fog, rain), synthetic-to-real transitions, and real-to-artistic shifts (clipart, comics, watercolors).
Key Results
- Massive mAP Gains: The method achieved an average improvement of 14.0% mAP over existing state-of-the-art DG approaches. Compared to a standard Faster R-CNN baseline, the diffusion-guided version improved performance by 15.9% mAP on average.
- Beating Domain Adaptation: Remarkably, this generalization method often outperformed "Domain Adaptation" methods that actually have access to unlabeled target data during training.
- Zero Inference Overhead: By using distillation, the final model used in production is a standard detector. It inherits the robustness of the diffusion model without the computational slowness.
- Robustness to Corruption: On the Cityscapes-C benchmark, the model showed significantly higher resilience to 15 types of image corruptions, including blur and digital noise, compared to previous methods.
Conclusion
The Generalized Diffusion Detector demonstrates that the denoising mechanism in diffusion models acts as a powerful regularizer for object detection. By forcing the model to "see through" noise, it learns to prioritize domain-invariant shapes over domain-specific styles. This work provides a scalable path for creating robust vision systems that can handle the unpredictability of real-world environments without sacrificing inference speed.
Summary updated