Automatic detection of coffee leaf diseases through pattern recognition

Authors

DOI:

https://doi.org/10.51252/rcsi.v6i1.1349

Keywords:

computer vision, transfer learning, supervised classification, performance metrics, diagnostic validation

Abstract

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

Download data is not yet available.

Author Biography

Ciro Rodríguez, Universidad Nacional Mayor de San Marcos

The project proposes the design and evaluation of a hybrid automatic analysis model to identify and classify diseases in coffee leaves, specifically rust (Hemileia vastatrix) and eye spot (Mycena citricolor), which severely impact the productivity and economic stability of small producers in the San Martín region. A proprietary dataset of 4,000 digital images of healthy and diseased leaves will be created, captured in the field under a standardized protocol and labeled by plant health specialists. The images will be processed through computer vision and transfer learning using ResNet50 as a feature extractor, whose representations will feed supervised classifiers such as SVM, Random Forest, and XGBoost. The performance of the hybrid model will be evaluated using metrics such as accuracy, sensitivity, specificity, and F1-score, comparing its results against expert diagnoses, with the aim of providing an objective, reproducible, and applicable tool for the phytosanitary monitoring of coffee crops.

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

Published

2026-01-20

How to Cite

Santa María, J. C., & Rodriguez, C. (2026). Automatic detection of coffee leaf diseases through pattern recognition. Revista Científica De Sistemas E Informática, 6(1), e1349. https://doi.org/10.51252/rcsi.v6i1.1349