Automatic detection of coffee leaf diseases through pattern recognition
DOI:
https://doi.org/10.51252/rcsi.v6i1.1349Keywords:
computer vision, transfer learning, supervised classification, performance metrics, diagnostic validationAbstract
Early detection of coffee leaf diseases is essential to reduce production losses; however, visual field diagnosis presents limitations associated with subjectivity and environmental variability. The objective of this study was to design and evaluate a hybrid pattern-recognition model to classify healthy coffee leaves and those affected by coffee leaf rust and brown eye spot using images captured under real field conditions in Saposoa (San Martín, Peru). A proprietary dataset of 1,500 images validated by a specialist (500 per class) was used and expanded through controlled data augmentation to 6,000 balanced images. ResNet18 was employed as a feature extractor using transfer learning, and three supervised classifiers were compared: SVM, Random Forest, and XGBoost. Model performance was evaluated using 10-fold stratified cross-validation and an independent test set (20%). The ResNet18 + SVM model achieved the best performance, with an accuracy of 0.9742, a macro F1-score of 0.9730, and a macro-AUC of 0.9968, outperforming Random Forest (accuracy = 0.9367) and XGBoost (accuracy = 0.9583). Inferential analysis using ANOVA and Tukey’s HSD test confirmed statistically significant differences among models (p < 0.001). The results demonstrate the robustness and feasibility of the proposed approach to support coffee phytosanitary diagnosis under real-world field conditions.
Downloads
References
Abade, A. S., Ferreira, P. A., & Vidal, F. de B. (2020). Plant Diseases recognition on images using Convolutional Neural Networks: A Systematic Review. Cornell University. https://doi.org/https://doi.org/10.48550/arXiv.2009.04365
Abdullah, H. M., Mohana, N. T., Khan, B. M., Ahmed, S. M., Hossain, M., Islam, K. S., Redoy, M. H., Ferdush, J., Bhuiyan, M. A. H. B., Hossain, M. M., & Ahamed, T. (2023). Present and future scopes and challenges of plant pest and disease (P&D) monitoring: Remote sensing, image processing, and artificial intelligence perspectives. Remote Sensing Applications: Society and Environment, 32, 100996. https://doi.org/10.1016/j.rsase.2023.100996
Abuhayi, B. M., & Mossa, A. A. (2023). Coffee disease classification using Convolutional Neural Network based on feature concatenation. Informatics in Medicine Unlocked, 39, 101245. https://doi.org/10.1016/j.imu.2023.101245
Adelaja, O., & Pranggono, B. (2025). Leveraging Deep Learning for Real-Time Coffee Leaf Disease Identification. AgriEngineering, 7(1), 13. https://doi.org/10.3390/agriengineering7010013
Archana, R., & Jeevaraj, P. S. E. (2024). Deep learning models for digital image processing: a review. Artificial Intelligence Review, 57(1), 11. https://doi.org/10.1007/s10462-023-10631-z
Arif, A., Putrawansyah, F., & Jangcik, I. (2025). Detection of Coffee Leaf Diseases Using Lightweight Deep Learning: A Comparative Study of EfficientNet-B0 and Vision Transformer. Ingénierie Des Systèmes d Information, 30(9), 2393–2404. https://doi.org/10.18280/isi.300915
Atila, Ü., Uçar, M., Akyol, K., & Uçar, E. (2021). Plant leaf disease classification using EfficientNet deep learning model. Ecological Informatics, 61, 101182. https://doi.org/10.1016/j.ecoinf.2020.101182
Aufar, Y., & Kaloka, T. P. (2022). Robusta coffee leaf diseases detection based on MobileNetV2 model. International Journal of Electrical and Computer Engineering (IJECE), 12(6), 6675. https://doi.org/10.11591/ijece.v12i6.pp6675-6683
Avelino, J., Cristancho, M., Georgiou, S., Imbach, P., Aguilar, L., Bornemann, G., Läderach, P., Anzueto, F., Hruska, A. J., & Morales, C. (2015). The coffee rust crises in Colombia and Central America (2008–2013): impacts, plausible causes and proposed solutions. Food Security, 7(2), 303–321. https://doi.org/10.1007/s12571-015-0446-9
Ayikpa, K. J., Ayikpa, K. J., Ayikpa, K. J., Mamadou, D., Gouton, P., & Adou, K. J. (2022). Experimental Evaluation of Coffee Leaf Disease Classification and Recognition Based on Machine Learning and Deep Learning Algorithms. Journal of Computer Science, 18(12), 1201–1212. https://doi.org/10.3844/jcssp.2022.1201.1212
Chavarro, A. F., Renza, D., & Ballesteros, D. M. (2023). Influence of Hyperparameters in Deep Learning Models for Coffee Rust Detection. Applied Sciences, 13(7), 4565. https://doi.org/10.3390/app13074565
Ehrenbergerová, L., Kučera, A., Cienciala, E., Trochta, J., & Volařík, D. (2018). Identifying key factors affecting coffee leaf rust incidence in agroforestry plantations in Peru. Agroforestry Systems, 92(6), 1551–1565. https://doi.org/10.1007/s10457-017-0101-x
Fragoso, J., Silva, C., Paixão, T., Alvarez, A. B., Júnior, O. C., Florez, R., Palomino-Quispe, F., Savian, L. G., & Trazzi, P. A. (2025). Coffee-Leaf Diseases and Pests Detection Based on YOLO Models. Applied Sciences, 15(9), 5040. https://doi.org/10.3390/app15095040
Julca-Otiniano, A., Alvarado-Huamán, L., Castro-Cepero, V., Borjas-Ventura, R., Gómez-Pando, L., Pereira, A. P., Nielen, S., Ingelbrecht, I., Silva, M. do C., & Várzea, V. (2024). New Races of Hemileia vastatrix Detected in Peruvian Coffee Fields. Agronomy, 14(8), 1811. https://doi.org/10.3390/agronomy14081811
Mansouri, N., Guessmi, H., & Alkhalil, A. (2024). A deep learning model for detection and classification of coffee-leaf diseases using the transfer-learning technique. International Journal of Advances in Intelligent Informatics, 10(3), 379. https://doi.org/10.26555/ijain.v10i3.1573
Martinez, F., Montiel, H., & Martinez, F. (2022). A Machine Learning Model for the Diagnosis of Coffee Diseases. International Journal of Advanced Computer Science and Applications, 13(4). https://doi.org/10.14569/IJACSA.2022.01304110
Novtahaning, D., Shah, H. A., & Kang, J.-M. (2022). Deep Learning Ensemble-Based Automated and High-Performing Recognition of Coffee Leaf Disease. Agriculture, 12(11), 1909. https://doi.org/10.3390/agriculture12111909
Pham, T. C., Nguyen, V. D., Le, C. H., Packianather, M., & Hoang, V.-D. (2023). Artificial intelligence-based solutions for coffee leaf disease classification. IOP Conference Series: Earth and Environmental Science, 1278(1), 012004. https://doi.org/10.1088/1755-1315/1278/1/012004
Poma-Angamarca, R. A., Rojas, J. R., Sánchez-Rodríguez, A., & Ruiz-González, M. X. (2024). Diversity of Leaf Fungal Endophytes from Two Coffea arabica Varieties and Antagonism towards Coffee Leaf Rust. Plants, 13(6), 814. https://doi.org/10.3390/plants13060814
Saavedra-Ramírez, J. (2023). Impacto social de los Proyectos de Extensión Agraria durante el 2005 al 2010 en San Martín y Amazonas, Perú. Revista Amazónica de Ciencias Económicas, 2(1), e433. https://doi.org/10.51252/race.v2i1.433
Siddiqua, A., Kabir, M. A., Ferdous, T., Ali, I. B., & Weston, L. A. (2022). Evaluating Plant Disease Detection Mobile Applications: Quality and Limitations. Agronomy, 12(8), 1869. https://doi.org/10.3390/agronomy12081869
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 John C. Santa-María, Ciro Rodríguez

This work is licensed under a Creative Commons Attribution 4.0 International License.
The authors retain their rights:
a. The authors retain their trademark and patent rights, as well as any process or procedure described in the article.
b. The authors retain the right to share, copy, distribute, execute and publicly communicate the article published in the Revista Científica de Sistemas e Informática (RCSI) (for example, place it in an institutional repository or publish it in a book), with an acknowledgment of its initial publication in the RCSI.
c. Authors retain the right to make a subsequent publication of their work, to use the article or any part of it (for example: a compilation of their works, notes for conferences, thesis, or for a book), provided that they indicate the source of publication (authors of the work, journal, volume, number and date).





