Selective Class-Conditional Ensemble Learning for Coffee Leaf Disease Classification Using CNN and Transformer-Based Models
Abstract
Coffee is one of the most economically significant crops in the world. However, this plant suffers some diseases that reduce yield quality and quantity. Therefore, early detection of these diseases is important for crop management and preventing economic losses. Although convolutional neural networks (CNNs) have reached satisfactory performance in plant disease detection, their reliance on local receptive fields limits their capacity to capture global spatial relationships within leaf images. Therefore, in this study we employ ensemble model using CNN and transformers. For this purpose, five deep learning models, including VGG16, ResNet50, and EfficientNetB0, Vision Transformer (ViT), and Swin Transformer-Tiny (Swin-T), were evaluated for coffee leaf disease classification. In addition to analyzing individual models, two ensemble strategies, soft voting and class-conditional fusion, were employed for classification. Then, in order to avoid performance degradation caused by weak models, ensemble construction was further optimized by top-𝐾 model selection strategy. By this way, only the best subset of models ranked by validation accuracy was included in the fusion process. Grid-search optimization was conducted to determine the most effective ensemble composition and parameter settings. Experimental results showed that the optimal class-conditional ensemble, constructed with K = 3 models (VGG16, EfficientNet-B0, and Swin-T) and a boost factor of 0.5, achieved the best overall performance with 99.60% accuracy, 99.59% F1-score, 99.59% precision, and 99.60% recall. These findings indicate that class conditional selective fusion can exploit complementary strengths across heterogeneous architectures more effectively than conventional soft voting ensembles. The results demonstrate that a selective top-𝐾 class-conditional ensemble framework provides an effective solution for coffee leaf disease classification.
Keywords
References
- J. G. A. Barbedo, “A review on the main challenges in automatic plant disease identification based on visible range images”, Biosyst. Eng., vol. 144, pp. 52–60, Apr. 2016, doi: 10.1016/j.biosystemseng.2016.01.017.
- J. Parraga-Alava, K. Cusme, A. Loor, and E. Santander, “RoCoLe: A robusta coffee leaf images dataset for evaluation of machine learning based methods in plant diseases recognition”, Data Brief, vol. 25, p. 104414, Aug. 2019, doi: 10.1016/j.dib.2019.104414.
- M. I. Rosadi, L. Hakim, ve M. Faishol A., “Classification of Coffee Leaf Diseases using the Convolutional Neural Network (CNN) EfficientNet Model”, Conf. Ser., vol. 4, no. 1, pp. 58–69, Dec. 2023, doi: 10.34306/conferenceseries.v4i1.627.
- J. V. Y. Bordin Yamashita and J. P. R. R. Leite, “Coffee disease classification at the edge using deep learning”, Smart Agric. Technol., vol. 4, p. 100183, Aug. 2023, doi: 10.1016/j.atech.2023.100183.
- M. K. Singh and A. Kumar, “Coffee Leaf Disease Classification by Using a Hybrid Deep Convolution Neural Network”, SN Comput. Sci., vol. 5, no. 5, p. 618, Jun. 2024, doi: 10.1007/s42979-024-02960-9.
- K. Simonyan and A. Zisserman, “Very Deep Convolutional Networks for Large-Scale Image Recognition”, Apr. 10, 2015, arXiv:1409.1556. doi: 10.48550/arXiv.1409.1556.
- K. He, X. Zhang, S. Ren, and J. Sun, “Deep Residual Learning for Image Recognition”, in 2016 IEEE Conf. Comput. Vis. Pattern Recognit. (CVPR), Las Vegas, NV, USA: IEEE, Jun. 2016, pp. 770–778. doi: 10.1109/CVPR.2016.90.
- M. Tan and Q. V. Le, “EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks”, in Proc. 36th Int. Conf. Mach. Learn. (ICML), vol. 97, 2019, pp. 6105–6114.
Details
Primary Language
English
Subjects
Deep Learning
Journal Section
Research Article
Authors
Publication Date
June 19, 2026
Submission Date
April 9, 2026
Acceptance Date
June 7, 2026
Published in Issue
Year 2026 Volume: 10 Number: 1