Comparison of ResNet-50 and Self-Supervised Contrastive Learning for Healthy and Rust-Affected Coffee Leaf Classification

Acce Venio Hasugian, Chaerul Anwar

Abstract


Image classification can support the identification of coffee leaf rust; however, model performance on internal test data may not necessarily generalize to independently collected images. This study compares ResNet-50 initialized with ImageNet weights against two SimCLR-based contrastive learning configurations for classifying coffee leaf images into two categories: Healthy and Rust. The cleaned secondary dataset consisted of 1,338 images, divided into 938 training images, 207 validation images, and 193 internal test images. An additional evaluation was conducted using 106 primary images labeled based on the researcher's visual assessment. On the internal test set, ResNet-50 achieved an accuracy of 96.89%, while the first and second SimCLR configurations achieved 60.10% and 91.71%, respectively. On the primary image dataset, ResNet-50 correctly classified 94 out of 106 images, achieving an accuracy of 88.68%, a Rust-class precision of 95.65%, a recall of 81.48%, and an F1-score of 88.00%. Ten images labeled as Rust were misclassified as Healthy. This study also reports a separate evaluation of YOLOv5 for object detection and presents a Gradio prototype for displaying ResNet-50 predictions. The results indicate that ResNet-50 achieved the highest performance on the internal test set among the evaluated configurations but experienced an accuracy decrease of 8.21 percentage points on the primary image dataset. This study is limited to classification into the Healthy and Rust categories and does not establish the model's ability to detect latent-stage infections. Furthermore, the labels assigned to the primary images have not been independently verified by plant pathology experts.

Keywords


coffee leaf rust; image classification; ResNet-50; self-supervised contrastive learning; transfer learning

Full Text:

PDF

References


Harmiansyah, D. Diptaningsari, N. Wardani, Meidaliyantisyah, R. Mawardi, and J. Hendra, “Intensity of Leaf Rust Disease on Four Robusta Coffee Clones in Natar, South Lampung,” in IOP Conference Series: Earth and Environmental Science, South Lampung: Institute of Physics, Dec. 2023, pp. 1–5. DOI: 10.1088/1755-1315/1230/1/012097.

D. Novtahaning, H. A. Shah, and J. M. Kang, “Deep Learning Ensemble-based Automated and High-Performing Recognition of Coffee Leaf Disease,” Agriculture (Switzerland), Vol. 12, No. 11, pp. 1–16, Nov. 2022, DOI: 10.3390/agriculture12111909.

E. Hitimana et al., “An Intelligent System-based Coffee Plant Leaf Disease Recognition using Deep Learning Techniques on Rwandan Arabica Dataset,” Technologies (Basel)., Vol. 11, No. 5, Oct. 2023, DOI: 10.3390/technologies11050116.

Y. Panca Putra, A. Susanto, and W. Novrian, “Penerapan Jaringan Syaraf Konvolusional untuk Deteksi Penyakit Tanaman Kopi berdasarkan Citra Daun,” Jurnal Pustaka AI (Pusat Akses Kajian Teknologi Artificial Intelligence), Vol. 5, No. 3, pp. 507–513, Dec. 2025, DOI: 10.55382/jurnalpustakaai.v5i3.1123.

N. Baht, E. Dominguez, and S. Aljumaili, “Detection of Coffee Leaf Disease and Identification using Deep Learning,” PeerJ Comput. SCI., Vol. 11, pp. 1–25, Oct. 2025, DOI: 10.7717/peerj-cs.3172.

O. Adelaja and B. Pranggono, “Leveraging Deep Learning for Real-Time Coffee Leaf Disease Identification,” AgriEngineering, Vol. 7, No. 1, Jan. 2025, DOI: 10.3390/agriengineering7010013.

J. V. Y. Bordin Yamashita and J. P. R. R. Leite, “Coffee Disease Classification at the Edge using Deep Learning,” Smart Agricultural Technology, Vol. 4, Aug. 2023, DOI: 10.1016/j.atech.2023.100183.

R. T. Araaf, A. Minn, and T. Ahamed, “Coffee Leaf Rust Disease Detection and Implementation of an Edge Device for Pruning Infected Leaves via Deep Learning Algorithms,” Sensors, Vol. 24, No. 24, pp. 1–20, Dec. 2024, DOI: 10.3390/s24248018.

C. E. S. E. Silva, J. B. Fragoso, T. Paixao, A. B. Alvarez, and F. Palomino-Quispe, “A Low Computational Cost Deep Learning Approach for Localization and Classification of Diseases and Pests in Coffee Leaves,” IEEE Access, Vol. 13, pp. 71943–71964, 2025, DOI: 10.1109/ACCESS.2025.3562832.

J. Fragoso et al., “Coffee-Leaf Diseases and Pests Detection based on YOLO Models,” Applied Sciences (Switzerland), Vol. 15, No. 9, May 2025, DOI: 10.3390/app15095040.

T. Chen, S. Kornblith, M. Norouzi, and G. Hinton, “A Simple Framework for Contrastive Learning of Visual Representations,” pp. 1597–1607, Jul. 2020, [Online]. Available: http://arxiv.org/abs/2002.05709

J. Parraga-Alava, K. Cusme, A. Elica Loor, and E. Santander, “RoCoLe: A Robusta Coffee Leaf Images Dataset for Evaluation of Machine Learning based Methods in Plant Diseases Recognition,” 2019, DOI: 10.17632/c5yvn32dzg.2.

K. He, X. Zhang, S. Ren, and J. Sun, “Deep Residual Learning for Image Recognition.” [Online]. Available: http://image-net.org/challenges/LSVRC/2015/

N. Mansouri, H. Guesmi, and A. Alkhalil, “A Deep Learning Model for Detection and Classification of Coffee-Leaf Diseases using the Transfer-Learning Technique,” International Journal of Advances in Intelligent Informatics, Vol. 10, No. 3, pp. 379–396, Aug. 2024, DOI: 10.26555/ijain.v10i3.1573.

A. Chavarro, D. Renza, and E. Moya-Albor, “ConvNext as a Basis for Interpretability in Coffee Leaf Rust Classification,” Mathematics, Vol. 12, No. 17, Sep. 2024, DOI: 10.3390/math12172668.

Y. Wang et al., “Classification of Plant Leaf Disease Recognition based on Self-Supervised Learning,” Agronomy, Vol. 14, No. 3, Mar. 2024, DOI: 10.3390/agronomy14030500.

X. Huan, B. Chen, and H. Zhou, “A Unified Self-Supervised Framework for Plant Disease Detection on Laboratory and In-Field Images,” Electronics (Switzerland), Vol. 14, No. 17, Sep. 2025, DOI: 10.3390/electronics14173410.

S. S. A. Shah et al., “PlantCLR: Contrastive Self-Supervised Pretraining for Generalizable Plant Disease Detection,” SCI. Rep., Vol. 16, No. 1, Dec. 2026, DOI: 10.1038/s41598-026-45684-x.




DOI: https://doi.org/10.32520/stmsi.v15i11.7022

Article Metrics

Abstract view : 0 times
PDF - 0 times

Refbacks

  • There are currently no refbacks.


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.