DenseSAM: A model with spatial attention module for black gram and other crop leaf disease classification
摘要
Accurate and timely recognition of plant diseases is crucial for increasing crop yields and ensuring food security; however, traditional disease identification methods rely primarily on physical examination, which is labor-intensive, time-consuming, and prone to human error. To address these constraints, this study introduces DenseSAM, a deep learning (DL)-based plant disease classification system that builds on the DenseNet201 architecture with structural changes and an incorporated Spatial Attention Module (SAM). The SAM mechanism enables the network to strategically focus on disease-relevant regions of leaf images, thereby enhancing the discriminative representation of characteristics and classification resilience. The DenseSAM was assessed on a black gram leaf disease dataset and performed admirably, with 99.0% accuracy, precision, recall, and F1 score, as well as 98.2% Matthews Correlation Coefficient (MCC) and Cohen’s Kappa Score. Furthermore, 5-fold cross-validation showed significant generalization, with an average F1 score of 97.4% and constant MCC and KS values of 96.5%. To validate cross-crop feasibility, DenseSAM was evaluated across five leaf disease datasets (black gram, tea, citrus, potato, and apple), achieving F1 scores ranging from 96.0% to 100.0%. These findings support DenseSAM’s efficacy and generalizability for disease categorization across multiple crops. The presented approach provides a dependable, scalable, and effective solution for automatic plant disease detection, with tremendous potential for precision agriculture and innovative crop management.