Coarse-to-Fine Self-Training for Synthetic-to-Real Segmentation

A segmentation network trained on video-game frames and tested on real street photos gets its large-scale structure largely right: sky is at the top, road is at the bottom, buildings line the sides. It gets the fine detail badly wrong, including the exact edges, poles, and traffic signs. We propose to use that asymmetry as the curriculum. The network first learns from unlabeled real images only at the coarsest spatial scale, meaning only what fraction of the whole image each class covers. It is then allowed to learn from progressively finer grids of regions. Pixel-level targets on real images are applied only at the end, and only once the network's own coarse predictions have stabilized. The synthetic images keep supplying full-resolution labels throughout. Scale is therefore scheduled only for the real-image signal.

The setting is a fully convolutional network, one whose every layer is a convolution so its output is a dense map aligned with the input pixels. It is trained on labeled synthetic urban scenes (GTA5, SYNTHIA) and adapted to unlabeled real ones (Cityscapes). The claim is that the synthetic-to-real gap depends on spatial scale. If that is true, self-training on real images should be staged by the size of the region a target describes rather than by a per-pixel confidence score. This replaces the handcrafted superpixel-and-SVM pipeline of prior curriculum adaptation with a single differentiable objective inside the network.

Core Claim and Relation to Prior Work

The closest work is Curriculum Domain Adaptation for Semantic Segmentation of Urban Scenes and its journal version A Curriculum Domain Adaptation Approach to the Semantic Segmentation of Urban Scenes. These papers motivate our hypothesis. They show that image-level class proportions on real images can be estimated reasonably well and used to regularize a network's dense predictions. That raises SYNTHIA→Cityscapes from 22.0% to 29.0% mIoU with FCN-8s, and GTA→Cityscapes from 21.1% to 31.4%.

Their curriculum, however, has only two fixed levels, the whole image and superpixels. Its targets come from external classifiers (logistic regression, linear SVMs) that never see the network's evolving predictions. The authors report that the superpixel constraints fail on poles, signs, and fences.

We keep their central insight, that coarse statistics transfer better than fine ones, but change three things. We replace the two fixed levels with a full pyramid of region sizes computed inside the network. The targets come from the network's own slowly updated copy rather than from separate classifiers. The move to finer scales is triggered by measured stability rather than set in advance.

A second paper supplies the structural motivation. Learning to Adapt Structured Output Space for Semantic Segmentation (AdaptSegNet) observes that synthetic and real output maps share layout even when inputs look very different. It aligns them with discriminators, which are auxiliary networks trained to tell synthetic outputs from real ones, at several network depths, reaching 42.4 mIoU on GTA5→Cityscapes with ResNet-101. It trains all levels jointly from step zero and reports sensitivity to the adversarial weight. We use the same layout-sharing observation without any adversary, and we add ordering over scale.

Diffusion Curriculum supplies the idea of adaptive, feedback-driven pacing along a synthetic-to-real axis. It is restricted to classification, and its authors note that diffusion generation shifts object positions. That spatial drift is the reason we pace over region size rather than over generated images, so that labels stay pixel-aligned.

Two further papers bear on the design. Holistically-Nested Edge Detection shows that fully convolutional stages with different receptive fields carry different spatial frequencies. We use it only to justify keeping full-resolution synthetic supervision for edges throughout, so fine detail is never starved. Curriculum Model Adaptation with Synthetic and Real Data for Semantic Foggy Scene Understanding (CMAda) is a constraining precedent. It shows that pseudo-labels, meaning the network's own predictions reused as training targets, become usable only after an easy intermediate stage (32.0→37.9 mIoU on Foggy Zurich-test). Its stages, though, are indexed by fog density and are specific to that task.

Mechanism

Let $p_\theta(x)$ be the student network's per-pixel class probability map on a real image $x$, and $q(x)$ the map from a teacher: an exponential moving average of the student, which gives more stable targets. Let $P_k$ average-pool a map over non-overlapping $k \times k$ blocks, so each block holds the predicted class proportions of that region. The real-image loss at scale $k$ is

$$ L_k(\theta) = \sum_{b} \mathrm{KL}\big(P_k q(x)_b \,\|\, P_k p_\theta(x)_b\big), $$

where $b$ indexes blocks. This loss only constrains how much of each class lies in each region, not where inside the region it lies. At $k$ equal to the image size it reduces to a learned version of the global label-distribution constraint of prior curriculum adaptation. At $k=1$ it is ordinary soft pseudo-labeling.

Training minimizes the full-resolution synthetic cross-entropy plus $L_{k_t}$. The scale $k_t$ steps down a fixed ladder, for example image size, 128, 64, 32, 16, 8, 1 at output stride. Each step is triggered when the teacher's pooled predictions at the next finer scale agree across two photometric augmentations of the same real image above a threshold $\tau$. This closed-loop trigger is the only pacing parameter. We will report sensitivity to $\tau$ rather than tuning it on target labels.

Research Program

The work has three parts. The first is a diagnostic that could kill the idea. The second is the method. The third is an analysis of what the method changes.

The diagnostic uses the Cityscapes validation labels for measurement only, never for training. We take a network trained only on synthetic data and compute the KL error of its pooled class proportions against the pooled ground truth at every $k$. The question is whether error falls sharply as $k$ grows, and in particular whether it falls faster than it does when the same pixel budget is selected by per-pixel confidence. If coarse regions are not more reliable than confidently predicted pixels, scale ordering adds nothing over standard confidence thresholding, and we would abandon the idea.

The method will be implemented on DeepLab-v2 with ResNet-101, to match AdaptSegNet, and on FCN-8s, to match the curriculum-adaptation numbers.

The analysis tracks, over training, per-class IoU for thin classes (pole, sign, fence, light) and for large "stuff" classes. It also tracks boundary accuracy in a narrow band around ground-truth edges. The aim is to see whether coarse-first training delays or damages thin structures, since that is the natural failure mode of this design.

Baselines

The naive reference point is a network trained only on synthetic data and applied directly to real images. The file reports 22.0% mIoU on SYNTHIA→Cityscapes (16 classes) and 21.1% on GTA→Cityscapes for FCN-8s (Zhang et al., PAMI version). We will retrain it ourselves with our exact backbone and schedule, so every comparison uses in-house numbers.

The strongest existing method with a number in the file is AdaptSegNet's multi-level output-space adversarial adaptation, which reports 42.4 mIoU on GTA5→Cityscapes with ResNet-101 (Tsai et al.). It is the strongest competitor because it exploits the same observation, that output layouts transfer, using a different tool. We will run it on the same data, backbone, iteration count, and hyperparameter search budget as ours. Beating it means exceeding our reproduction of it by a margin larger than the seed-to-seed spread over three seeds, with the gain concentrated in thin classes. The direct curriculum competitor is the curriculum domain adaptation method (29.0% SYNTHIA→Cityscapes, 31.4% GTA→Cityscapes with FCN-8s), which we compare against on FCN-8s.

Much newer self-training methods for this benchmark almost certainly exceed these figures. The file contains none, so there is no reported result found on Lacuna for them. We therefore treat our own reproduced self-training baselines as the bar that matters.

Four ablations isolate the key ingredient. The first is teacher-student soft pseudo-labeling at $k=1$ from the start, which is our method with the curriculum removed. The second is confidence-ranked pixel self-training, whose selected fraction of pixels is scheduled to match our method's effective constraint budget at each step; this tests scale ordering against confidence ordering at equal supervision. The third is a fixed-schedule ladder without the stability trigger. The fourth is our loss at a single mid-level $k$ with no progression. All ablations share the teacher, the augmentations, and the compute.

Why not just…?

Why not just threshold pseudo-labels by confidence? This is the most serious threat. Confident pixels tend to be interiors of large regions, so confidence thresholding may already approximate a coarse-first curriculum. Against it, the adaptation review Unsupervised Domain Adaptation in Semantic Segmentation: A Review documents confirmation bias in naive self-training, and CMAda needed an explicit easy stage before pseudo-labels became reliable. That evidence does not settle the question. The diagnostic and the budget-matched confidence ablation settle it. If confidence ranking matches us on overall mIoU and on thin classes, the scale-curriculum claim is false and we will say so.

Why not just use multi-level adversarial output alignment? AdaptSegNet already uses the layout-sharing observation and reaches 42.4 mIoU. Its authors, however, report that training swings between no adaptation and instability depending on the adversarial weight. Our loss has no adversary, and its only pacing knob is measured, not tuned on target labels. The head-to-head comparison at equal tuning budget, including variance across seeds and across the adversarial weight, is the test.

Why not just freeze deep layers and fine-tune shallow ones, or unfreeze progressively? Layer freezing schedules which parameters adapt, but every real-image target is still pixel-level. The problem our method addresses is that pixel-level targets on real images are wrong at the start. We will include a progressive-unfreezing baseline with standard pixel pseudo-labels. If it matches us, the benefit comes from optimization staging, not from target scale.

Why not just randomize the simulator or render more frames? In Driving in the Matrix, scaling from 10k to 200k GTA frames showed diminishing returns. Randomization in (CAD)²RL produced collision-free real flights in roughly 40% of trials, with failures on untextured walls and glass. Neither approach uses unlabeled real images, so both are complementary to our method rather than substitutes. We will not rerun them, but our method can be applied on top of any source dataset.

Proposed Experiments

The main benchmarks are GTA5→Cityscapes (19 classes) and SYNTHIA→Cityscapes (16 classes), evaluated by mIoU, per-class IoU, and boundary-band F-score. Foggy Zurich-test and Foggy Driving serve as a secondary check against CMAda's 37.9% and 34.3%, to see whether scale pacing transfers to weather shift without fog-specific staging. The depth-based segmentation codebase provides a tested Cityscapes pipeline and a DepthMix augmentation, which we will optionally add identically to all methods.

The decisive checks come in order. First, the diagnostic must show that pooled-proportion error falls faster with region size than with confidence-selected coverage. Second, the budget-matched comparison against confidence-ranked self-training must favor scale ordering on thin classes, not merely on road and sky. Third, our method must exceed the reproduced AdaptSegNet on GTA5→Cityscapes with lower variance across seeds.

If the first check fails, we stop. If the second fails but the third passes, the contribution is a stable, adversary-free replacement for output alignment rather than a curriculum result, and we will report it as such.