Therefore, we used a community-provided segmentation subset from Kaggle 1 , which we refer to as PlantDoc-Seg in this study. This subset is derived from PlantDoc and contains 588 diseased leaf images with corresponding binary masks, enabling supervised leaf disease segmentation.
Open resource ↗Kaggle · lines:48-115Paper record
ReLeaf-SAM: reliability-guided detail compensation for SAM-based plant disease segmentation
Frontiers in Plant Science · 8 Jul 2026 · 10.3389/fpls.2026.1865649
Abstract
Accurate lesion segmentation is essential for automated plant disease analysis in precision agriculture. Although the Segment Anything Model (SAM) exhibits strong generalization ability, its direct application to plant disease images in natural field environments remains challenging due to cluttered backgrounds, dense leaf veins, uneven illumination, and frequent occlusions. In particular, SAM mainly relies on global structural cues and is often insufficiently sensitive to subtle lesion textures and weak local details, which can result in missed small or early-stage lesions and inaccurate boundary delineation. To address these limitations, we enhance SAM with a disease-specific detail compensation module for plant disease lesion segmentation. A ResNet-50based branch is employed to extract fine-grained local texture features that are difficult for SAM to capture. These fine-grained features are fused with SAM encoder representations and then injected into the SAM decoder, enabling more accurate lesion prediction while preserving SAM’s strong global modeling capability. More importantly, we propose a reliability-guided variational fusion framework to further improve the interaction between heterogeneous features. Specifically, instead of conventional similarity or addition-based fusion, we introduce an uncertainty-aware variational fusion strategy that explicitly quantifies the confidence of each feature stream. An uncertainty encoder models feature distributions probabilistically, and a variational fusion module dynamically assigns higher weights to more reliable features while suppressing uncertain or interfering responses. In addition, Kullback-Leibler divergence regularization is introduced to stabilize cross-feature alignment and improve fusion robustness. Extensive experiments on PlantSeg, PlantDoc-Seg, and ATLDSD demonstrate that the proposed method outperforms state-of-theart approaches, achieving DSC scores of 81.05%, 91.12%, and 88.27%, respectively. The proposed method addresses SAM’s weakness in fine-grained disease feature extraction, accurately identifies early and small lesions, and delivers reliable segmentation for field plant disease automatic diagnosis.
Code and data availability