A Self-Prompted YOLOv11–SAM 2 Pipeline for Automatic Plant Disease Detection and Segmentation
Received: 11 November 2025 | Revised: 25 November 2025 and 4 December 2025 | Accepted: 7 December 2025 | Online: 9 February 2026
Corresponding author: Balkis Tej
Abstract
Plant disease detection and segmentation are essential to maintaining healthy crops and improving agricultural productivity. Using Artificial Intelligence (AI) for this task enables farmers and researchers to identify diseases early and take preventive action. However, accurately segmenting diseased regions remains challenging, as most methods require a large number of labeled images or manual guidance to train the model. This limits their scalability and practical use in real-world agricultural settings. To address this issue, we propose the YOLO_SAM model for plant disease detection and segmentation, using self-prompted mask generation. Experiments were conducted on a self-generated dataset containing samples of different leaf diseases. The YOLO11 model was first used to detect infected regions, and its bounding boxes were automatically passed to the Segment Anything Model (SAM), which generated detailed segmentation masks without manual input. Experimental results showed that YOLOv11s achieved the best performance with a mean Average Precision (mAP) of 0.845, outperforming YOLOv11n (0.825), YOLOv11l (0.807), and YOLOv11m (0.764). Based on this superior performance, YOLOv11s was chosen as the prompt generator for SAM2, enabling more accurate and reliable segmentation of disease regions. This combined approach enabled the model to generate precise lesion masks without manual prompting, allowing clear boundary extraction even for small or irregular disease spots.
Keywords:
plant disease detection, segmentation, YOLOv11, segment anything modelDownloads
References
Z. Ge, X. Fan, J. Zhang, and S. Jin, "SegPPD-FS: Segmenting plant pests and diseases in the wild using few-shot learning," Plant Phenomics, vol. 7, no. 4, Dec. 2025, Art. no. 100121. DOI: https://doi.org/10.1016/j.plaphe.2025.100121
S. Savary, L. Willocquet, S. J. Pethybridge, P. Esker, N. McRoberts, and A. Nelson, "The global burden of pathogens and pests on major food crops," Nature Ecology & Evolution, vol. 3, no. 3, pp. 430–439, Mar. 2019. DOI: https://doi.org/10.1038/s41559-018-0793-y
B. Tej, S. Bouaafia, M. A. Hajjaji, and A. Mtibaa, "AI-based smart agriculture 4.0 system for plant diseases detection in Tunisia," Signal, Image and Video Processing, vol. 18, no. 1, pp. 97–111, Aug. 2024. DOI: https://doi.org/10.1007/s11760-024-03134-z
S. Zhang and C. Zhang, "Modified U-Net for plant diseased leaf image segmentation," Computers and Electronics in Agriculture, vol. 204, Jan. 2023, Art. no. 107511. DOI: https://doi.org/10.1016/j.compag.2022.107511
Y. Alhwaiti, M. Khan, M. Asim, M. H. Siddiqi, M. Ishaq, and M. Alruwaili, "Leveraging YOLO deep learning models to enhance plant disease identification," Scientific Reports, vol. 15, no. 1, Mar. 2025, Art. no. 7969. DOI: https://doi.org/10.1038/s41598-025-92143-0
Y. Meng, J. Zhan, K. Li, F. Yan, and L. Zhang, "A rapid and precise algorithm for maize leaf disease detection based on YOLO MSM," Scientific Reports, vol. 15, no. 1, Feb. 2025, Art. no. 6016. DOI: https://doi.org/10.1038/s41598-025-88399-1
M. Shoaib et al., "Deep learning-based segmentation and classification of leaf images for detection of tomato plant disease," Frontiers in Plant Science, vol. 13, Oct. 2022, Art. no. 1031748. DOI: https://doi.org/10.3389/fpls.2022.1031748
O. Ronneberger, P. Fischer, and T. Brox, "U-Net: Convolutional Networks for Biomedical Image Segmentation," in Medical Image Computing and Computer-Assisted Intervention – MICCAI 2015, Cham, 2015, pp. 234–241. DOI: https://doi.org/10.1007/978-3-319-24574-4_28
L.-C. Chen, Y. Zhu, G. Papandreou, F. Schroff, and H. Adam, "Encoder-Decoder with Atrous Separable Convolution for Semantic Image Segmentation." arXiv, Aug. 22, 2018. DOI: https://doi.org/10.1007/978-3-030-01234-2_49
J. Li, Q. Feng, J. Zhang, and S. Yang, "EMSAM: enhanced multi-scale segment anything model for leaf disease segmentation," Frontiers in Plant Science, vol. 16, Mar. 2025, Art. no. 1564079. DOI: https://doi.org/10.3389/fpls.2025.1564079
F. Alfiaturrohmah and S. Sudianto, "A Segment Anything Model for Melon Pruning Based on Diameter," Engineering, Technology & Applied Science Research, vol. 15, no. 5, pp. 26632–26639, Oct. 2025. DOI: https://doi.org/10.48084/etasr.12207
B. Zhao et al., "Sparse-MoE-SAM: A Lightweight Framework Integrating MoE and SAM with a Sparse Attention Mechanism for Plant Disease Segmentation in Resource-Constrained Environments," Plants, vol. 14, no. 17, Aug. 2025, Art. no. 2634. DOI: https://doi.org/10.3390/plants14172634
E. Moupojou, F. Retraint, H. Tapamo, M. Nkenlifack, C. Kacfah, and A. Tagne, "Segment Anything Model and Fully Convolutional Data Description for Plant Multi-Disease Detection on Field Images," IEEE Access, vol. 12, pp. 102592–102605, 2024. DOI: https://doi.org/10.1109/ACCESS.2024.3433495
R.-W. Bello, P. A. Owolawi, E. A. V. Wyk, and C. Tu, "SAM-IE: SAM-enabled image enhancement for segmentation of infected cucumber leaves," International Journal of Innovative Research and Scientific Studies, vol. 8, no. 2, pp. 824–832, Mar. 2025. DOI: https://doi.org/10.53894/ijirss.v8i2.5328
S. U. Islam, G. Ferraioli, and V. Pascazio, "Tomato Leaf Detection, Segmentation, and Extraction in Real-Time Environment for Accurate Disease Detection," AgriEngineering, vol. 7, no. 4, Apr. 2025. DOI: https://doi.org/10.3390/agriengineering7040120
R. Kaur et al., "YOLO-LeafNet: a robust deep learning framework for multispecies plant disease detection with data augmentation," Scientific Reports, vol. 15, no. 1, Aug. 2025, Art. no. 28513. DOI: https://doi.org/10.1038/s41598-025-14021-z
J. Reddy et al., "Cotton Yield Prediction via UAV-Based Cotton Boll Image Segmentation Using YOLO Model and Segment Anything Model (SAM)," Remote Sensing, vol. 16, no. 23, Jan. 2024, Art. no. 4346. DOI: https://doi.org/10.3390/rs16234346
"Leaf_disease_dataset Object Detection Model by balkis," Roboflow.
X. Zhang, R. Liu, R. Liu, D. Yang, and J. Yang, "A non-contact rabbit temperature detection model based on improved YOLO11," Smart Agricultural Technology, vol. 12, Dec. 2025, Art. no. 101350. DOI: https://doi.org/10.1016/j.atech.2025.101350
S. Teboulbi, S. Messaoud, M. A. Hajjaji, M. Atri, and A. Mtibaa, "Fine Tuned YOLOv11-Based Road Sign Detection," Engineering, Technology & Applied Science Research, vol. 15, no. 4, pp. 24950–24956, Aug. 2025. DOI: https://doi.org/10.48084/etasr.11529
J. Meng et al., "P-YOLO11: An improved lightweight model for accurate detection of declining trees in poplar plantations," Smart Agricultural Technology, vol. 12, Dec. 2025, Art. no. 101454. DOI: https://doi.org/10.1016/j.atech.2025.101454
N. Ravi et al., "SAM 2: Segment Anything in Images and Videos." arXiv, Oct. 28, 2024.
Ultralytics, "SAM 2: Segment Anything Model 2." https://docs.ultralytics.com/models/sam-2/.
J. He, Y. Ren, W. Li, and W. Fu, "YOLOv11-RCDWD: A New Efficient Model for Detecting Maize Leaf Diseases Based on the Improved YOLOv11," Applied Sciences, vol. 15, no. 8, Jan. 2025, Art. no. 4535. DOI: https://doi.org/10.3390/app15084535
Downloads
How to Cite
License
Copyright (c) 2026 Balkis Tej, Soulef Bouaafia, Mohamed Ali Hajjaji, Abdellatif Mtibaa

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain the copyright and grant the journal the right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) after its publication in ETASR with an acknowledgement of its initial publication in this journal.
