A Lightweight Single-Token CNN-Transformer Architecture for Robust Multi-Crop Plant Disease Classification
Abstract
Artificial intelligence (AI) has significantly enhanced image-based analysis across many domains, including agriculture. Deep learning methods have demonstrated strong potential for automated plant disease detection, which is critical to enhancing crop production and precision agriculture. Nevertheless, the diagnosis of plant diseases remains challenging due to unclear backgrounds, high inter-class similarity, and substantial intra-class variability across crop species. To overcome these issues, this paper presents a parameter-efficient hybrid deep learning architecture that combines DenseNet121 with a lightweight Vision Transformer (ViT) module. Instead of using many spatial patches, as in conventional ViT models, the presented framework limits the transformer to a single CNN-derived global token, which is used for lightweight feature refinement at low computational cost. The model is tested on five publicly available agricultural datasets: corn leaf, tomato leaf, BananaLSD, MangoLeafBD, and groundnut leaf. Experimental findings show consistently high performance across all datasets, with accuracies of 97.50%, 99.60%, 98.94%, 99.88%, and 99.66%, respectively. The proposed architecture shows stable convergence behavior, a good precision-recall balance, and effective training behavior with various dataset sizes. Additionally, Grad-CAM visualizations were used to enhance model explainability, highlighting leaf-relevant regions and providing qualitative indications of image regions contributing to predictions.