Unsupervised Domain Adaptation for Semantic Segmentation Based on Instance Spatial Geometry

Binglin Hao, Huajun LiuNeurIPS 2026

TL;DR

Whether you are driving through a photorealistic video game or a real city street, a cyclist is almost always positioned above a bicycle, while cars scatter all around them. This paper translates that intuitive spatial layout into mathematical features—directional concentration and dominant direction—to help semantic segmentation models adapt from synthetic training data to the real world without needing human-annotated real-world labels. By checking if pixel predictions make sense within the broader geometric neighborhood, the model filters out bad guesses and significantly boosts real-world accuracy.

What Problem Does This Paper Address?

Training a vision model to label every pixel in a street scene (semantic segmentation) requires massive amounts of annotated data. Doing this by hand for real-world photos is grueling, whereas video game engines generate perfect pixel labels for free. Unsupervised Domain Adaptation (UDA) tries to bridge the "domain gap" between synthetic training data and unlabeled real-world images.

Existing UDA methods typically rely on two crutches that have blind spots:

  1. Pixel-level depth: Many models predict depth maps alongside semantic labels to learn scene geometry. However, raw depth only tells you how far away a single pixel is—it ignores macroscopic relationships between objects that stay remarkably consistent across synthetic and real worlds.
  2. Overconfident self-training: Models often teach themselves on real images using their own high-confidence predictions ("pseudo-labels"). Yet neural networks can be confidently wrong—hallucinating a patch of sidewalk in the middle of a car because the local texture looks right, completely oblivious to the surrounding scene layout.
Figure 1: Spatial geometry captures directional distribution relative to a target instance: uniformly distributed supporting instances yield low direc- tional concentration, whereas consistently aligned instances yield high directional concentration.

Methods

The authors build upon a standard student-teacher self-training setup (where an Exponential Moving Average teacher generates pseudo-labels for the student) and Depth Anything V2 (used off-the-shelf to estimate depth). Their novel contributions revolve around explicitly modeling Instance Spatial Geometry:

  • 4-Channel Geometric Descriptors: Using connected-component labeling on segmentation masks, the authors group pixels into approximate object instances and find their 3D centroids in joint image-depth space $(x, y, z)$. For every target instance, they draw unit vectors from all other instances to it and compute two statistics: dominant direction (the 3D $x, y, z$ orientation of the average vector) and directional concentration (vector length, showing whether surrounding objects are tightly clustered in one direction or cancelled out in a circle). Averaging these across classes and broadcasting them back to the pixels creates a dense 4-channel geometric map.
  • Segmentation-Geometry Association Loss: Within a multi-task architecture, the main network is given a shared geometric decoder tasked with predicting this 4-channel map via a reverse Huber (BerHu) loss. This forces the intermediate feature layers to learn global object layouts alongside local pixel textures in both source and target domains.
  • Geometry-Guided Pseudo-Label Reweighting: The authors pre-train two separate, frozen auxiliary networks on the synthetic source data: one takes the 1-channel concentration map to predict semantics, and the other takes the 3-channel direction map. During real-world adaptation, if both auxiliary specialists agree on a pixel's class, the student's pseudo-label weight is amplified ($\alpha = 1.1$); if they disagree, it is attenuated ($\beta = 0.8$).
Figure 2: Method overview. Our framework extracts class- wise geometric cues (directional concentration and dominant direction) from semantic instances based on segmentation labels. These cues are incorporated as auxiliary supervision via an association loss to enhance the main segmentation network. Moreover, two separate auxiliary segmentation models are pre-trained on the source domain using these geometric cues, and their predictions are jointly exploited to refine pseudo-label weights during self-training.

Datasets

The authors evaluate their method on two standard synthetic-to-real urban driving benchmarks (no new datasets are introduced):

  • Source (Synthetic): GTA (24,966 images) and Synthia (9,400 images).
  • Target (Real-world): Cityscapes (2,975 unlabeled training images; evaluated on 500 validation images across 19 classes for GTA and 16 for Synthia).

Key Insights and Ideas

  • Geometric agreement exposes hidden errors: When checking the two frozen auxiliary networks on real data, they disagreed on only 14.2% of pixels—yet that small fraction harbored nearly a third (31.3%) of all pseudo-label errors! Agreement acts as a remarkably crisp filter for label reliability without needing manual threshold tuning.
  • Correspondence matters, not just multi-tasking: Is the network just benefiting from extra regularization? To check, the authors shuffled geometric descriptors among instances within the same image. Performance degraded steadily as more instances were shuffled, proving the network genuinely relies on accurate spatial relationships.
  • Context-aware attention: Grad-CAM visualizations show that while baseline models fixate narrowly on local textures of ambiguous classes (like poles), adding spatial geometry expands the network's attention to inter-class boundaries and surrounding context.

Key Results

Plugged into three flagship UDA architectures—DAFormer, HRDA, and MIC—the method delivers consistent Mean Intersection over Union (mIoU) improvements across the board:

  • Synthia $\rightarrow$ Cityscapes: Boosts DAFormer by +1.6, HRDA by +1.9, and MIC by +1.1 mIoU (reaching 68.4%). Major gains appear in stable layout classes like sidewalk (+5.3%) and complex objects like bus (+9.2%).
  • GTA $\rightarrow$ Cityscapes: Boosts DAFormer by +1.8, HRDA by +1.4, and MIC by +1.3 mIoU (reaching 77.2%), sharpening delicate structures like fence (+3.4%) and pole (+2.5%).
  • Outperforms the state-of-the-art depth-based method (MICDrop) in five out of six experimental settings and ties in the sixth.

Limitations and Future Work

  • Depth reliance: The full 3D geometric descriptor relies on off-the-shelf depth estimation (Depth Anything V2), meaning depth estimation errors or cross-domain depth inconsistencies can trickle down into the geometric features. (A depth-free 2D variant still beats baselines, though it misses relative depth cues).
  • Layout shifts: The core assumption is that spatial layouts between classes remain stable across domains. If the target environment has drastically different physical object arrangements (e.g., left-hand vs. right-hand traffic, or off-road scenes), performance could suffer. Future work aims to build resilience against both depth noise and layout shifts.

Summary updated

BibTeX
@inproceedings{hao2026unsupervised,
  author = {Binglin Hao and Huajun Liu},
  title = {{Unsupervised Domain Adaptation for Semantic Segmentation Based on Instance Spatial Geometry}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=N19qO7k1Lr},
}
Figure