MC-PanDA: Mask Confidence for Panoptic Domain Adaptation

Ivan Martinović, Josip Šarić, Siniša Šegvić

TL;DR

MC-PanDA significantly advances unsupervised domain adaptation (UDA) for panoptic segmentation by leveraging the internal uncertainty estimates of mask transformers. By introducing mask-level loss weighting and a selective point-filtering strategy that favors high-teacher/low-student confidence regions, the method achieves a new state-of-the-art, outperforming previous approaches by 6.2 percentage points on the Synthia$\rightarrow$Cityscapes benchmark.

What Problem Does This Paper Address?

Panoptic segmentation—the task of assigning a semantic label and a unique instance ID to every pixel in an image—is incredibly powerful for scene understanding but notoriously expensive to annotate. While synthetic datasets (like Synthia) provide a cheap alternative, models trained on them often fail when applied to real-world data (like Cityscapes) due to "domain shift."

Unsupervised Domain Adaptation (UDA) aims to bridge this gap by training on labeled synthetic data and unlabeled real data. The standard approach uses a "Mean Teacher" setup, where a student model learns from the predictions (pseudo-labels) of a teacher model. However, this often creates a destructive positive feedback loop: if the teacher makes a mistake, the student learns it, and the error is amplified. Previous methods tried to mitigate this using coarse, image-wide confidence scores, which fail to account for the fact that a teacher might be very certain about a "road" mask but completely lost on a "pedestrian" mask in the same frame.

Methods

The authors propose MC-PanDA (Mask Confidence for Panoptic Domain Adaptation), built atop the Mask2Former architecture. Their core innovation is moving from image-wide heuristics to fine-grained, mask-level uncertainty quantification.

Fig. 1: MC-PanDA complements the Mean Teacher for domain-adaptive panoptics with fine-grained uncertainty quantification. We modulate the dense localization loss of the i-th mask Lmi with the mask-wide confidence λi, and sample it with respect to pixel-level affinity Ai that blends teacher confidence Φ and student uncertainty (cf . Eq. 5). Our contributions encourage cautious self-learning from uncertain pseudo- labels. Note that we show detailed loss sampling and weighting only for the mask N. This procedure is carried out for each student mask that maps to a non-empty teacher mask. For simplicity, the figure omits source domain branch and SegMix augmentation.

Key components include:

  • Mask-wide Loss Scaling (MLS): Instead of weighting the entire image loss, the model calculates a confidence score $\lambda_i$ for each individual mask. This score represents the ratio of pixels within a mask that exceed a confidence threshold. This allows the student to ignore "hallucinated" or low-quality masks generated by the teacher.
  • Confidence-Based Point Filtering (CBPF): Training on high-resolution images often requires sampling a subset of pixels to save memory. While standard sampling targets pixels where the student is most uncertain, MC-PanDA adds a crucial constraint: it only samples these points if the teacher is highly confident in its prediction. This ensures the student only learns in areas where the teacher is likely to be correct.
  • SegMix: A panoptic-specific data augmentation that pastes segments from the source domain onto target domain images, helping the model learn features across different contexts.
Fig. 2: The teacher multiplies the dense assignment masks σ with mask-wide max- softmax in order to recover dense per-mask confidence ρ. Taking the max along the mask axis of ρ and thresholding with respect to τ2 reveals binary map of uncertain pixels (5). Furthermore, the mask axis arg-max of ρ delivers the map of panoptic indices, which we further convert to per-mask binary maps by converting indices to their one- hot encodings. Finally, we determine per-mask teacher confidence λ = {λi} (4) as the relative count of dense per-mask confidences that are greater than τ1.

Datasets

The researchers evaluated their method across several challenging domain adaptation benchmarks:

  • Synthia $\rightarrow$ Cityscapes: Adapting from synthetic urban scenes to real-world German city streets.
  • Synthia $\rightarrow$ Mapillary Vistas: Moving from synthetic data to a diverse, global dataset of street-level imagery.
  • Cityscapes $\rightarrow$ Foggy Cityscapes: Testing robustness against synthetic weather conditions.
  • Cityscapes $\rightarrow$ Mapillary Vistas: Adapting between two different real-world datasets.

Key Insights and Ideas

  • Transformers as Uncertainty Estimators: The authors capitalize on the fact that mask transformers (like Mask2Former) are inherently better at estimating their own prediction uncertainty compared to traditional convolutional architectures.
  • Granularity Matters: The shift from image-level to mask-level confidence is the "aha moment." It recognizes that domain shift isn't uniform across an image; some classes or instances adapt more easily than others.
  • Strategic Learning: The CBPF strategy effectively says, "Only listen to the teacher when the teacher is sure and you are confused." This targeted learning prevents the noise amplification that plagues simpler Mean Teacher setups.

Key Results

MC-PanDA sets a new state-of-the-art (SOTA) across the board:

  • Synthia $\rightarrow$ Cityscapes: Achieved 47.4 PQ (Panoptic Quality), a massive 6.2 point improvement over the previous SOTA, EDAPS.
  • Synthia $\rightarrow$ Vistas: Reached 38.7 PQ, outperforming EDAPS by 2.1 points.
  • Cityscapes $\rightarrow$ Foggy Cityscapes: Reached 63.7 PQ, a 7.0 point lead over previous methods.

Qualitatively, the model shows much better performance on small, high-frequency objects like traffic signs and riders, which are typically the first to fail under domain shift.

Table 1: Performance evaluation on Synthia→Cityscapes and Synthia→Vistas. Two- branch UniDAFormer [63] (UniDAF-PSN) works better than the mask transformer counterpart (UniDAF-DETR). All our experiments are averaged over 3 random seeds.

Limitations and Future Work

  • Hyperparameter Sensitivity: The method relies on two key thresholds ($\tau_1$ and $\tau_2$). While the authors didn't over-optimize these, they note that performance can vary, and per-class thresholds might be necessary for even better results.
  • Hardware Constraints: The experiments were limited to small batch sizes (2 source + 2 target images) to fit on a 40GB GPU. The authors suspect that larger batch sizes—closer to the 16 images recommended for Mask2Former—would yield even higher performance.
  • Early Training Pessimism: In the early stages of training, the teacher can be "over-pessimistic," assigning zero confidence to masks that are actually well-localized, which could slow down initial convergence.

Summary updated

BibTeX
@inproceedings{martinovic2024mc,
  author = {Ivan Martinović and Josip Šarić and Siniša Šegvić},
  title = {{MC-PanDA: Mask Confidence for Panoptic Domain Adaptation}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  url = {https://openreview.net/forum?id=3nhU4bQT3u},
}
Figure