Unbiased Mean Teacher for Cross-domain Object Detection

Jinhong Deng, Wen Li, Yuhua Chen, Lixin Duan

TL;DR

Standard Mean Teacher (MT) frameworks struggle with cross-domain object detection because they inherently drift toward a heavy bias favoring the source domain. This paper introduces the Unbiased Mean Teacher (UMT) framework, which corrects this bias using pixel-level domain translation and a dynamic out-of-distribution sample selection strategy, setting new state-of-the-art results across multiple domain adaptation benchmarks.

What Problem Does This Paper Address?

Deep learning models excel when test data matches their training data, but their performance plummets when deployed in new environments—a challenge known as domain shift. In object detection, this shift can be caused by changes in weather, lighting, or artistic style. Because annotating bounding boxes in every possible environment is prohibitively expensive, researchers rely on unsupervised domain adaptation (UDA).

A popular starting point for UDA is the Mean Teacher (MT) framework, where a "student" model learns from the pseudo-labels generated by a "teacher" model (which is an exponential moving average of the student). However, the authors reveal a fundamental flaw: because the primary supervision still originates from the labeled source domain, the teacher model becomes heavily biased toward the source domain. As a result, its predictions on target domain images are highly unreliable, leading to poor distillation.

Figure 2: Evaluation of teacher models in mean teacher on target images and source-like images in different cross- domain object detection scenarios. Mean Average Precision (mAP) is used as the comparison metric. It can be observed that the teacher model produces significantly better detec- tion results on source-like images, which clearly indicates the models are biased towards the source domain.

Methods

To counteract this model bias, the authors propose Unbiased Mean Teacher (UMT), which introduces three core strategies to "heal" the training process:

  1. Healing Teacher Bias (Cross-Domain Distillation): The authors use CycleGAN to translate unlabeled target images into "source-like" images. Because the teacher model is biased toward the source domain, it generates much more accurate pseudo-labels on these source-like images. The teacher processes the source-like image to generate bounding boxes, while the student is optimized using the original target image, forcing the student to adapt to the true target domain.
  2. Healing Student Bias (Target-like Augmentation): Conversely, source images are translated into "target-like" images. The student is trained on these target-like images using the original source annotations, making its feature representations more favorable to the target domain from the start.
  3. Healing the Teaching Process (Out-of-Distribution Estimation): Domain adaptation is dynamic; as the model trains, its familiarity with different samples changes. UMT introduces a side-branch to predict a sample's "confidence"—specifically, how likely it is to be an in-distribution sample. This confidence score is used to dynamically select the best sample pairs for distillation and to interpolate soft labels during training.
Figure 3: An overview of our proposed Unbiased Mean Teacher. In each mini-batch, four types of images are used: source- like images, target images, target-like images, and source images. The source images with annotations are used to optimize the object detection loss of the student model under the supervision of interpolated ground truth in Eq. (8) (i.e., Source Det. Loss); the source-like images and target images are respectively fed into the teacher and student network to perform the cross-domain distillation (i.e., Distillation Loss); the target-like images are used as additional training samples to train the student model (i.e., Target-like Det. Loss); The confidence branch adopt proposal feature and predict a confidence score with the log penalty in Eq. (7) (i.e., Confidence Loss). These training routes are performed jointly in an end-to-end manner.

Datasets

The UMT framework was evaluated across three distinct types of domain shifts using standard benchmarks:

  • Real to Artistic: Training on PASCAL VOC (2007 and 2012) and adapting to Clipart1k and Watercolor2k.
  • Normal to Adverse Weather: Training on Cityscapes (clear weather) and adapting to Foggy Cityscapes.
  • Synthetic to Real: Training on SIM10K (synthetic driving scenes from GTA V) and adapting to Cityscapes.
Figure 1: Examples of translated images. (a) and (c) are re- spectively a source example image from the PASCAL VOC dataset [8], and a target example image from the Clipart1k dataset [19]. (b) is the target-like image by translating the source image (a) into the target style, and (d) is the source- like image by translating the target image (c) into the source style.

Key Insights and Ideas

  • The "Source-Like" Trick: The most striking insight is that the teacher model's domain bias can be weaponized. Instead of trying to force the teacher to understand the target domain perfectly, feeding it target images styled to look like the source domain yields significantly cleaner, more accurate pseudo-labels.
  • Dynamic vs. Static Adaptation: Relying solely on offline image translation (like CycleGAN) isn't enough because it doesn't account for how the model evolves during training. The addition of the dynamic out-of-distribution confidence branch ensures the teaching process adapts alongside the model.
  • Surpassing the Oracle: In the weather adaptation experiment (Cityscapes $\rightarrow$ Foggy Cityscapes), UMT actually outperformed the "Oracle" baseline (a model trained directly on clean target data). This suggests that leveraging clear-weather source data provides structural priors that can actually boost performance in low-visibility target settings.

Key Results

UMT achieved significant performance gains over previous state-of-the-art (SOTA) methods across all datasets:

  • PASCAL VOC $\rightarrow$ Clipart1k: Achieved 44.1% mAP, a notable increase over previous methods like DM (41.8%) and standard Mean Teacher (33.6%).
  • PASCAL VOC $\rightarrow$ Watercolor2k: Reached 58.1% mAP, outperforming the baseline standard Mean Teacher model (53.6%).
  • Cityscapes $\rightarrow$ Foggy Cityscapes: Achieved 41.7% mAP, outperforming the SOTA method HTCN (39.8%) and even beating the Oracle baseline (40.3%).
  • SIM10K $\rightarrow$ Cityscapes: Reached 43.1% mAP on car detection, outperforming standard MT (40.8%) and other adversarial methods.

Table 1: Clipart1k results Table 2: Watercolor2k results

Limitations and Future Work

While UMT delivers impressive results, it relies on an offline image-to-image translation step (CycleGAN) to generate the source-like and target-like images before the main training loop begins. This introduces a two-stage dependency, increasing preprocessing time and relying heavily on the quality of the generative model.

Future work could explore integrating the pixel-level domain translation directly into the end-to-end training framework or extending this unbiased teacher strategy to other complex vision tasks like instance segmentation.

Summary updated

Abstract

Cross-domain object detection is challenging, because object detection model is often vulnerable to data variance, especially to the considerable domain shift between two distinctive domains. In this paper, we propose a new Unbiased Mean Teacher (UMT) model for cross-domain object detection. We reveal that there often exists a considerable model bias for the simple mean teacher (MT) model in cross-domain scenarios, and eliminate the model bias with several simple yet highly effective strategies. In particular, for the teacher model, we propose a cross-domain distillation method for MT to maximally exploit the expertise of the teacher model. Moreover, for the student model, we alleviate its bias by augmenting training samples with pixel-level adaptation. Finally, for the teaching process, we employ an out-of-distribution estimation strategy to select samples that most fit the current model to further enhance the cross-domain distillation process. By tackling the model bias issue with these strategies, our UMT model achieves mAPs of 44.1%, 58.1%, 41.7%, and 43.1% on benchmark datasets Clipart1k, Watercolor2k, Foggy Cityscapes, and Cityscapes, respectively, which outperforms the existing state-of-the-art results in notable margins. Our implementation is available at https://github.com/kinredon/umt.
BibTeX
@inproceedings{deng2021unbiased,
  author = {Jinhong Deng and Wen Li and Yuhua Chen and Lixin Duan},
  title = {{Unbiased Mean Teacher for Cross-domain Object Detection}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr46437.2021.00408},
}
Figure