A Comparative Study of Convolutional Neural Networks and Vision Transformers for Sugarcane Leaf Disease Classification in Real-World Environments
Main Article Content
Abstract
This study aimed to investigate and compare the performance of two deep learning architecture groups, namely Convolutional Neural Networks (ResNet-50 and DenseNet-121) and Vision Transformers (ViT-Base and Swin-Tiny), for classifying four types of sugarcane leaf conditions, namely healthy leaves, red wilt, ring spot, and rust, under real-world field conditions. The dataset comprised 4,000 high-resolution sugarcane leaf images, balanced across four classes with 1,000 images per class, and was partitioned into training, validation, and testing sets at a ratio of 80:10:10. All models were trained from scratch on an NVIDIA Tesla T4 GPU using PyTorch 1.12 under identical hyperparameter settings, including a batch size of 16, 15 epochs, and the Adam optimizer with a learning rate of 0.001. Experimental results demonstrated that DenseNet-121 achieved the highest performance across all evaluation metrics, with an overall accuracy of 99.25%, and Precision, Recall, and F1-Score values of 0.9926, 0.9925, and 0.9925, respectively, while requiring the shortest training time of only 10 minutes and 56 seconds. ResNet-50 and Swin-Tiny followed with accuracies of 99.00% and 98.50%, respectively, whereas ViT-Base achieved the lowest accuracy of 97.00%. These findings indicate that CNN architectures are more suitable than Vision Transformer architectures for limited datasets because their inherent inductive bias is better suited for extracting discriminative features from small disease lesions. The findings of this study provide a practical foundation for developing automated plant disease diagnosis systems on mobile devices to support smart agriculture.
Article Details

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
The articles published are the opinion of the author only. The author is responsible for any legal consequences. That may arise from that article.
References
[1] J. Mauya, R. Amin, M. I. Hossain, S. Ruhi, and M. S. Reza, “Improved multiscale attention based deep learning approach for automated sugarcane leaf disease detection using BSRI data,” Scientific Reports, vol. 15, no. 1, Dec. 2025, Art. no. 45474, doi: 10.1038/s41598-025-28947-x.
[2] M. H. Saleem, J. Potgieter, and K. M. Arif, “Plant disease detection and classification by deep learning,”Plants (Basel, Switzerland), vol. 8, no. 11, Oct. 2019, Art. no. 468, doi: 10.3390/plants8110468.
[3] L. Chen, Y. Yuan, and H. He, “Image recognition for crop diseases using a novel multi-attention module,”International Journal of Agricultural and Biological Engineering, vol. 18, no. 1, pp. 238–244, Mar. 2025, doi: 10.25165/j.ijabe.20251801. 8136.
[4] I. Pacal, I. Kunduracioğlu, M. H. Alma, M. Deveci, S. Kadry, J. Nedoma, V. Slaný, and R. Martinek, “A systematic review of deep learning techniques for plant diseases,” Artificial Intelligence Review, vol. 57, no. 11, Sep. 2024, Art. no. 304, doi: 10.1007 /s10462-024-10944-7.
[5] S. A. Upadhye, M. R. Dhanvijay, and S. M. Patil, “Sugarcane disease detection using CNN-deep learning method: An Indian perspective,”Universal Journal of Agricultural Research, vol. 11, no. 1, pp. 80–97, Feb. 2023, doi: 10.13189/ujar. 2023.110108.
[6] C. Özden, “Vision transformer and CNN-based models for image analysis of plant diseases: An approach for agricultural decision support systems,”ISPEC Journal of Agricultural Sciences, vol. 10, no. 1, pp. 109–121, Jan. 2026, doi: 10.5281/zeno do.18228928.
[7] A. Demir, F. Sarı, M. Arzu, and M. Kaya, “Artificial intelligence-aided diagnosis in agriculture: Plant disease classification with vision transformer and CNN models,” NATURENGS, vol. 6, no. 2, pp. 22–31, Dec. 2025, doi: 10.46572/naturengs.1832476.
[8] S. Baipod, C. Savithi, and J. Sriwongsa, “Applying convolutional neural networks for sugarcane leaf disease image classification and integration with LINE chatbot to support smart agriculture,” Journal of Computer and Creative Technology, vol. 3, no. 2, pp. 317–332, Dec. 2025 (in Thai), doi: 10.14456/jcct.2025.24.
[9] S. D. Daphal and S. M. Koli, “Enhanced deep learning technique for sugarcane leaf disease classification and mobile application integration,”Heliyon, vol. 10, no. 8, Apr. 2024, Art. no. e29438, doi: 10.1016 /j.heliyon.2024.e29438.
[10] K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image recognition,”in 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 2016, pp. 770–778, doi: 10.1109/ CVPR.2016.90.
[11] G. Huang, Z. Liu, L. V. D. Maaten, and K. Q. Weinberger, “Densely connected convolutional networks,”in 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 2017, pp. 4700–4708, doi: 10.1109/ CVPR.2017.243.
[12] A. Dosovitskiy, L. Beyer, A. Kolesnikov, D. Weissenborn, X. Zhai, T. Unterthiner, M. Dehghani, M. Minderer, G. Heigold, S. Gelly, J. Uszkoreit, and N. Houlsby, “An image is worth 16x16 words: Transformers for image recognition at scale,”in Proceedings of the International Conference on Learning Representations (ICLR), 2021, doi: 10.48550 /arXiv.2010.11929.
[13] Z. Liu, Y. Lin, Y. Cao, H. Hu, Y. Wei, Z. Zhang, S. Lin, and B. Guo, “Swin transformer: Hierarchical vision transformer using shifted windows,” in 2021 IEEE/CVF International Conference on Computer Vision (ICCV), Montreal, QC, Canada, 2021, pp. 10012–10022, doi: 10.1109/ICCV48922. 2021.00986.
[14] K. Weiss, T. M. Khoshgoftaar, and D. Wang, “A survey of transfer learning,”Journal of Big Data, vol. 3, no. 1, May 2016, Art. no. 9, doi: 10.1186/s40537-016-0043-6.
[15] D. P. Kingma and J. Ba, “Adam: A method for stochastic optimization,”International Conference on Learning Representation, May 2015, doi: 10.48550/arXiv.1412.6980.
[16] M. Sokolova and G. Lapalme, “A systematic analysis of performance measures for classification tasks,” Information Processing & Management, vol. 45, no. 4, pp. 427–437, Jul. 2009, doi: 10.1016/j.ipm. 2009.03.002.
[17] M. Ali, M. Salma, M. El Haji, and B. Jamal, “Plant disease detection using vision transformers,”International Journal of Electrical and Computer Engineering (IJECE), vol. 15, no. 2, pp. 2334–2344, Apr. 2025, doi: 10.11591/ijece.v15i2.pp2334-2344.
[18] D. A. Padilla, G. V. Magwili, A. L. A. Marohom, C. M. G. Co, J. C. C. Gaño, and J. M. U. Tuazon, “Portable yellow spot disease identifier on sugarcane leaf via image processing using support vector machine,”in 2019 5th International Conference on Control, Automation and Robotics (ICCAR) 2019, pp. 901–905, doi: 10.1109/ICCAR.2019.8813495.
[19] S. Hochreiter, “The vanishing gradient problem during learning recurrent neural nets and problem solutions,” International Journal of Uncertainty, Fuzziness and Knowledge-Based Systems, vol. 6, no. 2, pp. 107–116, Apr. 1998, doi: 10.1142/S0218488598000094.