Preprint
Article

This version is not peer-reviewed.

Semantic Segmentation for Leaf-Level Severity Grading of Coffee Leaf Rust and American Leaf Spot on Flatbed Scans

Submitted:

13 November 2026

Posted:

16 November 2026

You are already at the latest version

Abstract
Visual severity assessment of coffee leaf rust (Hemileia vastatrix) and American leaf spot (Mycena citricolor) is subjective. We trained DeepLabV3+, UNet++ and SegFormer-B5 per disease to segment lesions on flatbed scans of 684 detached Coffea arabica var. Esperanza L4A5 leaves (one site per disease; semi-automatic detector-plus-SAM 2 rust and hand-corrected leaf-spot masks) and graded severity (G0–G3). Under matched training (three seeds each), UNet++ and SegFormer-B5 were equivalent within post hoc margins in leaf-spot lesion intersection over union (IoU; 0.878 ± 0.004 vs. 0.888 ± 0.001) and mean absolute error; for rust (0.759 ± 0.015 vs. 0.769 ± 0.005), IoU equivalence held only with seeds averaged. DeepLabV3+ was lower. Against five experts, SegFormer-B5 agreed more closely than the average expert for leaf spot (quadratic-weighted kappa 0.88 vs. 0.80; Holm-adjusted p = 0.048 across ten model–panel contrasts) but not for rust. A validation-tuned color threshold, competitive for leaf spot, flagged 12 of 21 healthy leaves as rust (≥0.5%, abaxial face), the networks none; healthy leaves came only from the leaf-spot site. A validation-calibrated probability threshold reduced rust over-estimation relative to the reference (SegFormer-B5 bias +0.99 to +0.12 percentage points). On flatbed scans, a compact matched-trained UNet++ rivals SegFormer-B5; field photographs remain untested.
Keywords: 
;  ;  ;  ;  ;  ;  ;  
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.