An explainable vision transformer model with transfer learning for accurate bean leaf disease classification
Saiprasad Potharaju, Arun Singh, Dalwinder Singh, Swapnali N Tambe, Prasad MVV Kantipudi, B. Kiranmai
Symbiosis International University · Lovely Professional University
Key points
From the paper's conclusion- 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.
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.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- MaizeFormerX: a lightweight vision transformer with cross-scale attention for explainable maize leaf disease diagnosisScientific Reports · 2026
- Vision transformers in precision agriculture: A comprehensive surveyIntelligent Systems with Applications · 2025
- A Vision Transformer-based few-shot learning approach for leaf disease classificationFrontiers in Agronomy · 2026
- PEAS-DeiT: Multi-Scale Spatial Attention Enhanced DeiT for Pea Leaf Disease ClassificationApplied Sciences · 2026
- A global-local hybrid vision-language framework for interpretable grapevine disease diagnosisDiscover Artificial Intelligence · 2026
- Cross-crop generalization in multi-species leaf disease recognition.Frontiers in plant science · 2026