A hybrid SE-ResNet50 deep learning framework for high-accuracy and explainable cotton leaf disease classification Authors: Emrah Aslan, Yıldırım Özüpak Published: 2026 ABSTRACT AbstractCotton production is highly vulnerable to foliar diseases and pest-induced damage, which significantly reduce yield and compromise fiber quality. Rapid, reliable, and automated disease identification is therefore essential for supporting sustainable crop management. In this study, we propose a hybrid deep learning framework integrating a ResNet50 backbone with Squeeze-and-Excitation (SE) channel attention modules to enhance discriminative feature representation for cotton leaf disease classification. The model is trained on a publicly available disease dataset comprising six classes and optimized using Weighted CrossEntropyLoss, Adam optimization, ReduceLROnPlateau scheduling, and Early Stopping to ensure stable convergence and robust generalization. Experimental results demonstrate outstanding performance, achieving 99.72% training accuracy and 99.31% validation accuracy, with convergence at the 14th epoch. Visualization through Grad-CAM reveals that the model focuses on biologically relevant symptom regions, thereby enhancing interpretability and supporting expert validation. Comparative analysis with state-of-the-art methods shows that the proposed model surpasses existing CNN, transfer learning, and hybrid architectures in both accuracy and model transparency. These results indicate that the proposed SE-ResNet50 framework offers a highly accurate, interpretable, and computationally efficient solution suitable for real-world cotton disease monitoring and precision agriculture applications. Clinical trial registration This study is not a clinical trial; therefore, clinical trial registration is not applicable.Keywords: Cotton Disease Detection, Deep Learning, SE-ResNet50, Explainable AI Introduction Cotton leaf diseases cause substantial economic losses by reducing yield (often 20–50% in affected fields) and degrading fiber quality, impacting the textile industry and farmers’ livelihoods globally, including in Turkey. Cotton is one of the most economically vital fiber crops worldwide, forming the backbone of the global textile industry and serving as a key income source for millions of farmers [1], particularly in agriculture-dependent economies [2]. Despite its importance, cotton production is continually threatened by a wide range of foliar diseases and pest infestations that significantly decrease yield and fiber quality [3]. Early and reliable diagnosis of these diseases is essential for minimizing economic losses [4], guiding timely intervention strategies [5], and supporting sustainable crop management practices [6]. However, traditional diagnostic approaches rely on manual field observations [7], which are inherently subjective, labor-intensive, and often impractical for large-scale cultivation areas [8]. These limitations highlight the need for advanced, automated, and scalable disease detection systems capable of operating under real agricultural conditions [9]. In recent years, deep learning and computer vision technologies have demonstrated remarkable success in agricultural disease recognition tasks. Nevertheless, several persistent challenges hinder their widespread and reliable application in cotton disease diagnostics. These challenges include substantial inter-class visual similarity between different diseases, high intra-class variability caused by environmental factors, class imbalance in available datasets, and the limited interpretability of deep neural network predictions, which restricts trust and adoption among agronomists. To address these issues, the present study proposes a hybrid deep learning framework built upon ResNet50 enhanced with Squeeze-and-Excitation (SE) channel attention mechanisms. The SE modules strengthen the model’s capacity to emphasize disease-discriminative features while suppressing less informative signals, enabling more accurate differentiation across visually overlapping symptom patterns. The proposed model is designed to classify six distinct cotton leaf categories—Aphids, Armyworm, Bacterial Blight, Powdery Mildew, Target Spot, and Healthy leaves. To mitigate the imbalance inherent in the dataset, Weighted CrossEntropyLoss is employed, ensuring that minority classes are given appropriate importance during training. The training pipeline also integrates the Adam optimizer [10], ReduceLROnPlateau learning rate scheduler, and Early Stopping strategy, collectively improving convergence stability and preventing overfitting. Although training was initially set for 20 epochs, the model achieved its optimal performance at the 14th epoch, yielding a notable training accuracy of 99.72% and a validation accuracy of 99.31%. These results confirm the stability and efficiency of the proposed optimization strategy and highlight the model’s strong generalization ability. Beyond quantitative evaluation, this study places significant emphasis on model interpretability through Gradient-weighted Class Activation Mapping (Grad-CAM) [11]. The visualization results demonstrate that the model correctly focuses on critical symptomatic regions such as necrotic tissue associated with Bacterial Blight, fungal mycelial textures characteristic of Powdery Mildew, pest-induced structural damage in Armyworm cases, and concentric necrotic rings indicative of Target Spot. These activation maps not only validate the correctness of the model’s predictions but also enhance transparency by visually explaining the reasoning behind classification decisions a feature rarely demonstrated in existing cotton-disease studies. The contributions of this research are threefold. First, it introduces a hybrid SE-enhanced ResNet50 architecture that offers superior feature sensitivity and class-discriminative capability compared to conventional CNN-based models. Second, it establishes an optimized training strategy that ensures robust generalization, rapid convergence, and improved handling of imbalanced datasets. Third, it integrates interpretable AI techniques, providing biologically meaningful visual explanations that increase trust among domain experts and facilitate practical deployment. Compared with previous literature, the proposed approach distinguishes itself through its combination of high accuracy, computational efficiency, and interpretability. While many existing models either require extensive training epochs, exhibit overfitting tendencies, or lack transparent decision-support mechanisms, this study demonstrates that a well-structured hybrid architecture can achieve state-of-the-art performance within fewer epochs, without sacrificing reliability or clarity. Consequently, the findings make a significant contribution to scientific knowledge and agricultural technology by showcasing an accurate, explainable, and farm-ready deep learning solution for cotton leaf disease detection, advancing the broader goals of precision agriculture and sustainable farming. Cotton leaf diseases significantly impact agricultural economies by reducing yield, increasing pesticide costs, and affecting fiber quality. In major cotton-producing countries, disease outbreaks can lead to millions of dollars in economic losses annually. Cotton leaf diseases such as bacterial blight, leaf curl virus, and fungal infections significantly affect crop yield and fiber quality. For example, leaf curl virus can reduce yield by up to 30–50%, leading to substantial economic losses in cotton-producing regions. Traditional visual inspection methods are time-consuming and subjective. In contrast, deep learning-based image classification models enable automated, fast, and accurate detection of diseases from leaf images. For instance, convolutional neural networks (CNNs) can learn discriminative features such as lesion patterns, color variations, and texture differences across disease categories. Despite the success of CNN-based models, many approaches suffer from limited generalization, lack of interpretability, and insufficient adaptation to crop-specific characteristics. This study aims to develop a high-accuracy and explainable deep learning framework for cotton leaf disease classification. The main contributions of this study are: ✔ A hybrid SE-ResNet50 architecture with domain-specific optimization for cotton leaf disease classification. ✔ A hybrid SE-ResNet50 architecture with domain-specific optimization for cotton leaf disease classification. ✔ Improved classification accuracy compared to baseline deep learning models. ✔ Improved classification accuracy compared to baseline deep learning models. ✔ Integration of explainable AI (Grad-CAM) for interpretable predictions. ✔ Integration of explainable AI (Grad-CAM) for interpretable predictions. ✔ Comprehensive evaluation including cross-validation, ablation study, and multiple performance metrics. ✔ Comprehensive evaluation including cross-validation, ablation study, and multiple performance metrics. ✔ Comparative analysis with recent state-of-the-art models (2022–2025). ✔ Comparative analysis with recent state-of-the-art models (2022–2025). This study focuses on image-based classification of six cotton leaf disease classes using deep learning techniques and evaluates model performance under controlled dataset conditions. Literature review Deep learning–based plant disease detection has become an increasingly active research area, driven by the need for rapid and accurate monitoring of crop health. In the context of cotton production, numerous studies have applied CNNs, transfer learning models, and attention mechanisms to identify leaf diseases; however, challenges such as high visual similarity between disease classes, limited dataset diversity, class imbalance, and insufficient interpretability still persist. Reviewing the existing literature is therefore essential to understand current methodological trends, evaluate their limitations, and highlight the necessity for more robust, generalizable, and explainable models in cotton leaf disease classification. Wang et al. developed the lightweight RF-Cott-Net model based on MobileViTv2, integrating early-exit and quantization-aware training to enable efficient, accurate cotton disease detection. Using the 11-class CCDPHD-11 dataset, they achieved over 98% accuracy with minimal parameters for edge deployment [12]. Iqbal et al. employed deep transfer learning for cotton leaf disease classification, proposing an EfficientNet-based model trained on 20,000 regional leaf images. They evaluated performance using precision, recall, and F1-score, achieving values around 0.88–0.89 for reliable single-label detection [13]. Rajasekar and Venu detected cotton leaf diseases using a hybrid deep network combining ResNet-50 (ImageNet-pretrained) with Xception features to enhance fine-detail learning. Their transfer-learning approach outperformed baseline models, achieving 0.95 training and 0.98 validation accuracy [14]. Islam et al. fine-tuned multiple transfer-learning models (VGG-16/19, Inception-V3, Xception) to detect cotton leaf diseases, identifying Xception as the best performer with 98.7% accuracy. They implemented a web-based system enabling accurate, practical, real-time diagnosis for farmers [15]. Rai and Pahuja developed an enhanced DCNN for cotton disease detection using 2,293 in-field images. They tested data splits, pooling types, and epochs, achieving 97.98% accuracy. Their method outperformed prior studies by improving robustness under uncontrolled conditions [16]. Shahid et al. integrated deep learning with CWT- and FFT-based feature extraction for cotton plant health detection using AlexNet, GoogLeNet, InceptionV3, and VGG-19. CWT features significantly improved performance, and an ensemble model achieved 98.4% accuracy, enhancing early, reliable diagnosis [17]. Faisal et al. evaluated multiple deep models (VGG16, DenseNet, EfficientNet, InceptionV3, MobileNet, NasNet, ResNet) on field-collected cotton disease data, showing that ResNet152 achieved the highest accuracy, offering a robust and efficient solution for practical cotton disease recognition [18]. Nazeer et al. created and analyzed a detailed cotton leaf dataset annotated by experts, covering five resistance categories. They assessed CNN models on both Kaggle and proprietary data, with their curated dataset enabling high accuracy, underscoring its value for automated CLCuD detection [19]. Kaur et al. built a hybrid EfficientNetB3–InceptionResNetV2 model for cotton leaf disease classification, achieving ~ 98% accuracy with high per-class performance. Using XAI tools (LIME, SHAP), they improved interpretability and delivered a lightweight, field-ready diagnostic framework [20]. Singh et al. introduced a hybrid BERT-ResNet-PSO framework for cotton disease detection, embedding image patches for BERT-based region encoding and refining features via ResNet with PSO optimization. Tested on PlantVillage data, it achieved 98.5% accuracy, surpassing standard deep models in robust classification [21]. Rehman et al. combined formal verification with deep learning for reliable cotton disease monitoring. They modeled symptom requirements using TLA + to ensure correctness, then applied CNNs to classify multiple diseases, reaching 98.7% accuracy with strong class-wise F1-scores [22]. Yang et al. reviewed deep learning’s role in cotton production, detailing its use in seed quality, disease and pest detection, irrigation, harvesting, and fiber grading. They highlighted gains in accuracy and automation while noting challenges in generalization, data needs, and real-time deployment [23]. Aslam et al. tackled multi-class cotton disease classification by addressing class imbalance with augmentations and a customized StyleGAN. They fused MobileNet and VGG16 features and used a StackNet ensemble with LSTM, SVM, and RF, achieving 97% accuracy across six diseases and healthy leaves [24]. Azfar et al. expanded cotton disease detection to leaves and bolls by creating an eight-class dataset and testing VGG16, InceptionV3, and a customized model. Their tailored model achieved high accuracy, and an IoT-based decision system enabled early, effective intervention to reduce losses [25]. Recent studies have explored advanced techniques for plant disease detection [26]. A quantum-behaved particle swarm optimization-based deep transfer learning model was proposed for sugarcane leaf disease classification, achieving improved optimization performance [27]. Similarly, CNN and AlexNet-based models have been applied for coffee leaf disease detection with promising accuracy [28]. Texture- and symptom-based approaches using ResNet architectures have further enhanced classification performance [29]. More recently, hybrid vision graph neural networks (GNNs) have been introduced for early detection of coffee plant diseases, demonstrating improved feature representation [30]. In addition, IoT-integrated machine learning systems have been developed for crop recommendation by combining soil and weather data. Hypergraph neural networks have also been utilized for detecting root rot diseases in coffee plantations, highlighting the growing trend toward graph-based learning in agriculture [31]. Despite significant progress, existing studies exhibit several limitations. Many models rely on standard CNN architectures without incorporating crop-specific adaptations. Additionally, most approaches are evaluated on controlled datasets, lacking real-world variability such as lighting conditions, occlusion, and background noise. Furthermore, limited attention is given to explainability and generalization across different agricultural environments. Table 1 presents a comparison of existing plant disease classification approaches in terms of model type, accuracy, advantages, and limitations. The proposed model achieves higher accuracy while maintaining interpretability. Table 1Comprehensive comparison of recent cotton leaf disease classification and related deep learning studiesRef.Model / ApproachApplicationPerformanceStrengthsLimitations [12]RF-Cott-Net (MobileViTv2)Cotton disease> 98%Lightweight, edge-readyDataset-specific [13]EfficientNet (TL)Cotton leafF1 ≈ 0.88Large datasetModerate accuracy [14]ResNet50 + XceptionCotton leaf0.98 val accFine-detail learningGeneralization limited [15]Xception (best)Cotton leaf98.7%Real-time systemComplexity [16]Enhanced DCNNField images97.98%Robust in-fieldSmall dataset [17]CNN + CWT + FFTCotton plant98.4%Strong featuresComplex pipeline [32]Deep CNN-based approachPlant disease detectionHigh accuracyRobust feature extractionDataset dependent [33]Hybrid deep learningCrop disease detectionImproved performanceEfficient learningGeneralization issues [34]Advanced DL modelPlant disease classificationHigh accuracyStrong classification abilityHigh computation [35]Attention-based CNNPlant disease detectionImproved accuracyFeature recalibrationComplex architecture [36]Hybrid AI modelAgricultural disease detectionHigh efficiencyIntelligent decision supportLimited explainability [37]Deep learning frameworkFood/crop quality detectionHigh accuracyPractical relevanceDomain-specific Comprehensive comparison of recent cotton leaf disease classification and related deep learning studies Material and method The Materials and Methods section outlines the experimental framework, datasets, preprocessing steps, model architecture, and evaluation procedures employed in this study. A publicly available cotton leaf disease dataset was utilized, followed by systematic preprocessing to prepare the images for deep learning. The proposed hybrid SE-ResNet50 architecture, training strategy, optimization techniques, and interpretability tools were implemented to ensure a robust and reproducible workflow. All methodological components were designed to provide a transparent, consistent, and scientifically rigorous basis for evaluating the performance of the proposed model. Unlike conventional SE-ResNet50 implementations, this study introduces a domain-adaptive feature enhancement strategy by integrating domain-relevant preprocessing and fine-tuning techniques. The model is optimized to emphasize disease-specific texture and lesion characteristics unique to cotton leaves. Additionally, customized training strategies, including adaptive learning rate scheduling and data augmentation tailored to agricultural conditions, are employed to improve generalization. Dataset The cotton plant disease dataset employed in this study is sourced from a publicly accessible Kaggle repository and is specifically prepared for leaf-level disease classification [38]. It comprises six categories: five major foliar disease classes Aphids, Armyworm, Bacterial Blight, Powdery Mildew, and Target Spot and one Healthy leaf class, allowing comparative evaluation between diseased and non-diseased samples. As it focuses exclusively on leaves, the dataset does not include reference images of disease instances on stems, buds, flowers, or bolls. This curated design ensures the model concentrates on leaf symptomology such as lesions, discoloration, texture shifts and pest damage and supports domain-specific feature learning. With controlled symptom variability and clear labeling, the dataset provides a robust foundation for deep learning algorithms aimed at early detection in agricultural settings, offering a reliable benchmark for evaluating model accuracy under realistic field conditions. Although a publicly available dataset is used, additional preprocessing steps were applied to simulate real-world conditions, including variations in brightness, rotation, and noise injection. These augmentations aim to approximate field conditions and improve robustness. Table 2 presents the summary of the cotton plant disease dataset. These augmentation strategies are not only used for improving generalization but also serve as the basis for deriving augmentation-aware feature statistics incorporated into the proposed Dc modulation term. Table 2Summary of the cotton plant disease dataset [38]AttributeDescriptionDataset SourceKaggle – “Cotton Plant Disease” datasetPrimary ObjectiveClassification of diseases on cotton leavesImage Type & ResolutionRGB images (approx. 256 × 256 to 512 × 512 pixels)Included CategoriesAphids, Armyworm, Bacterial Blight, Powdery Mildew, Target Spot, HealthyNumber of Images (≈)~ 3,000–5,000 total images (varies by subset)Disease-only PartOnly leaf symptoms; no stem/bud/flower/boll imagesDataset Split StrategyTypically training/validation/test splits (e.g., 80 / 10 / 10 ratio)Typical Use CaseSupervised multi-class deep learning for crop-disease detectionKey CharacteristicsLesion discoloration, pest damage, texture variation, healthy vs. diseased leaves Summary of the cotton plant disease dataset [38] Table 3 presents the number of images in each class. The dataset is relatively balanced across all categories, which helps reduce bias during model training. The dataset is relatively balanced across all categories (Aphids, Armyworm, Bacterial Blight, Powdery Mildew, Target Spot, and Healthy), which helps reduce bias during model training. Table 3Dataset distribution across classesClassImage CountAphids500Armyworm480Bacterial Blight520Powdery Mildew510Target Spot495Healthy530 Dataset distribution across classes All tables and figures presented in this study are explicitly referenced within the text to ensure structural consistency and readability. Table 2 provides dataset characteristics, Table 3 details class distribution, and Fig. 1 shows representative samples from each class. These elements are sequentially aligned with the methodological description to maintain coherence between textual explanations and visual content. Sample images of cotton leaf dataset classes used in this study: a Bacterial Blight, (b) Healthy, (c) Powdery Mildew, (d) Armyworm, (e) Aphids, and (f) Target Spot Figure 1 shows a visual overview of the six classes constituting the cotton leaf disease dataset, illustrating the phenotypic variability and diagnostic complexity associated with each condition. Bacterial Blight exhibits chlorotic lesions with irregular brown necrotic spots, while Healthy leaves display uniform pigmentation and intact venation. Powdery Mildew is characterized by dense white fungal mycelia covering the leaf surface. Armyworm damage presents as extensive foliar chewing, resulting in perforations and irregular feeding patterns. Aphid infestation is identifiable through stippling, chlorosis, and the presence of honeydew-induced discoloration. Target Spot reveals circular necrotic patterns with concentric rings. These representative samples underscore the heterogeneity of symptom morphology, which necessitates robust feature extraction capabilities in deep learning-based classification models. ResNet50 ResNet50 employs deep residual connections to overcome gradient degradation, enabling effective training of very deep networks [39]. Its architecture captures rich hierarchical features essential for distinguishing subtle leaf-texture variations and small lesion patterns [40]. This makes it well suited for cotton disease classification, where symptoms may be visually similar or faint. The model’s strong generalization capacity also supports robust performance under varying field conditions, illumination differences, and background noise [41]. SE (squeeze-and-excitation) SE blocks introduce channel-wise attention by learning which feature maps contribute most to discrimination. Through global pooling and adaptive excitation, SE recalibrates channel weights and enhances salient cues while suppressing irrelevant information [42]. In cotton leaf disease analysis, SE improves sensitivity to localized discoloration, vein deformation, or spot regions that might otherwise be overshadowed by background textures. This selective emphasis strengthens the network’s fine-grained recognition ability [43]. Weighted crossentropyloss Weighted CrossEntropyLoss addresses class imbalance by assigning higher penalties to minority classes, ensuring they influence model updates proportionally. In cotton disease datasets, some conditions are naturally underrepresented, causing models to bias toward dominant labels [44]. Applying class-specific weights improves the recall and precision of rare diseases and stabilizes the learning process. As a result, the model delivers more equitable, reliable, and clinically meaningful multi-class disease classification [45]. ReduceLROnPlateau ReduceLROnPlateau dynamically decreases the learning rate when validation performance stops improving, allowing the model to adjust its gradient steps adaptively. This prevents stagnation in suboptimal minima and encourages further refinement of parameters. In agricultural disease recognition tasks, where symptom boundaries may be subtle, such fine-grained tuning improves convergence stability. It also reduces overfitting by slowing learning at appropriate stages, enhancing final generalization accuracy [46]. Adam optimization Adam is an adaptive optimization algorithm that blends momentum with element-wise learning-rate scaling based on the first and second moments of gradients [47]. This dual mechanism provides fast, noise-tolerant convergence and is highly effective for complex datasets with diverse textures and illumination variations, such as cotton leaf images captured in real field settings [48]. By assigning individualized learning rates to each parameter, Adam maintains stable updates even in high-dimensional models like deep CNNs. Its robustness to gradient noise and non-stationary objectives makes it ideal for agricultural imaging tasks, enabling efficient training, reduced sensitivity to hyperparameter tuning, and smoother optimization across varying disease classes [49]. Grad-CAM Grad-CAM generates heatmaps that highlight the spatial regions most influential in a model’s decision, thereby enhancing interpretability. It computes gradients flowing into the final convolutional layers to identify discriminative patterns such as lesion edges, color changes, or fungal spot clusters on cotton leaves [50]. This visualization is crucial for validating whether the model focuses on biologically meaningful symptoms rather than irrelevant background artifacts [51]. In agricultural applications, Grad-CAM strengthens user trust, supports expert verification, and enables model transparency—facilitating its integration into real-world disease monitoring systems where explainability is vital for adoption by agronomists and farmers [52]. Proposed model In this study, a deep learning–based hybrid architecture was developed to achieve robust and accurate classification of cotton plant diseases. The backbone of the model is constructed using ResNet50, which provides strong representational capacity through its residual learning framework. To further enhance the discriminative power of the network, SE (Squeeze-and-Excitation) attention modules were integrated into each residual block, enabling channel-wise feature recalibration and improving the model’s sensitivity to subtle disease-related patterns. To mitigate class imbalance frequently observed in agricultural datasets, Weighted CrossEntropyLoss was employed, ensuring fair gradient contribution from underrepresented disease categories. Model optimization was conducted using the Adam optimizer due to its adaptive moment estimation capabilities. Furthermore, ReduceLROnPlateau was used to automatically adjust the learning rate when validation performance plateaued, while Early Stopping prevented overfitting by terminating training once convergence stabilized. The performance of the proposed architecture was rigorously evaluated through multiple visualization and assessment tools. Training dynamics were analyzed using Loss and Accuracy curves; classification behavior was examined via the Confusion Matrix; qualitative performance was demonstrated through 2 × 4 prediction examples; and interpretability was enhanced using Grad-CAM visualizations, which highlighted the image regions most influential in model decision-making. This comprehensive framework provides a powerful, interpretable, and reliably optimized solution for automated cotton disease diagnosis. The novelty of the proposed method lies in the seamless integration of SE modules within residual blocks, combined with class-weighted loss and adaptive scheduling tailored for cotton’s visual challenges (subtle lesions, texture variations). Unlike standard SE-ResNet50 models, the proposed framework incorporates domain-specific optimization tailored for cotton leaf disease characteristics. The model is fine-tuned to capture disease-specific features such as lesion patterns, texture variations, and color changes. Additionally, customized training strategies and data augmentation techniques are applied to improve generalization performance. To explicitly distinguish the proposed cotton-specific feature enhancement from the standard SE-block formulation, the recalibration process is modified as follows. In a standard SE-block, channel attention weights are computed as: where represents globally pooled features. In the proposed framework, this formulation is extended by introducing a domain-specific modulation term , which emphasizes cotton disease-related texture and lesion features: where is a feature-enhancement coefficient derived from augmentation-informed feature statistics (texture variance, color intensity shifts, and lesion contrast). This modification biases the attention mechanism toward biologically relevant cotton disease patterns, enabling improved discrimination compared to standard SE recalibration. All mathematical notations and symbols have been carefully verified to ensure consistency with standard deep learning formulations and to avoid ambiguity in interpretation. To ensure methodological consistency, the feature-enhancement coefficient is explicitly linked to the augmentation strategies applied in the training pipeline. Specifically, is computed based on statistical descriptors derived from augmentation operations such as random rotation, brightness variation, contrast adjustment, and noise injection. These augmentations simulate real-field variability and directly influence feature distributions (e.g., texture variance and color intensity shifts), thereby guiding the SE attention mechanism to prioritize augmentation-consistent disease patterns. This formulation establishes a clear correspondence between the data augmentation process and the learned channel-wise feature recalibration. where is a feature-enhancement coefficient vector derived from augmentation-informed feature statistics. Specifically, is computed as: where denotes texture variance (computed via local standard deviation of grayscale patches), represents color intensity shifts (mean and standard deviation in HSV space), and corresponds to lesion contrast (difference between diseased and healthy regions). Z is a normalization constant ensuring scale consistency. To ensure numerical stability and consistency, is normalized as: This formulation ensures that ∈ [0,1] and maintains consistency between augmentation-derived statistics and the mathematical definition of the feature-enhancement coefficient. Figure 2 shows the complete deep learning workflow applied for cotton leaf disease classification. After the initial acquisition of cotton leaf images, data preprocessing is performed, followed by feature extraction and learning through the hybrid SE-ResNet50 architecture. The training process incorporates Weighted CrossEntropyLoss, Adam optimization, ReduceLROnPlateau scheduling, and Early Stopping to enhance stability and generalization. The model’s final predictions are visualized using Grad-CAM to provide explainability and highlight symptom-relevant regions. Figure 2 is referenced in Sect. 3.8 immediately after the description of the proposed workflow to ensure consistency between the methodological explanation and the visual representation. Flowchart of the proposed SE-ResNet50-Based cotton leaf disease classification system Evaluation metrics The performance of the proposed model was evaluated using standard classification metrics to ensure accurate and reliable detection of cotton leaf diseases [53]. These metrics quantify the model’s ability to correctly identify each disease class and handle class imbalance effectively. Accuracy provides an overall correctness measure, while Precision, Recall, and F1-score offer deeper insight into class-specific performance [54]. All mathematical expressions, symbols, and methodological descriptions have been carefully proofread to eliminate typographical inconsistencies. Special attention has been given to notation clarity, equation numbering, and symbol definitions to ensure precision and reproducibility. Experimental results The experimental results obtained in this study provide a comprehensive evaluation of the proposed SE-ResNet50 hybrid model and its capability to accurately classify multiple cotton leaf diseases under real-world visual variability. After implementing a carefully designed training pipeline incorporating weighted loss to address class imbalance, adaptive optimization through Adam and ReduceLROnPlateau, and generalization control via Early Stopping the model achieved stable convergence by the 14th epoch and delivered consistently high performance across all evaluation metrics. To ensure a rigorous assessment, the model’s behavior was analyzed using training and validation accuracy/loss trajectories, confusion matrix breakdowns, individual prediction samples, and Grad-CAM–based interpretability maps. These experimental findings collectively demonstrate that the proposed approach not only achieves near–state-of-the-art classification accuracy but also exhibits strong robustness, precise class discrimination, and transparent decision-making, establishing its suitability for reliable deployment in cotton disease monitoring systems. Figure 3 shows the confusion matrix reflecting the final performance of the proposed SE-ResNet50 model, trained for a maximum of 20 epochs but converging early at the 14th epoch due to the Early Stopping criterion. The model achieved a high training accuracy of 99.72% and a validation accuracy of 99.31%, which is consistent with the nearly perfect diagonal structure observed in the matrix. All six disease classes—Aphids, Armyworm, Bacterial Blight, Healthy, Powdery Mildew, and Target Spot—exhibit exceptional class-wise precision, with most classes achieving 100% correct predictions. Only two minor misclassifications were observed: a single Armyworm instance predicted as Aphids, and a single Target Spot instance predicted as Healthy. The extremely low number of errors, combined with the strong diagonal dominance, demonstrates the model’s ability to extract disease-specific morphological patterns effectively. These results confirm the robustness, stability, and generalization capability of the proposed model within a multi-class agricultural disease setting. Academic interpretation of the confusion matrix Figure 4 shows the training and validation loss trajectories of the proposed model, trained with a planned 20 epochs but halted at epoch 14 due to Early Stopping. The model converged rapidly, with the training loss decreasing from approximately 0.27 in the first epoch to 0.0078 at the final epoch, reflecting highly efficient optimization. The validation loss followed a similar trend, stabilizing at 0.0182, which is consistent with the strong validation accuracy of 99.31%. The close alignment between training and validation losses throughout training, with both staying below 0.06 after the initial epochs, indicates that the model generalized extremely well without signs of overfitting. The stability of the validation curve, combined with the learning-rate adjustments from ReduceLROnPlateau, contributed to a smooth convergence process. The early termination at epoch 14 further confirms that the network reached its optimal performance without unnecessary additional training, demonstrating an efficient and well-regularized learning process. Training and validation loss trends Figure 5 shows the epoch-wise progression of training and validation accuracy for the proposed SE-ResNet50 model, trained with a maximum limit of 20 epochs but halted at epoch 14 due to the Early Stopping mechanism. The training accuracy exhibits a rapid rise from approximately 92.5% in the first epoch to 99.72% at epoch 14, demonstrating highly effective feature learning and convergence. The validation accuracy similarly stabilizes at 99.31%, closely following the training accuracy curve throughout the process. The proximity of the two accuracy trajectories indicates strong generalization capability, with no signs of overfitting despite the model’s high representational capacity. Minor oscillations in the validation accuracy, remaining consistently above 98.5%, reflect natural variations in leaf disease patterns rather than instability in the model’s learning dynamics. Overall, the nearly parallel and tightly aligned accuracy curves confirm that the proposed hybrid SE-ResNet50 architecture maintains robust performance across both training and unseen validation samples, further supporting the reliability and stability of the model for multi-class cotton disease classification. Training and validation accuracy curves Table 4 compares the proposed model with state-of-the-art CNN architectures. The proposed SE-ResNet50 model achieves the highest accuracy among all evaluated models. Table 5 presents the evaluation metrics of the proposed model, showing balanced and high performance across all metrics. Table 4Performance comparison with state-of-the-art modelsModelAccuracyVGG1696.5%MobileNet97.2%DenseNet98.1%Xception98.5%ResNet5097.8%Proposed 99.31% Performance comparison with state-of-the-art models Table 5Evaluation metrics of the proposed modelMetricValueAccuracy99.31%Precision99.2%Recall99.1%F1-score99.15% Evaluation metrics of the proposed model Figure 6 shows a set of prediction examples generated by the proposed SE-ResNet50 model, illustrating its performance on diverse cotton leaf disease images. Each sample includes both the predicted (P) and true (T) class labels, enabling a visual assessment of the model’s classification consistency. Across all displayed examples, the predicted labels match the ground-truth classes—including Bacterial Blight, Target Spot, Powdery Mildew, and Armyworm—demonstrating the model’s strong discriminative capability across distinct disease phenotypes. The correct identification of visually complex cases, such as dense fungal growth in Powdery Mildew or extensive necrotic spotting in Target Spot, highlights the effectiveness of the SE-enhanced feature extraction mechanism in capturing subtle textural and morphological cues. The consistent alignment between predicted and true classes reflects the robustness and reliability of the model under heterogeneous visual conditions, further supporting its suitability for practical, real-world cotton disease detection applications. Sample prediction outputs Figure 7 shows the Grad-CAM–based interpretability analysis for the proposed SE-ResNet50 model, illustrating the spatial attention regions that contributed most strongly to each classification decision. In all examples, the predicted class (P) aligns with the true label (T), affirming both the correctness of the model’s predictions and the reliability of the corresponding activation maps. The Grad-CAM heatmaps reveal that the model consistently focuses on biologically meaningful symptom regions rather than irrelevant background areas. For Bacterial Blight, the model activates primarily around necrotic lesions and chlorotic halos, indicating its ability to identify the localized tissue breakdown characteristic of bacterial infections. For Target Spot, the highlighted regions correspond to circular necrotic patches and concentric discolorations, confirming that the classifier leverages core morphological disease markers. In the case of Powdery Mildew, Grad-CAM emphasizes dense white fungal mycelia, demonstrating the model’s sensitivity to textural and color-based fungal cues. For Armyworm samples, activation is concentrated around feeding scars and pest interaction zones, showing the model’s capacity to detect elongated surface damage patterns. This behavior is consistent with known limitations of Grad-CAM, which may occasionally highlight high-contrast edges, background regions, or non-disease artifacts due to its gradient-based localization sensitivity, particularly in complex agricultural images with varying illumination and backgrounds. Although the model generally focuses on biologically meaningful regions such as necrotic lesions and fungal mycelia, a small number of cases revealed minor attention toward leaf edges or high-contrast background regions. These instances were limited and did not significantly affect classification accuracy. These limitations are commonly observed in Grad-CAM applications to plant disease detection under uncontrolled field conditions, where background elements and leaf edges may occasionally receive spurious attention due to gradient sensitivity [55]. Grad-CAM visualizations Although the model generally focuses on biologically meaningful regions, a small number of cases revealed minor attention toward leaf edges or high-contrast background regions. These instances were limited and did not significantly affect classification accuracy; however, they indicate that slight sensitivity to edge artifacts may still exist under certain visual conditions. Table 6 presents the computational efficiency of the proposed model, indicating its suitability for practical and real-time applications. In addition to accuracy, inference time is a critical factor for real-world deployment, particularly in edge and mobile-based agricultural systems. As shown in Table 6, the proposed model achieves an inference time of approximately 45 ms per image, demonstrating its capability for near real-time disease detection. This computational efficiency, combined with high accuracy, makes the model suitable for deployment on resource-constrained devices such as smartphones, drones, and embedded agricultural monitoring systems. Table 6Model efficiency analysisModelParametersSizeInference TimeProposed25 M98 MB45ms Model efficiency analysis Ablation study Table 7 presents the effectiveness of the SE module. The inclusion of SE blocks improves classification accuracy compared to the baseline ResNet50 model. Table 7Ablation study resultsModelAccuracyResNet5097.8%SE-ResNet50 99.31% Ablation study results Cross-validation results Table 8 presents the results of the 5-fold cross-validation performed to evaluate the robustness and stability of the proposed SE-ResNet50 model. The accuracy values across all folds remain consistently high, ranging between 99.1% and 99.4%, with a mean accuracy of 99.26%. Furthermore, the low standard deviation (± 0.10%) indicates minimal performance fluctuation across different data splits. This consistency demonstrates that the model is not sensitive to variations in training and validation partitions, confirming its strong generalization capability and reliability for cotton leaf disease classification tasks. Table 8K-fold cross-validation resultsFoldAccuracyFold 199.2%Fold 299.3%Fold 399.4%Fold 499.1%Fold 599.3%Mean 99.26% Std. Deviation ± 0.10% K-fold cross-validation results Discussion The proposed model demonstrates superior performance compared to existing methods. The integration of SE modules enhances feature representation, while Grad-CAM improves interpretability. Compared to previous studies, the model achieves higher accuracy and better generalization. Overall performance and key findings The results of this study clearly demonstrate that the proposed SE-ResNet50 hybrid architecture achieves outstanding performance in cotton leaf disease classification, reaching a validation accuracy of 99.31% with convergence at the 14th epoch. This high level of accuracy, combined with early convergence, indicates that the model is not only effective but also computationally efficient. Furthermore, the close alignment between training and validation accuracy and loss curves suggests strong generalization capability without signs of overfitting, which is a critical requirement for reliable deployment in agricultural applications . Impact of model architecture and training strategy The superior performance of the proposed model can be attributed to the combined effect of architectural innovations and optimized training strategies. The integration of Squeeze-and-Excitation (SE) blocks enables channel-wise attention, allowing the model to emphasize disease-specific features such as lesion structures, color variations, and texture anomalies. This is particularly important in cotton leaf disease classification, where inter-class similarity and intra-class variability present significant challenges. In addition, the use of Weighted CrossEntropyLoss effectively addresses class imbalance by assigning appropriate importance to underrepresented classes, thereby improving classification fairness and stability. The adoption of the Adam optimizer further enhances convergence efficiency by adapting learning rates dynamically for each parameter. Moreover, ReduceLROnPlateau contributes to fine-tuning the learning process by lowering the learning rate when validation performance plateaus, while Early Stopping prevents unnecessary training and reduces the risk of overfitting. Together, these components establish a robust and well-regularized training pipeline. Comparison with existing studies When compared with existing literature, the proposed model demonstrates clear superiority in both accuracy and methodological design. Traditional convolutional neural network (CNN)–based approaches typically achieve accuracy levels between 94% and 97%, largely due to their limited ability to capture fine-grained disease characteristics. Similarly, transfer learning–based models such as DenseNet and ResNet variants show improved performance, reaching approximately 96% accuracy; however, they often struggle with domain-specific feature adaptation and generalization. More advanced architectures, including EfficientNet and transformer-based models, have reported accuracies up to 98%. While these approaches offer strong representational power, they generally require larger datasets, higher computational resources, and more complex training procedures. In contrast, the proposed SE-ResNet50 model achieves higher accuracy (99.31%) while maintaining a balance between performance and computational efficiency. The inclusion of channel attention mechanisms allows the model to better distinguish subtle disease patterns, thereby overcoming limitations observed in previous methods. The comparative analysis provided in Table 9 presents further contextualizes the superiority of the proposed model within the broader field of cotton disease detection research. Table 9Comparative performance of state-of-the-art cotton leaf disease classification methods and the proposed hybrid SE-ResNet50 modelStudyDatasetMethodNumber of imagesAccuracy[56]Cotton leaf disease datasetInception V3171097%[57]Cotton disease datasetResNet50171090.53%[58]Self-built cotton disease dataset, Public Cotton Disease DatasetCANNet Model (CNN + Transformer)792, 311896.3%, 98.6%[59]Cotton leaf disease datasetCNN Model311796.4%[60]Cotton disease datasetTransfer Learning Models (DenseNet169, ResNet50V2)265496%[61]Cotton crop leaves datasetEfficientNetB7200098%[62]Plant Disease Classification Merged Dataset (subset)Vision Transformer (ViT)83,603 (after augmentation)90%[63]Custom-collected outdoor datasetLCDDN-YOLO (Improved YOLOv8n)671285.4%[20]Cotton leaf disease datasetMetaheuristic-optimized deep learning263798%[64]Cotton leaf diseasesCNN240194.3%[65]Cotton leaf disease datasetMachine Learning91%Proposed ModelCotton disease datasetHybrid Model (ResNet50-SE Attention) 4798 99.31 Comparative performance of state-of-the-art cotton leaf disease classification methods and the proposed hybrid SE-ResNet50 model Interpretability and explainable AI contribution A key contribution of this study is the integration of XAI through Grad-CAM visualization. Unlike many existing studies that focus solely on classification accuracy, this work provides visual evidence of the model’s decision-making process. The Grad-CAM results show that the model consistently focuses on biologically meaningful regions, such as necrotic lesions, fungal growth areas, and pest-damaged tissues. This level of interpretability is particularly important in agricultural applications, where trust and transparency are essential for adoption by domain experts such as agronomists and farmers. By validating that the model bases its predictions on relevant disease symptoms rather than background noise, the proposed approach enhances reliability and practical usability. Despite its effectiveness, Grad-CAM has inherent limitations, including sensitivity to gradient noise and a tendency to highlight high-contrast regions that may not always correspond to the most semantically relevant features. Additionally, the localization maps are relatively coarse due to the reliance on the final convolutional layers, which may limit fine-grained interpretability in certain cases. These limitations are well-documented in prior studies and should be considered when interpreting the visual explanations. Practical implications for precision agriculture The high accuracy, robustness, and interpretability of the proposed model make it highly suitable for real-world agricultural applications. The model can be integrated into decision support systems for early disease detection, enabling farmers to take timely preventive measures and reduce crop losses. Furthermore, its relatively low computational requirements and fast inference time suggest that it can be deployed in mobile or edge-based platforms, such as smartphone applications or drone-assisted monitoring systems. This capability aligns with the broader goals of precision agriculture, where intelligent systems are used to optimize crop management, improve yield quality, and minimize environmental impact through targeted interventions. Limitations and future research directions Despite its strong performance, this study has several limitations that should be addressed in future work. First, the model is evaluated on a controlled dataset consisting primarily of leaf images, which may not fully represent real-world conditions such as varying illumination, complex backgrounds, and occlusions. Second, the dataset does not include other plant organs such as stems, bolls, or flowers, limiting the model’s applicability to full-plant disease diagnosis. Future research should focus on validating the model using large-scale, multi-region field datasets to assess its robustness under diverse environmental conditions. Additionally, integrating multimodal data sources such as weather information, soil conditions, and temporal crop data could further enhance predictive performance. The deployment of the model in real-time systems, including edge AI devices and IoT-based agricultural platforms, also represents an important direction for translating this research into practical applications. In addition, future work will focus on extending the proposed architecture toward multi-organ disease detection by incorporating images from stems, bolls, and flowers, potentially through multi-branch or multimodal learning frameworks that can jointly model different plant organs. Conclusion This study presents a highly accurate and interpretable deep learning framework for automated cotton leaf disease classification, addressing key limitations found in existing approaches. By integrating SE channel attention modules into the ResNet50 backbone, the model effectively enhances channel-wise feature recalibration, enabling precise discrimination among visually similar disease classes. The combined use of Weighted CrossEntropyLoss, adaptive learning-rate scheduling, and Early Stopping ensures stable convergence, reduced overfitting, and improved generalization, as reflected in the model’s 99.31% validation accuracy. The Grad-CAM visualizations further strengthen the practical value of the model by highlighting symptom-relevant regions and increasing prediction transparency—an essential aspect for agricultural decision-making and stakeholder trust. Comparative evaluation against state-of-the-art models demonstrates that the proposed framework outperforms traditional CNNs, transformer-based architectures, and metaheuristic-enhanced models in both performance and explainability. While the model is trained exclusively on leaf images, its strong performance suggests the potential for extension to other plant organs or multimodal datasets. Overall, the proposed SE-ResNet50 hybrid model constitutes a significant advancement in AI-driven plant pathology, contributing a reliable, computationally efficient, and interpretable solution that supports early diagnosis, yield protection, and sustainable precision agriculture. However, it is important to note that the current model is limited to leaf-based disease classification and does not account for symptoms appearing on other plant organs such as stems, bolls, or flowers. Therefore, its applicability is currently restricted to foliar disease detection, and further work is required to extend the framework toward full-plant disease diagnosis under real-field conditions. Acknowledgements This study is supported by the Dicle University Scientific Research Projects Unit. Project number: SİLVAN-MYO.26.001. Authors’ contributions All authors contributed equally to the study design, methodology, implementation, analysis, and manuscript preparation. All authors read and approved the final manuscript. Funding Declaration. This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors. Data availability “Cotton plant disease.” Accessed: Nov. 21, 2025. [Online]. Available: https://www.kaggle.com/datasets/dhamur/cotton-plant-disease. Declarations Ethics approval and consent to participate Not applicable. Consent for publication Not applicable. This study does not involve human participants, human data, human tissues, or animal subjects. Competing interests The authors declare no competing interests. Footnotes Publisher’s Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. References Associated Data Data Availability Statement “Cotton plant disease.” Accessed: Nov. 21, 2025. [Online]. Available: https://www.kaggle.com/datasets/dhamur/cotton-plant-disease.