Abstract
Unsupervised Domain Adaptation (UDA) for semantic segmentation often suffers from source-domain bias and a "rich-get-richer" loop where majority classes dominate pseudo-labels. We present Class-balanced Pixel-level Self-Labeling (CPSL), a framework that leverages the intrinsic structure of the target domain through online clustering. By aligning cluster distributions with expected class frequencies and using a class-balanced memory bank, CPSL significantly improves performance on rare, long-tailed categories.
Introduction
Training semantic segmentation models typically requires expensive pixel-level annotations. Unsupervised Domain Adaptation (UDA) offers a solution by adapting models trained on synthetic data (source) to unlabeled real-world data (target). However, standard self-training methods—which rely on the model's own confident predictions as pseudo-labels—often reinforce biases toward majority classes (e.g., roads, buildings) and the source domain. This leads to poor performance on rare "long-tail" categories like motorcycles or traffic lights.
Proposed Method: CPSL
To address these biases, we propose Class-balanced Pixel-level Self-Labeling (CPSL). Instead of relying exclusively on classifier predictions, CPSL explores the intrinsic structure of the target domain via online pixel-level clustering.
The framework consists of several key components:
- Online Pixel-Level Clustering: A dedicated self-labeling head clusters pixel features in real-time.
- Pseudo-label Rectification: Soft cluster assignments are used to modulate classifier-generated pseudo-labels. If a cluster grouping contradicts a high-confidence classifier prediction, the confidence is penalized, reducing noise.
- Optimal Transport with Distribution Alignment: Clustering is solved via the Sinkhorn-Knopp algorithm. Unlike previous methods that forced equal cluster sizes, CPSL aligns cluster sizes with the moving average of the pseudo-labels' class distribution, accommodating the natural imbalance of real-world scenes.
- Class-Balanced Memory Bank: To prevent rare classes from being overlooked during clustering, the model maintains a memory bank of pixel features sampled evenly across all predicted categories.
Experimental Results
The proposed method was evaluated on standard benchmarks, including GTA5 $\rightarrow$ Cityscapes and SYNTHIA $\rightarrow$ Cityscapes.
CPSL achieves state-of-the-art performance, reaching 55.7 mIoU on the GTA5 to Cityscapes task, outperforming the previous best method (ProDA) by 2.0 points. When combined with knowledge distillation, the performance further improves to 60.8 mIoU. On the SYNTHIA $\rightarrow$ Cityscapes task, CPSL achieved 54.4 mIoU (over 16 classes), outperforming the previous best by 1.8 points.
The most significant gains are observed in long-tail categories. For instance, on GTA5 $\rightarrow$ Cityscapes, the IoU for the "train" class improved from 0.0 (where ProDA failed entirely) to 24.9. Significant double-digit improvements were also noted for "motorcycle," "traffic light," and "bus." These results demonstrate that combining classification with pixel-level clustering effectively captures small, distinct foreground objects that are often lost in standard self-training.
Conclusion
CPSL effectively mitigates source-domain and majority-class biases in UDA for semantic segmentation. By integrating online clustering with distribution alignment, the model successfully recovers rare categories. Future work will explore fully clustering-based assignment methods to further reduce reliance on potentially biased classifier pseudo-labels.
Summary updated