AgriUFM: Unconditional-Flow-Matching-Based Generative Model for Creating Image–Mask Pairs of Agricultural Pests and Disease
Haocheng Kong, Lei Liu, Haotian Bai, Xiaoyu Li, Yuefeng DuPests and diseases are key biological stress factors affecting crop yield and quality. Semantic segmentation enables pixel-level localization and severity characterization, but its performance and generalization are constrained by the high cost of high-quality pixel-level annotations, limited labeled samples, and class imbalance in agricultural datasets. We propose AgriUFM, an unconditional flow-matching framework for joint image–mask generation in agricultural pest and disease scenarios. By learning a unified continuous probability flow over the joint distribution, the framework is designed to promote structural co-evolution and spatial consistency between generated RGB images and masks. Across four evaluated datasets, AgriUFM achieved lower FID and rFID than the evaluated GAN- and diffusion-based comparators, whereas IS performance was dataset-dependent. Within the evaluated ablation configurations, uniform time sampling with 25 sampling steps and the midpoint ODE solver yielded the most favourable observed quality–efficiency trade-off. Under the held-out test protocol, the joint UFM strategy achieved higher image–mask correspondence than the M2I and I2M conditional variants. In the evaluated downstream settings, AgriUFM-generated augmentation improved MIoU and PA for U-Net and TransUNet. These results indicate that joint distribution modelling is a promising approach for structurally coherent generative augmentation in the agricultural imaging tasks studied.