Exploring Categorical Regularization for Domain Adaptive Object Detection

Chang-Dong Xu, Xing-Ran Zhao, Xin Jin, Xiu-Shen Wei

Abstract

In this paper, we tackle the domain adaptive object detection problem, where the main challenge lies in significant domain gaps between source and target domains. Previous work seeks to plainly align image-level and instance-level shifts to eventually minimize the domain discrepancy. However, they still overlook to match crucial image regions and important instances across domains, which will strongly affect domain shift mitigation. In this work, we propose a simple but effective categorical regularization framework for alleviating this issue. It can be applied as a plug-and-play component on a series of Domain Adaptive Faster R-CNN methods which are prominent for dealing with domain adaptive detection. Specifically, by integrating an image-level multi-label classifier upon the detection backbone, we can obtain the sparse but crucial image regions corresponding to categorical information, thanks to the weakly localization ability of the classification manner. Meanwhile, at the instance level, we leverage the categorical consistency between image-level predictions (by the classifier) and instance-level predictions (by the detection head) as a regularization factor to automatically hunt for the hard aligned instances of target domains. Extensive experiments of various domain shift scenarios show that our method obtains a significant performance gain over original Domain Adaptive Faster R-CNN detectors. Furthermore, qualitative visualization and analyses can demonstrate the ability of our method for attending on the key regions/instances targeting on domain adaptation.

The Challenge of Domain Shift

Deep learning models for object detection are notoriously "brittle"—they perform well on data similar to their training set (the source domain) but struggle when deployed in new environments (the target domain) with different lighting, weather, or styles. This phenomenon, known as domain shift, is a major hurdle for deploying autonomous systems in the real world.

While Unsupervised Domain Adaptation (UDA) aims to bridge this gap without requiring new labels in the target domain, existing methods often attempt to align the entire image or every proposed object box. This approach is often suboptimal because:

  1. Background Noise: The model may waste capacity aligning irrelevant background textures (like the sky or road) instead of the actual objects of interest.
  2. Low-Value Proposals: Standard detectors generate thousands of region proposals, many of which are empty space. Aligning all of them dilutes the signal from the actual objects that matter for adaptation.

The Categorical Regularization (CR) Framework

To address these issues, we introduce a "plug-and-play" Categorical Regularization (CR) framework designed for Domain Adaptive (DA) Faster R-CNN architectures. The framework consists of two primary modules:

1. Image-Level Categorical Regularization (ICR)

This module exploits a fundamental property of Convolutional Neural Networks (CNNs): even without explicit bounding box supervision, a classifier trained to identify categories naturally "activates" on the pixels where those objects are located. By adding a simple multi-label classifier to the detection backbone, we force the model to learn features specific to object categories. This effectively "hunts" for the right regions to align across domains while ignoring distracting background noise.

2. Categorical Consistency Regularization (CCR)

This module identifies "hard" instances by comparing the predictions of the image-level classifier with the instance-level detector. For example, if the image-level classifier is highly confident a "person" exists in the image, but the instance-level detector is uncertain about a specific box, that box is flagged as a "hard-to-align" instance. The model then assigns higher weight to these samples during the domain alignment process, ensuring it learns from the most informative examples.

Experimental Evaluation

The framework was evaluated across several challenging domain-shift scenarios, including weather adaptation (Clear to Foggy Cityscapes), scene adaptation (German to US cities), and dissimilar domain adaptation (Real photos to Clipart).

Key Results

The CR framework consistently outperformed baseline domain adaptation methods:

  • Foggy Weather: On Foggy Cityscapes, the method improved the Mean Average Precision (mAP) of the "SW-Faster" baseline from 34.8% to 37.4%. Notably, it achieved a massive boost in difficult categories like "train" (from 27.8% to 36.4%).
  • Real-to-Artistic: When adapting from real photos to Clipart, the model achieved 38.3% mAP, setting a new state-of-the-art for that benchmark at the time of publication.

Qualitative Success

Visualization of the model's attention maps demonstrates the effectiveness of the ICR module. As shown below, the proposed method focuses more precisely on the actual objects (like the bus) compared to baseline methods, even under heavy fog.

Visualization of attention maps in clear (left) and foggy (right) domains, comparing baseline (middle row) vs. the proposed CR method (bottom row).

Conclusion

The Categorical Regularization framework provides a robust, hyperparameter-free way to improve domain adaptation for object detectors. By leveraging classification as a form of weak localization and using prediction consistency as a proxy for instance hardness, the model focuses its alignment efforts on the most critical regions of the image. While currently optimized for two-stage detectors like Faster R-CNN, the principles of categorical consistency offer a promising path for broader adaptive vision tasks.

Summary updated

BibTeX
@inproceedings{xu2020exploring,
  author = {Chang-Dong Xu and Xing-Ran Zhao and Xin Jin and Xiu-Shen Wei},
  title = {{Exploring Categorical Regularization for Domain Adaptive Object Detection}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2020},
  url = {https://openreview.net/forum?id=Ox81H_sZTVX},
}
Figure