Vision Transformer for 38-Class Crop Leaf Disease Classification: A Fine-Tuning and Evaluation Study
Numerous crop diseases manifest as observable leaf-level symptoms that can be pre-screened using modern computer vision techniques. In this paper, we present a fine-tuning and evaluation study of a Vision Transformer (ViT), google/vit-base-patch16-224, across 38 crop-condition classes. The classification pipeline aggregates PlantVillage training images with 1,749 mapped real-world images from PlantDoc, followed by an 85%/15% shuffled image-level training/validation split. The fine-tuned ViT achieves 98.97% accuracy and a 0.9897 macro F1-score on the 10,807-image in-distribution validation split. Because this split is not an isolated field benchmark, we additionally evaluate on unseen PlantDoc field images held out from training: the ViT retains 82.80% accuracy (0.811 macro F1), whereas a MobileNetV2 baseline that reaches 97.09% in distribution collapses to 50.32% (0.409 macro F1). We further integrate Attention Rollout for Explainable AI (XAI) visualization to verify pathological feature localization, analyze per-class error patterns, and benchmark inference latency and throughput of both models on an NVIDIA Tesla T4 GPU.
Authors
- Divyansh Kaushik
- Sumit Kumar
- Anirudh Chopra
- Vikas Singh
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-29
- DOI
- https://doi.org/10.5281/zenodo.24650053
- Primary Topic
- Smart Agriculture and AI
- Type
- preprint