CAJU: An Explainable Hybrid CNN–Transformer Framework for Cashew Leaf Disease Detection and Practical Deployment
Abstract
Background Cashew trees are vital to the agricultural economy of tropical regions, providing a substantial source of income and raw material. However, cashew diseases such as anthracnose, gummosis, leaf miner, red rust, and powdery mildew are a significant threat to production. Traditional disease diagnosis methods depend on manual visual inspection, which is subjective and time-consuming. To address these challenges, computer vision and deep learning techniques have emerged as effective solutions. However, most existing models suffer from a lack of explainability and practical deployment. Method This study proposes Cashew Artificial Intelligence Joint Unveiling (CAJU) , a hybrid deep learning model that combines EfficientNet-B0 for local feature extraction and ViT-B/16 for global self-attention, aimed at classifying five types of cashew leaf diseases. The model leverages SMOTE augmentation to balance class frequencies and integrates 10 explainable AI (XAI) methods, including Grad-CAM and EigenCAM, to provide transparent, interpretable results. A Flask REST API was developed to facilitate real-world deployment. Results The model achieved 97.89% test accuracy, macro-F1 of 0.9697, and macro-AUC of 0.9977 on the public CCMT dataset, outperforming previous state-of-the-art models. The XAI analysis showed that the model focused on biologically relevant disease features rather than irrelevant background noise, increasing trust in its predictions. Conclusion The CAJU model not only achieves high performance in classifying cashew leaf diseases but also provides an interpretable and deployable solution, making it a valuable tool for farmers. This work bridges key gaps in accuracy, interpretability, and deployment, contributing to the advancement of precision agriculture.
Related articles
Related articles are currently not available for this article.