Seams in the Labels: Tile-Offset Consistency for Self-Training on Distantly Labeled Rasters

Large aerial images, satellite scenes and microscopy mosaics are too big to fit on a GPU. They are cut into a grid of tiles, each tile is processed alone, and the outputs are stitched back together. Pixels near a tile edge see only one side of their surroundings, so predictions there are less confident and often wrong. The result is visible "seams" along the grid. At the same time, these images rarely come with hand-drawn masks. Practitioners instead use distant supervision, meaning training labels generated automatically from an outside source: map databases such as OpenStreetMap, image-level tags turned into rough masks, or a model's own earlier predictions. The usual recipe is to make a coarse label, train a segmenter, re-label the data with that segmenter, and repeat.

This note argues that the two problems combine in a way neither literature has studied. When the automatic labels are regenerated tile by tile on a fixed grid, the seam errors are written into the training targets themselves. Each round of self-training can then make them stronger. We propose a simple fix and a way to measure the problem. At every re-labeling round, run the current model under several randomly shifted tile grids. A pixel whose predicted class depends on where the grid happens to fall is showing a tiling artifact, not evidence about the scene, so it is left out of the next round's loss. Stable disagreement between the model and the external map, by contrast, is kept as a signal of map error. The core claim is that how much a prediction varies across grid shifts is a free, label-independent estimate of reliability. It separates tiling artifacts from label noise, and using it inside the labeling loop should matter more than any inference-time stitching trick.

What prior work does and does not cover

Distant supervision in vision began with methods like Distantly Supervised Road Segmentation. That work turned scene tags into activation heatmaps, sharpened them with superpixels, and self-trained a segmenter, reaching 0.800 mIoU on Cityscapes against 0.853 for full supervision. It worked on whole, un-tiled street images, so its loop never met a tile grid. It also reported that low-resolution training of the heatmap generator works better than high-resolution training. That finding cautions us: very small tiles may hurt distant supervision for reasons unrelated to seams, so tile size must be a controlled variable.

The closest existing work combines weak labels with tiling: Semantic segmentation of reflectance confocal microscopy mosaics of pigmented lesions using weak labels. It trains on patch-level labels, observes the confidence drop at patch margins, and hides the problem with a Gaussian weighting kernel at stitching time (mosaic Dice 0.778). That kernel only reduces the weight of edge predictions on a fixed grid. It does not change what the model learns, and it discards predictions exactly where objects are cut in half.

Alleviating tiling effect by random walk sliding window in high-resolution histological whole slide image synthesis supplies the mechanism we reuse: randomly shifted window origins, with outputs averaged using a center-biased weight. It applies this only at inference, for image-to-image synthesis. We move it into label generation and use the variance across shifts as a gate, not just the mean.

On the label-noise side, Noisy Boundaries: Lemon or Lemonade for Semi-supervised Instance Segmentation? shows that noisy pseudo-label contours can be partly exploited. It uses a low-resolution mask head and a Laplacian-based re-weighting. Its teacher is trained on 30–40% human labels, and its images are not tiled.

Boundary losses such as the differentiable boundary-F1 loss in Boundary Loss for Remote Sensing Imagery Semantic Segmentation and the Mahalanobis-angle loss in BASeg assume pixel-exact masks. Optical Remote Sensing Image Understanding With Weak Supervision documents that OpenStreetMap labels are displaced, simplified and incomplete. This limits our design: a sharp boundary loss applied to shifted map polygons will push the model toward the wrong edge. Our gate therefore has to decide which pixels a boundary loss is allowed to see.

Core Claim

Let $p_k(x)$ be the model's foreground probability at pixel $x$ when the image is tiled with the $k$-th of $K$ random grid origins. Let $\bar p(x)$ be the mean over the $K$ runs and $s(x)$ their standard deviation. The next round's target and per-pixel weight are

$$ y^{t+1}(x) = \mathbb{1}[\bar p(x) > 0.5], \qquad w(x) = \mathbb{1}[s(x) < \tau], $$

where $\tau$ is chosen so that a fixed fraction of pixels is kept. We also track a second quantity, $d(x) = |\bar p(x) - m(x)|$, where $m(x)$ is the original distant label (for example, a rasterized map polygon). Pixels with low $s$ and high $d$ are flagged as likely map errors and are relabeled from $\bar p$. Pixels with high $s$ are treated as tiling artifacts and excluded from the loss.

We make three testable predictions. First, under fixed-grid regeneration, error rises with proximity to tile edges, and this gradient grows across self-training rounds. Second, the variance gate removes this gradient without the recall loss of Gaussian down-weighting. Third, the variance gate helps beyond simply averaging over shifts.

Research Program

The study has three parts.

Diagnostic. We build a seam diagnostic that plugs into any tiled pipeline. It reports accuracy stratified by distance to the nearest tile edge, and a "grid energy" score. The grid energy score is the fraction of the error map's Fourier power at the tile period and its harmonics. Together these make seam amplification measurable round by round.

Controlled noise study. We take datasets with clean masks and corrupt them in known ways that mimic the failure modes described by Yue et al.: random polygon shifts of a few pixels, dropped objects, and simplified outlines. Because the truth is known, we can check directly whether low-$s$, high-$d$ pixels really are corrupted-label pixels. We also check whether high-$s$ pixels concentrate at tile edges.

Realistic study. We use OpenStreetMap building footprints rasterized over the INRIA aerial cities, plus a tag-to-heatmap pipeline in the style of Tsutsui et al. Everything is evaluated against the human masks. In this setting we test whether a registration-tolerant boundary loss helps once it is restricted to gated pixels. The loss takes the minimum boundary-F1 penalty over small shifts of the label. We also test whether it hurts when it is not restricted to gated pixels.

Baselines

Naive reference. Fixed-grid, non-overlapping tiling, with the model trained directly on the rasterized distant labels and self-trained for the same number of rounds. Labels are regenerated on the same grid each round.

Fixed-grid Gaussian stitching. The Gaussian-kernel stitching of the confocal-mosaic paper, applied both when regenerating labels and at test time, with the overlap matched to our compute.

Random-walk averaging. The random-walk sliding window of Bao et al., using the same $K$ shifted grids and its center-biased averaging, but with no variance gate. This is the direct ablation of our key ingredient: same forward passes, same data, same number of rounds, differing only in whether variance gates the loss.

Strongest noise-robust method. Wang et al.'s noise-tolerant mask head with its boundary-preserving map, adapted to semantic segmentation. It is given the same distant labels and the same tuning budget, defined as an equal number of hyperparameter trials on a held-out city.

Boundary loss alone. Bokhovkin and Burnaev's boundary loss applied to the raw distant labels, without the gate.

All methods share one backbone, one tile size, one optimizer schedule, and a matched count of forward passes per labeling round. Any method that uses fewer passes is given extra overlap to equalize.

Reference points. For context, the fully supervised INRIA baselines report 53.82% IoU for an FCN and about 60% IoU for a multi-resolution network (Can semantic labeling methods generalize to any city?). On Potsdam, the fully supervised boundary loss reaches 93.85% IoU against 92.56% for IoU loss. We found no reported result on Lacuna for training on OpenStreetMap labels on INRIA or Potsdam, so the distantly supervised baselines are numbers we must produce ourselves.

What counts as beating a baseline. Beating the random-walk averaging ablation, across three seeds, means all of the following:

  1. Higher boundary F1 in the 32 pixels nearest tile edges.
  2. A flat edge-distance error profile.
  3. Lower grid energy after the final round.
  4. Overall IoU no worse than that ablation.

Why not just…?

Why not just use overlapping tiles with Gaussian blending at test time? Blending fixes how the final map looks, not what the model was trained on. If pseudo-labels were produced on a fixed grid, the student learned from seam-shaped errors. The confocal-mosaic study also notes that down-weighting margins suppresses real structures cut by the grid. The Gaussian-stitching baseline, applied at both label time and test time, tests this directly. If it matches our method on edge-stratified boundary F1, the idea adds nothing.

Why not just train on random crops, which already makes the model insensitive to where the grid falls? This is the most serious threat. Random-crop training may keep the student free of seams even when its targets contain them, because each target seam lands at a different position in each crop. We test this head-on. With random-crop training held fixed, we compare fixed-grid regeneration against shifted-grid regeneration. If the edge-distance error profile and grid energy do not grow across rounds under fixed-grid regeneration, then seam amplification does not occur. In that case we would report a negative result instead of a method.

Why not just use a noise-robust loss and ignore tiling? Noise-robust methods like Wang et al.'s treat every noisy pixel alike. They cannot tell a displaced map polygon from a prediction that is unreliable only because it sits at a tile edge. The controlled-noise study checks whether the variance signal separates these two populations. The prediction is that high-$s$ pixels cluster at edges while corrupted-label pixels do not. If Wang et al.'s method alone already produces a flat edge-distance profile, the tiling component is unnecessary.

Why not just process larger tiles or whole images? Memory is the reason tiling exists at all. Tsutsui et al.'s resolution finding also suggests that the right input size for distant supervision is not simply "as large as possible." We report results at two tile sizes, so readers can see whether the gate's benefit shrinks as tiles grow, which it should if seams are the cause.

Proposed Experiments

The first experiment is decisive and cheap. On ISPRS Potsdam and Vaihingen with synthetically shifted masks, we run five self-training rounds under the naive fixed-grid scheme. After each round we plot IoU against distance to the tile edge. The seam-amplification hypothesis predicts a steepening gradient. A flat profile under random-crop training would falsify the premise, and we would stop there.

If the gradient appears, the second experiment compares all baselines on the same controlled noise. It measures overall IoU, edge-stratified boundary F1 and grid energy. It also measures how precisely the low-$s$, high-$d$ flag recovers the pixels we deliberately corrupted.

The third experiment moves to INRIA with real OpenStreetMap footprints. We train on five cities and test on held-out cities, to see whether the gate's gains survive genuine map displacement and the cross-city shift that benchmark was built to measure. The same experiment tests whether a shift-tolerant boundary loss restricted to gated pixels adds boundary accuracy that the unrestricted boundary loss loses.

A final transfer check uses the tag-to-heatmap pipeline in place of map polygons. It asks whether the variance gate also helps when the distant signal is an activation map, which is the setting where the confocal-mosaic study first saw edge collapse.