BuildFlow: Rethinking Building Extraction From High-Resolution Remote Sensing Images as Deterministic Continuous Evolution
Abstract
Extracting precise building contours from high-resolution remote sensing images (RSIs) is crucial for understanding urban complexity and economic development. Existing methods struggle to balance pixel-wise accuracy with geometric regularity, particularly under complex backgrounds and shadow occlusion. Revisiting this task via input-conditioned continuous transport, our empirical analysis reveals that the image-to-mask transformation is a staged process—texture suppression followed by boundary recovery—where spatial uncertainty progressively concentrates from global regions to local boundaries. Motivated by these observations, we propose BuildFlow, a deterministic conditional flow-matching (CFM) framework for building extraction. BuildFlow learns an image-conditioned continuous velocity field in the latent space, progressively evolving the encoded input image toward the target mask via an ordinary differential equation (ODE). To adapt to the observed evolution stages and shifting uncertainty, BuildFlow incorporates three tailored designs. Anchor-based alignment establishes initial global structures during the early texture suppression phase. Source feature injection (SI) prevents late-stage semantic drift to resolve local boundary uncertainty and aid precise boundary recovery. Additionally, perturbation-resistant learning improves tolerance to trajectory deviations during deterministic integration. Experiments on WHU, WHU-Mix, and VHIR demonstrate that BuildFlow consistently improves pixel-domain boundary fidelity and polygon-level geometric quality while maintaining competitive region-level segmentation accuracy. On the public WHU benchmark, BuildFlow achieves relative improvements of 3.41% in boundary intersection over union (B-IoU) and 9.70% in Vertex $F1$ over the best competing result for each metric. These results show that modeling building extraction as a deterministic continuous evolution process under input conditioning is an effective way to improve contour quality in complex scenes. The code is available at https://github.com/qwerasdzxhjk/BuildFlow