Task-Oriented Data Synthesis and Control-Rectify Sampling for Remote Sensing Semantic Segmentation

Yunkai Yang, Yudong Zhang, Kunquan Zhang, Jinxiao Zhang, Xinying Chen, Haohuan Fu, Runmin Dong

TL;DR

Training data synthesis using generative models is a promising way to bypass expensive manual annotation in remote sensing, but stochastic sampling often leads to "semantic drift" where generated images don't match their intended masks. This paper introduces TODSynth, a framework that uses a unified triple-attention mechanism and a novel Control-Rectify Flow Matching (CRFM) sampling strategy to dynamically correct the generation trajectory using task feedback. This approach significantly improves synthetic data quality, boosting downstream semantic segmentation performance across complex aerial datasets while using fewer synthetic samples than competing methods.

What Problem Does This Paper Address?

Semantic segmentation in remote sensing (RS)—such as identifying buildings, roads, or crop types from satellite imagery—is notoriously difficult due to massive spatial diversity and a lack of labeled data for rare classes. While text-to-image and mask-to-image diffusion models have emerged as a way to synthesize training data, adapting them to RS presents a major hurdle.

Standard generative models often suffer from semantic drift and control deviation during the sampling process. Because the generation trajectory is inherently stochastic, the model can easily drift away from the layout constraints of the input semantic mask, resulting in synthetic images that do not accurately match their labels. Existing solutions rely on post-generation filtering (throwing away bad images), but this is inefficient and can destroy valuable data diversity, especially in few-shot or highly complex scenarios.

Methods

The authors propose a task-oriented data synthesis framework (TODSynth) that tackles control at both the architecture level and the sampling level.

Figure 1. The overall workflow of the task-oriented data synthesis framework (TODSynth) consists of three stages: (a) Training stage using an MM-DiT generative model conditioned on text and mask. (b) Sampling stage with the proposed control-rectify flow matching (CRFM). (c) Downstream tasks trained on a combination of real and synthetic data.
  1. Unified Triple Attention (Tri-Attention): Built on top of the Diffusion Transformer (DiT) architecture of Stable Diffusion 3.5, the authors introduce a third modality stream specifically for the semantic mask sequence. Instead of treating the mask as an isolated condition (like in traditional adapter-based methods), Tri-Attention concatenates text, image, and mask tokens into a single sequence. This allows for direct cross-modal interaction, letting the text prompt guide the model's understanding of the spatial layout.
  2. Control-Rectify Flow Matching (CRFM): This is a plug-and-play sampling strategy guided by downstream task feedback. During the early, "high-plasticity" stages of image generation, the framework creates a quick, pre-synthesized prediction of the final image. This image is passed through a pre-trained segmentation network to calculate a Cross-Entropy loss against the ground-truth mask. The resulting gradient is back-propagated to compute a rectification vector ($v'_{rec}$) that adjusts the model's underlying velocity field, steering the generation trajectory back on track before errors amplify.
Figure 2. The architecture of MM-DiT with unified triple attention. For comparison, the mask-adapter and siamese MM-attention schemes are also illustrated.

Datasets

The framework was evaluated on two prominent remote sensing semantic segmentation benchmarks:

  • FUSU-4k: A 4,000-sample subset of the high-resolution FUSU aerial land-cover dataset (0.2–0.5 m resolution via Google Earth). It features fine-grained annotations across 17 distinct land-cover categories (e.g., industrial, cropland, wetland, commercial land).
  • LoveDA: A domain-adaptive land-cover dataset (0.3 m resolution) focusing on rural-to-urban settings. It includes 6 primary semantic classes: building, road, water, barren, forest, and agriculture.

Key Insights and Ideas

  • Joint Attention is Essential for RS: In remote sensing, fine-grained text descriptions are often scarce. The authors found that the text-image-mask joint attention scheme consistently outperformed mask-adapters and siamese attention mechanisms because it directly fuses text and mask embeddings, allowing the model to better resolve semantic ambiguities.
  • Rectifying Velocity vs. Latent States: Unlike previous methods that perform gradient optimization directly on the latent states ($z_t$), CRFM focuses on rectifying the underlying velocity vector field. The authors experimentally verified that directly optimizing latent states leads to severe mode collapse, whereas correcting the velocity field provides stable, continuous corrections along the trajectory.
  • Timing Matters in Sampling: Trajectory corrections are only effective during the early stages of sampling when the image structure is highly plastic. Applying corrections too late in the trajectory amplifies the inherent prediction errors of the pre-trained segmentation model, generating adversarial-like artifacts that degrade image quality (as reflected by worsening FID scores).

Key Results

TODSynth consistently outperformed state-of-the-art controllable generation methods (including ControlNet, Freestyle, FreeMask, and SynthEarth) across both datasets:

  • FUSU-4k: Compared to a fully supervised baseline trained only on real data, adding TODSynth data improved Overall Accuracy (OA) by 1.39%, mean Intersection over Union (mIoU) by 4.14%, and mean Accuracy (mAcc) by 6.83%.
  • LoveDA: TODSynth achieved improvements of 1.60% (OA), 2.08% (mIoU), and 2.22% (mAcc) over the baseline.
  • Data Efficiency: Remarkably, TODSynth achieved these superior results while requiring a much smaller volume of synthetic data (only 3x the real data volume, compared to the 5x or 10x volumes required by UNet-based generators like ControlNet).

Limitations and Future Work

The authors note two primary limitations:

  1. Sensitivity to Hyperparameters: CRFM is highly sensitive to the number of adjustment steps and the quality of the pre-trained segmentation model. If the pre-trained model is weak due to limited data, CRFM's effectiveness drops.
  2. Synthetic Diversity: The framework currently does not leverage a large-scale, specialized remote sensing generative foundation model, which inherently limits the stylistic and environmental diversity of the synthesized samples.

Future work will focus on integrating more robust remote sensing foundation models to improve evaluation accuracy and sampling stability.

Summary updated

BibTeX
@inproceedings{yang2026task,
  author = {Yunkai Yang and Yudong Zhang and Kunquan Zhang and Jinxiao Zhang and Xinying Chen and Haohuan Fu and Runmin Dong},
  title = {{Task-Oriented Data Synthesis and Control-Rectify Sampling for Remote Sensing Semantic Segmentation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=rhZLK2mvPx},
}
Figure