Code: Source code of the study is available at https://github.com/rezaul-h/CottonVerse.
Open resource ↗github · rezaul-h/CottonVerse · html-lines:2058-2083Paper record
Explainable transformer framework for fast cotton leaf diagnostics and fabric defect detection.
iScience · 11 Dec 2025 · 10.1016/j.isci.2025.114411
Abstract
This study introduces a hybrid deep learning model that combines CNN-based hierarchical feature extraction with light-efficient vision transformer self-attention to classify multiple types of cotton leaf diseases and fabric defects. Using Explainable AI (XAI) techniques, the framework enhances interpretability, allowing domain experts to better understand the model's decisions. Evaluated on four benchmark datasets, the proposed XCottL-FebViT achieved consistent improvements in accuracy, MCC, and F1 Score compared with leading transformer-based models, while maintaining computational efficiency through hyperparameter optimization. For CottonLeafNet and SAR-CLD, it attained training accuracies of 99.97% and 99.95%, with validation accuracies of 99.93% and 99.91%, respectively. In fabric defect classification, the model achieved 99.97% training accuracy on CottonFabricImageBD and FabricSpotDefect, with validation accuracies of 99.93% and 99.95%, respectively. A lightweight web-based application enables practical deployment for remote disease and defect detection. This work highlights the integration of interpretability, efficiency, and high performance in AI-driven agricultural and textile quality assessment.
Code and data availability