acceptodds
Under review as a conference paper at ICLR 2027

FMS: Unified Flow Matching for Segmentation and Synthesis of Thin Structures

Abstract

Segmenting thin structures such as infrastructure cracks and anatomical vessels is hampered by fragile connectivity, expensive annotations, and poor cross-domain generalization. We propose FMS, a flow-matching framework that addresses all three with two modules, SegFlow for imagemask segmentation and SynFlow for maskimage synthesis. SegFlow is an encoder–decoder that casts segmentation as deterministic transport, regressing a velocity field on interpolated image–mask states and integrating from the image itself. Two exact identities describe this sampler: the velocity objective is equivalent to time-weighted endpoint regression on interpolated reference states, and the -step output equals the one-step prediction plus a sum of signed corrections. Together with margin and residual assumptions, these identities characterize possible pixel-label changes and give sufficient conditions for reconnecting two components or recovering the decoded binary mask exactly. SynFlow renders mask-conditioned images using multi-scale mask injection and boundary gating, while class-conditional mask generation and controlled propagation vary sparsity, width, and branching. The same endpoint view applies to SynFlow, where extrapolation drifts by time-weighted trajectory acceleration, giving a conditional stability criterion for a fixed structural image readout already aligned with the conditioning mask. Across five crack and vessel benchmarks, SegFlow improves both overlap and topological metrics over nine baselines: mean IoU versus (+10.1%) and Betti matching error versus (-30.2%), each against the strongest baseline on that metric. Synthetic augmentation improves SegFlow when it receives 25% of the real training labels, recovering most of the full-label performance on two crack subsets and increasing source-only cross-domain IoU by on average. We release code, model checkpoints, and 10k crack and 1k vessel image–mask pairs.

Then back it, or bet against it.

Related papers

Open the market on this paper to see 7 more related papers.