Skip to main content

Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

Advertisement

Scientific Reports
  • View all journals
  • Search
  • My Account Login
  • Content Explore content
  • About the journal
  • Publish with us
  • Sign up for alerts
  • RSS feed
  1. nature
  2. scientific reports
  3. articles
  4. article
An explainable vision transformer model with transfer learning for accurate bean leaf disease classification
Download PDF
Download PDF
  • Article
  • Open access
  • Published: 24 February 2026

An explainable vision transformer model with transfer learning for accurate bean leaf disease classification

  • Saiprasad Potharaju1,
  • Arun Singh2,
  • Dalwinder Singh2,
  • Swapnali N. Tambe3,
  • Prasad MVV Kantipudi4 &
  • …
  • B. Kiranmai5 

Scientific Reports , Article number:  (2026) Cite this article

We are providing an unedited version of this manuscript to give early access to its findings. Before final publication, the manuscript will undergo further editing. Please note there may be errors present which affect the content, and all legal disclaimers apply.

Subjects

  • Computational biology and bioinformatics
  • Engineering
  • Mathematics and computing

Abstract

Early identification of bean leaf diseases, particularly Angular Leaf Spot and Bean Rust, is vital for ensuring crop productivity and global food security, especially within smallholder farming systems where disease outbreaks can rapidly escalate and cause severe yield losses. Conventional disease identification through visual inspection is labor-intensive, subjective, and highly dependent on expert knowledge, making it impractical for large-scale agricultural monitoring. Although recent deep learning-based approaches have demonstrated impressive accuracy in plant disease classification, their inherent “black-box” nature significantly limits real-world adoption, as farmers and agronomists often lack the ability to understand, trust, or act upon unexplained predictions. To address these challenges, this study proposes an automated and explainable disease diagnostic framework based on a Vision Transformer (ViT-B/16) architecture optimized through transfer learning from ImageNet. Unlike traditional convolutional neural networks that primarily focus on localized features, the Vision Transformer processes images as a sequence of flattened patches and leverages self-attention mechanisms to capture long-range dependencies and global contextual patterns across the entire leaf surface. This global representation enables the model to detect subtle and spatially distributed disease symptoms that are often overlooked by CNN-based approaches. To further enhance transparency and interpretability, GradCAM + + is integrated into the framework as an explainable artificial intelligence (XAI) mechanism. This method generates class-specific heatmaps that visually highlight the exact pathological regions influencing the model’s predictions, thereby establishing a human-interpretable validation loop for farmers, agronomists, and domain experts. The proposed framework was evaluated on the publicly available I-Bean dataset, achieving a validation accuracy of 97.52% along with strong precision, recall, and F1-score performance. The generated GradCAM + + visualizations consistently demonstrate the model’s sensitivity to true diseased regions, reinforcing both the reliability and trustworthiness of its predictions. By combining high-capacity global feature learning with visual explainability, the proposed approach offers a scalable, transparent, and practical solution for real-world precision agriculture. This framework not only enhances diagnostic accuracy but also bridges the critical gap between model performance and user trust, enabling informed decision-making and timely disease management in modern farming environments.

Data availability

[https://dx.doi.org/10.21227/4k7y-vs03]

References

  1. Wang, Y., Wang, Q., Su, Y., Jing, B. & Feng, M. Detection of kidney bean leaf spot disease based on a hybrid deep learning model. Sci. Rep. 15 (1), 11185. https://doi.org/10.1038/s41598-025-93742-7 (2025).

    Google Scholar 

  2. Karthik, R., Aswin, R., Geetha, K. S. & Suganthi, K. An explainable deep learning network with transformer and custom CNN for bean leaf disease classification. IEEE Access https://doi.org/10.1109/ACCESS.2025.3546017 (2025).

    Google Scholar 

  3. Dubey, A. K. et al. Predicting yellow mosaic disease severity in yardlong bean using visible imaging coupled with machine learning model. Sci. Rep. 15(1), 24886. https://doi.org/10.1038/s41598-025-09176-8 (2025).

    Google Scholar 

  4. Dolatabadian, A. et al. Image-based crop disease detection using machine learning. Plant Pathol. 74(1), 18–38. https://doi.org/10.1111/ppa.14006 (2025).

    Google Scholar 

  5. Bouacida, I., Farou, B., Djakhdjakha, L., Seridi, H. & Kurulay, M. Innovative deep learning approach for cross-crop plant disease detection: A generalized method for identifying unhealthy leaves. Inf. Process. Agric. 12(1), 54–67. https://doi.org/10.1016/j.inpa.2024.03.002 (2025).

    Google Scholar 

  6. Ghannam, N. E., Zein, E., Fathy, O. M., Mancy, H. & D. R., & Enhanced Detection of Bean Leaf Diseases Using a Stacked CNN Ensemble with Transfer Learning. Int. J. Intell. Eng. Syst. 18 (1). https://doi.org/10.22266/ijies2025.0229.22 (2025).

  7. Tarabye, H. H., Aboelyousr, A. G. & Ali, E. A. YOLOv5s for field plant disorders detection: Challenges and insights from a comparative analysis of green bean and faba bean. Egypt. J. Agron. 47(2), 279–291. https://doi.org/10.21608/agro.2025.313737.1496 (2025).

    Google Scholar 

  8. Chen, H. et al. YOLOv8-RBean: Runner bean leaf disease detection model based on YOLOv8. Agronomy 15(4), 944. https://doi.org/10.3390/agronomy15040944 (2025).

    Google Scholar 

  9. Tamim, M. U., Hamim, S. A., Malik, S., Mridha, M. F. & Mahmood, S. InsightNet: A deep learning framework for enhanced plant disease detection and explainable insights. Plant Direct 9(5), e70076. https://doi.org/10.1002/pld3.70076 (2025).

    Google Scholar 

  10. Raghuram, K. & Borah, M. D. A hybrid learning model for tomato plant disease detection using deep reinforcement learning with transfer learning. Procedia Comput. Sci. 252, 341–354. https://doi.org/10.1016/j.procs.2024.12.036 (2025).

    Google Scholar 

  11. Li, L., Yang, J. & Guan, H. A recognition method for Adzuki bean rust disease based on spectral processing and deep learning model. Agriculture 15(12), 1246. https://doi.org/10.3390/agriculture15121246 (2025).

    Google Scholar 

  12. Papan, P. et al. Artificial intelligence-based detection of Cercospora leaf spot disease severity in mung bean. Chil. J. Agric. Res. 85(3), 396–404. https://doi.org/10.4067/s0718-58392025000300396 (2025).

    Google Scholar 

  13. Khadeer, K., Khan, K. S., Bharathi, M. & Srinivas, T. A. S. From pixels to protection: Deep learning approaches for plant leaf disease detection. Journal of Computer Networks and Virtualization 3(1), 8–14 (2025).

    Google Scholar 

  14. Muchtar, K. et al. Edge AI-based detection for defective coffee beans using deep learning and Streamlit framework. IEEE Access https://doi.org/10.1109/ACCESS.2025.3561189 (2025).

    Google Scholar 

  15. Balaji, G. N., Parthasarathy, G., Kovendan, A. K. P. & Jha, A. Using deep learning for plant disease detection and classification. Nat. Environ. Pollut. Technol. https://doi.org/10.46488/NEPT.2025.v24i02.B4260 (2025).

    Google Scholar 

  16. Krishna, M. S. et al. Plant leaf disease detection using deep learning: A multi-dataset approach. J 8(1), 4. https://doi.org/10.3390/j8010004 (2025).

    Google Scholar 

  17. Shehu, H. A., Ackley, A., Marvellous, M. & Eteng, O. E. Early detection of tomato leaf diseases using transformers and transfer learning. Eur. J. Agron. 168, 127625. https://doi.org/10.1016/j.eja.2025.127625 (2025).

    Google Scholar 

  18. Gomez, D. et al. Advancing common bean (Phaseolus vulgaris L.) disease detection with YOLO driven deep learning to enhance agricultural AI. Sci. Rep. 14(1), 15596. https://doi.org/10.1038/s41598-024-66281-w (2024).

    Google Scholar 

  19. Karantoumanis, E., Balafas, V., Louta, M. & Ploskas, N. Real-time disease detection on bean leaves from a small image dataset using data augmentation and deep learning methods. Soft. Comput. 28 (21), 12929–12941. https://doi.org/10.1007/s00500-024-10348-3 (2024).

    Google Scholar 

  20. Katumba, A. et al. Leveraging edge computing and deep learning for the real-time identification of bean plant pathologies. Smart Agric. Technol. 9, 100627. https://doi.org/10.1016/j.atech.2024.100627 (2024).

    Google Scholar 

  21. Girmaw, D. W. & Muluneh, T. W. Deep convolutional neural network model for classifying common bean leaf diseases. Discover Artif. Intell. 4(1), 96. https://doi.org/10.1007/s44163-024-00212-6 (2024).

    Google Scholar 

  22. Rodríguez-Lira, D. C. et al. Comparative analysis of YOLO models for bean leaf disease detection in natural environments. Agriengineering 6(4), 4585–4603 (2024).

    Google Scholar 

  23. Girmaw, D. W., Salau, A. O., Mamo, B. S. & Molla, T. L. A novel deep learning model for cabbage leaf disease detection and classification. Discover Appl. Sci. 6(10), 521. https://doi.org/10.1007/s42452-024-06233-1 (2024).

    Google Scholar 

  24. Ma, X., Zhang, X., Guan, H. & Wang, L. Recognition method of crop disease based on image fusion and deep learning model. Agronomy https://doi.org/10.3390/agronomy14071518 (2024).

    Google Scholar 

  25. Hasan, M. et al. Comprehensive smartphone image dataset for bean and cowpea plant leaf disease detection and freshness assessment from Bangladesh vegetable fields. Data Brief 57, 111023. https://doi.org/10.1016/j.dib.2024.111023 (2024).

    Google Scholar 

  26. Mahadevan, K., Punitha, A. & Suresh, J. Automatic recognition of Rice Plant leaf diseases detection using deep neural network with improved threshold neural network. e-Prime 8, 100534. https://doi.org/10.1016/j.prime.2024.100534 (2024).

    Google Scholar 

  27. Bidarakundi, P. M. & Kumar, B. M. A Coffee Leaf Disease Detection via Deep Learning Algorithms. In 2024 International Conference on Trends in Quantum Computing and Emerging Business Technologies (pp. 1–5). IEEE. (2024)., March https://doi.org/10.1109/TQCEBT59414.2024.10545110

  28. Hassan, E. Enhancing coffee bean classification: A comparative analysis of pre-trained deep learning models. Neural Comput. Appl. 36(16), 9023–9052. https://doi.org/10.1007/s00521-024-09623-z (2024).

    Google Scholar 

  29. Chaki, J. & Ghosh, D. Deep learning in leaf disease detection (2014–2024): A visualization-based bibliometric analysis. IEEE Access https://doi.org/10.1109/ACCESS.2024.3425897 (2024).

    Google Scholar 

  30. Serttaş, S. & Deniz, E. Disease detection in bean leaves using deep learning. Commun. Fac. Sci. Univ. Ankara Ser. A2-A3 Phys. Sci. Eng. 65 (2), 115–129. https://doi.org/10.33769/aupse.1247233 (2023).

    Google Scholar 

  31. Mahenge, M. P. J. et al. Artificial intelligence and deep learning based technologies for emerging disease recognition and pest prediction in beans (phaseolus vulgaris L.): A systematic review. Afr. J. Agric. Res. 19(3), 260–271. https://doi.org/10.5897/AJAR2022.16226 (2023).

    Google Scholar 

  32. Singh, V., Chug, A. & Singh, A. P. Classification of beans leaf diseases using fine tuned cnn model. Procedia Comput. Sci. 218, 348–356. https://doi.org/10.1016/j.procs.2023.01.017 (2023).

    Google Scholar 

  33. Moupojou, E. et al. FieldPlant: A dataset of field plant images for plant disease detection and classification with deep learning. IEEE Access 11, 35398–35410. https://doi.org/10.1109/ACCESS.2023.3263042 (2023).

    Google Scholar 

  34. Suma, S. A. et al. Beans disease detection using convolutional neural network. In 2023 4th International Conference on Big Data Analytics and Practices (IBDAP) (pp. 1–5). IEEE. (2023)., August https://doi.org/10.1109/IBDAP58581.2023.10271983

  35. Senbato, A. & Ayalew, T. Developing Common Bacteria Blight Disease Detection Model for Common Bean Using Deep Learning Approach. (2023). https://doi.org/10.21203/rs.3.rs-3512095/v1

  36. Upadhyay, N. & Gupta, N. Detecting fungi-affected multi-crop disease on heterogeneous region dataset using modified ResNeXt approach. Environ. Monit. Assess. 196(7), 610. https://doi.org/10.1007/s10661-024-12790-0 (2024).

    Google Scholar 

  37. Upadhyay, N. & Bhargava, A. Artificial intelligence in agriculture: Applications, approaches, and adversities across pre-harvesting, harvesting, and post-harvesting phases. Iran. J. Comput. Sci. https://doi.org/10.1007/s42044-025-00264-6 (2025).

    Google Scholar 

  38. Upadhyay, N. & Gupta, N. Seglearner: A segmentation based approach for predicting disease severity in infected leaves. Multimedia Tools Appl. https://doi.org/10.1007/s11042-025-20838-7 (2025).

    Google Scholar 

  39. Upadhyay, N., Sharma, D. K. & Bhargava, A. 3sw-net: A feature fusion network for semantic weed detection in precision agriculture. Food Anal. Methods 18(10), 2241–2257. https://doi.org/10.1007/s12161-025-02852-5 (2025).

    Google Scholar 

Download references

Funding

Open access funding provided by Symbiosis International (Deemed University). This research received no external funding.

Author information

Authors and Affiliations

  1. Department of CSE, Symbiosis Institute of Technology, Symbiosis International (Deemed University), Pune, India

    Saiprasad Potharaju

  2. School of Computer Science and Engineering, Lovely Professional University, Phagwara, Punjab, India

    Arun Singh & Dalwinder Singh

  3. Department of Information Technology, K. K.Wagh Institute of Engineering Education & Research, Nashik, MH, India

    Swapnali N. Tambe

  4. Department of ETC, Symbiosis Institute of Technology, Symbiosis International (Deemed University), Pune, India

    Prasad MVV Kantipudi

  5. Dept of CSE(DS), Sreyas Institute of Engineering and Technology Hyderabad, Hyderabad, India

    B. Kiranmai

Authors
  1. Saiprasad Potharaju
    View author publications

    Search author on:PubMed Google Scholar

  2. Arun Singh
    View author publications

    Search author on:PubMed Google Scholar

  3. Dalwinder Singh
    View author publications

    Search author on:PubMed Google Scholar

  4. Swapnali N. Tambe
    View author publications

    Search author on:PubMed Google Scholar

  5. Prasad MVV Kantipudi
    View author publications

    Search author on:PubMed Google Scholar

  6. B. Kiranmai
    View author publications

    Search author on:PubMed Google Scholar

Contributions

PSP and SNT: Problem Formulation and MethodologyAS and DS: Implementation and VisualizationMVV PK and KB: Original Draft and Supervision.

Corresponding author

Correspondence to Saiprasad Potharaju.

Ethics declarations

Competing interests

The authors declare no competing interests.

The authors declare that they have no conflict of interest.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Potharaju, S., Singh, A., Singh, D. et al. An explainable vision transformer model with transfer learning for accurate bean leaf disease classification. Sci Rep (2026). https://doi.org/10.1038/s41598-026-41723-9

Download citation

  • Received: 04 August 2025

  • Accepted: 23 February 2026

  • Published: 24 February 2026

  • DOI: https://doi.org/10.1038/s41598-026-41723-9

Share this article

Anyone you share the following link with will be able to read this content:

Sorry, a shareable link is not currently available for this article.

Provided by the Springer Nature SharedIt content-sharing initiative

Keywords

  • Bean Leaf Disease
  • Vision Transformer
  • Transfer Learning
  • Explainable AI
  • GradCAM++
  • Deep Learning
Download PDF

Advertisement

Explore content

  • Research articles
  • News & Comment
  • Collections
  • Subjects
  • Follow us on Facebook
  • Follow us on X
  • Sign up for alerts
  • RSS feed

About the journal

  • About Scientific Reports
  • Contact
  • Journal policies
  • Guide to referees
  • Calls for Papers
  • Editor's Choice
  • Journal highlights
  • Open Access Fees and Funding

Publish with us

  • For authors
  • Language editing services
  • Open access funding
  • Submit manuscript

Search

Advanced search

Quick links

  • Explore articles by subject
  • Find a job
  • Guide to authors
  • Editorial policies

Scientific Reports (Sci Rep)

ISSN 2045-2322 (online)

nature.com sitemap

About Nature Portfolio

  • About us
  • Press releases
  • Press office
  • Contact us

Discover content

  • Journals A-Z
  • Articles by subject
  • protocols.io
  • Nature Index

Publishing policies

  • Nature portfolio policies
  • Open access

Author & Researcher services

  • Reprints & permissions
  • Research data
  • Language editing
  • Scientific editing
  • Nature Masterclasses
  • Research Solutions

Libraries & institutions

  • Librarian service & tools
  • Librarian portal
  • Open research
  • Recommend to library

Advertising & partnerships

  • Advertising
  • Partnerships & Services
  • Media kits
  • Branded content

Professional development

  • Nature Awards
  • Nature Careers
  • Nature Conferences

Regional websites

  • Nature Africa
  • Nature China
  • Nature India
  • Nature Japan
  • Nature Middle East
  • Privacy Policy
  • Use of cookies
  • Legal notice
  • Accessibility statement
  • Terms & Conditions
  • Your US state privacy rights
Springer Nature

© 2026 Springer Nature Limited

Nature Briefing AI and Robotics

Sign up for the Nature Briefing: AI and Robotics newsletter — what matters in AI and robotics research, free to your inbox weekly.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing: AI and Robotics