Skip to main content
Scientific Reports logoLink to Scientific Reports
. 2026 Jun 19;16:28178. doi: 10.1038/s41598-026-57901-8

Swin-SHARP: a novel approach to wheat disease classification using boosted MAML and weighted ensembling with deep learning classifiers

Waqar Khalid 1, Yazeed Alkhrijah 2, Shehzad Khalid 1,3,✉, Syed Muhammad Usman 4, Sulieman S Alshuhri 5
PMCID: PMC13554248  PMID: 42321310

Abstract

The global food security is severely threatened by various bacterial and fungal diseases that significantly degrade the quality, yield and productivity of wheat crop. This increases the need for an accurate and efficient system to improve wheat yield and mitigate these losses by enabling early intervention. The dataset used in this research comprises of 10,000 images from brown rust, yellow rust, powdery mildew, loose smut diseases and healthy wheat plants. The existing neural networks, ensembling and transformer-based models used for classifying wheat diseases are limited by high computational resource requirements that leads to inefficient feature extraction. These challenges are addressed by proposing a customized, lightweight and optimized Swin-Streamlined High Accuracy and Reduced Parameters (Swin-SHARP) transformer, a lightweight and optimized transformer model that enhances feature extraction while significantly reducing computational overhead. In particular, Swin-SHARP results in 82.5% reduction (48.9M to 8.5M parameters), making it an attractive solution for resource-constrained environments. The extracted features are further optimized by integrating the Swin-SHARP transformer with boosted Model-Agnostic Meta-Learning (MAML) and a weighted ensembling strategy to enhance generalization and classification accuracy. Our proposed model achieves a remarkable 98.1% accuracy, significantly outperforming existing CNN-based solutions, ensemble approaches, transformer, and deep learning models. We also cross-validated our proposed model on an unseen wheat plant diseases dataset, achieving 95.57% accuracy. Our proposed model is also compared against prominent models such as Inception-v3, ResNet-18, and VGG-16, which outperforms them by 1.6%, 1.7%, and 2.6%, respectively. The comparison with existing state-of-the-art models, including Sequential CNN, SGDR-S, Inception-v3, Cereal Conv, Darknet-53 CNN, EfficientNet B3, GLNet, CNN & SVM, Customized CNN, CaiT-YOLOv9 and MSFNet revealed that our method outperforms them by 0.6%, 5.8%, 5.3%, 0.75%, 2.8%, 2.68%, 1.42%, 1.3%, 3.31%, 3.29%, and 2.4% respectively. These results demonstrate the effectiveness and practicality of the Swin-SHARP transformer for wheat disease classification, particularly for real-time agricultural applications on mobile and embedded systems aimed at early disease detection and crop management.

Subject terms: Computational biology and bioinformatics, Engineering, Mathematics and computing, Plant sciences

Introduction

Wheat is one of the main staple foods and crops in the world, with a global consumption of 783 million metric tons in 2020–20211. It is essential for food security and forms the backbone of the economies of all nations, particularly those in the developing world. Pakistan produces around 26.8 million metric tons of wheat each year and ranks eighth in the world2. The agricultural sector contributes towards 25% to the GDP of Pakistan. The crop report published in 2025 states that Pakistan produces 31 million metric tons of wheat; Punjab accounts for 76.4%, Sindh for 14%, Balochistan for 5.1% and KPK for 4.5% of the total share3, as illustrated in Fig. 1.

Fig. 1.

Fig. 1

Province wise wheat production in Pakistan3,5.

The fungal, viral and bacterial infections rapidly spread through the wheat crops that directly impact its productivity, qualtiy and quantity, resulting in lower yields. Stripe rust is the commonly occuring and devastating fungal disease that accounts for 5.5 million tons of global wheat lost each year4. Accurate and timely identification and classification of wheat diseases are crucial for effective disease management and mitigation of these threats. Traditional methods are time-consuming and often require expert opinions, thus highlighting the need for advanced and automated wheat disease classification system.

The current approaches for wheat disease classification is hindered by the subtle distinctions between disease symptoms, emergence of new strains, intricate complexity and vast diversity of diseases, environmental factors promoting disease development and progression, scarcity of reliable data and absence of standardized procedures for accurate and timely classification of wheat diseases. A number of advanced and automated wheat disease classification techniques have been discussed with improved accuracy, efficiency, and reliability.

A number of supervised and unsupervised machine, and deep learning techniques have been proposed in literature to accurately classify wheat diseases. Usha et al. propose a Convolutional Neural Network (CNN)-based model that integrates a modified ResNet50 architecture to leverage the spatial feature identification in wheat leaves6. This method is further enhanced by integrating multi-scale feature fusion methods7, MSCPNET8, and attention-based networks9 to specifically concentrate on disease impacted regions. Ensemble transfer learning methods and gravitational search are employed to achieve meta-heuristic optimization that improves performance and accuracy but at the cost of substantial computational resource requirements10–12.

Qushtom et al. developed explainable CNN frameworks to provide transparency into their wheat disease classification model decision-making13. A StripeRust-Pocket model is proposed by Liu et al. with the goal to deploy an affordable and portable solution on mobile devices, however, it trade off efficiency for performance14. The existing neural networks and ensembling models are parameter-intensive and require significant resources that limit their scalability on resource-constrained edge devices.

Recently, transformers have been frequently used in literature for precise classification and identification of plant diseases. The ability to capture long-range dependencies of Class attention image transformer (CaiT), MobilePlant Vision Transformer (ViT) and Multi-source fusion network (MSFNet) are leveraged to improve classification accuracy15–17. The local and global patterns of dpalnt diseases are effectively captured by integrating CNN feature extractors with vision transformers or hierarchical attention modules. A number of hardware-specific solutions such as Jetson GPU pipelines18 or augmentation-based approaches19 have been proposed to address real-world constraints, while maintaining good performance and efficiency.

The classification of plant diseases have been revolutionized by introducing Swin transformers with shifted window-based self-attention mechanism. Swin transformer has been employed to accurately identify wheat diseases, however, this high accuracy and performance is achieved at the cost of 45 million parameters20. Yu et al. proposed Swin Transformer with Convolutional Feature Interactions (ST-CFI) to improve the classification performance on wheat datasets with complex backgrounds21. These models leverage attention mechanisms to prioritize accuracy over efficiency on large architectures and extensive training periods.

The scholars published various methods to prevent significant crop losses and classify plant diseases, (i) ResNet50 and InceptionV4, Xception, DenseNet121 and VGG1322,23, (ii) Pre-trained CNN and vision transformer24,25 and (iii) EfficientNetv1 and EfficientNetv226.

The gaps identified in the literature are addressed by proposing an optimized variant of Swin transformer to improve efficieny while maintaining accuracy. Our research proposes a novel Swin-SHARP transformer that achieves a remarkable 40.4 million reduction in paramters that significantly reduces computational complexity while maintaining high accuracy. The current neural networks, ensembling and transformer-based methods require high GPU-memory, whereas our proposed Swin-SHARP model offers a lightweight design.

The key contributions of this study includes,

  • Developing a lightweight Swin-SHARP transformer to balance accuracy and computational complexity.

  • Conducting a detailed ablation studies to evaluate the performance of the Swin-SHARP transformer and achieve an 82.5% reduction in terms of number of channels, number of layers, number of heads, parameters, while maintaining accuracy and reducing training time, epoch time, GPU, and FLOPs.

  • Integrating Swin-SHARP transformer with deep learning models, boosted MAML and weighted ensembling to classify wheat diseases and achieve 97.8% accuracy.

  • Comparing the performance of our proposed model with published deep learning and state-of-the-art models on wheat disease classification.

In this reaserch paper, the Introduction presents the research problem, a brief summary of the published methodologies and key contributions of this research. Methods section outlines the data acquisition, pre-processing and development of deep learning model. Results and Discussion part evaluates the performance of our proposed model, interpret its findings and highlight contributions. Conclusion summarizes the novelity and future research directions.

Methods

A novel approach is adapted to develop a robust, efficient, and automated architecture for the early detection and identification of wheat diseases using deep learning techniques. The proposed framework is shown in Fig. 2. The initial step is data acquisition, which contains wheat images from five different classes, such as healthy, brown rust, yellow rust, powdery mildew, and loose smut. In pre-processing, the data acquired is processed using classical and deep learning techniques to enhance the volume of the dataset. In methodology, the features from the pre-processed images are extracted using basic Swin transformer types and several Swin-Small transformer variants to find the most accurate and computationally efficient method. The output of the Swin-SHARP is fed to a homogeneous ensemble method that involves three deep learning models, such as Softmax, Recurrent Neural Network (RNN), and Long Short-Term Memory (LSTM), in combination with Adaboost and MAML techniques. Lastly, a weighted ensembling model, a heterogeneous ensembling technique, is used to find the most optimized, efficient, and accurate architecture.

Fig. 2.

Fig. 2

Proposed architecture diagram for image processing and deep learning for wheat disease classification.

Data acquisition

A thorough search of publicly accessible online resources, including scientific databases, research articles, and reliable agricultural websites as listed in Table 1, was combined with manual photography in controlled and natural environments in Pakistan to create a comprehensive dataset of images of wheat disease. The sensor used to manually capture wheat disease images is a Samsung A15 with a 50 MP camera with a resolution of 6120 x 8160 pixels. A dataset of healthy, brown rust, yellow rust, powdery mildew, and loose smut was created by capturing these diseases at seedling, flowering, grain filling, and wheat head stage from January to April 2024. This diverse and extensive dataset comprises images captured under varying lighting conditions, at different times of the day, and with various orientations. A total of 7,495 images, featuring 1,520 images of brown rust, 1,900 images of yellow rust, 1,320 images of powdery mildew, 905 images of loose smut, and 1,850 images of healthy wheat plants for analysis as shown in Fig. 3.

Table 1.

Publicly available datasets.

Fig. 3.

Fig. 3

Class distribution of publicly acquired and manually captured wheat diseases.

Pre-processing

The publicly accessible wheat disease dataset only contains a limited number of images with class imbalance that causes poor performance due to either over-fitting or under-fitting. This issue is resolved by processing the obtained images through a variety of classical and deep learning augmentation techniques that also increase the capacity and heterogeneity of the present wheat disease dataset.

Classical data augmentation techniques employed in this study involve manual manipulation of all images in the wheat disease dataset through tasks such as cropping, flipping, and rotating, as shown in Fig. 4. The areas of interest of the wheat healthy and diseased photos were manually cropped27. Every image in the dataset was rotated at a random angle between 0 and 360 degrees, creating a new image with a different orientation27. A mirrored replica of the original image is created by flipping it horizontally, which strengthens the resilience of the suggested model.

Fig. 4.

Fig. 4

Cropping, flipping, and rotation data augmentation techniques on wheat disease dataset.

Deep learning data augmentation techniques are used to further improve the quantity and magnitude of the image dataset for wheat disease. This technique produces new unseen image data that closely mimic the original data distribution by creating a significantly larger dataset, which improves the robustness and applicability of the wheat disease classification model.

DDPM algorithm

A Denoising Diffusion Probabilistic Model (DDPM)28 algorithm is used to create new images that closely approximated the actual data distribution. A technique that iteratively applies random Gaussian noise to images simulating the natural unpredictability and resulting in a huge dataset with genuine variations in texture, color and contrast.

The DDPM consists of a forward and reverse process. In the forward process, the Markov chain principle is used to create noisy samples Inline graphic, Inline graphic,....., and Inline graphic by gradually applying small quantities of random Gaussian noise to original image Inline graphic in T steps. This process is also known as diffusion or noising process. The reverse process also uses the Markov chain principle to gradually denoise the image produced by the first process Inline graphic to create Inline graphic, Inline graphic,...., Inline graphic as shown in Fig. 5. This process is also known as the denoising process. A stochastic gradient descent training algorithm, as mentioned in Algorithm 1, iteratively samples initial states, time steps, and noise vectors to minimize the difference between transformed and original noise vectors to converge to optimal model parameters. A sampling procedure for DDPM, as mentioned in Algorithm 2, refines a noise vector through iterative transformations using a learned function and noise schedules to produce a final sample from the model distribution.

Fig. 5.

Fig. 5

Denoising diffusion probabilistic model process.

Algorithm 1.

Algorithm 1

DDPM training algorithm.

Feature extraction

A transformer is a neural network design that utilizes context learning and sequence element interactions to translate an input sequence into an output sequence. A transformer is composed of two layers: one for encrypting and the other for decoding. The encryption layer consists of the self-attention sub-layer and the position-wise feedforward layer. The decoding is composed of the self-attention layer, the encoder-decoder attention layer, and the position-wise feedforward layer.

SWIN transformer

The Swin Transformer29 is a hierarchical vision transformer model that processes images using self-attention strategies. The Swin transformer builds a multilayered representation by first segmenting images into small patches and then iteratively combining adjacent patches to produce higher-level features, as shown in Fig. 6. A fixed number of computations and partitioning images are used, with each image divided into non-overlapping windows; this method achieves linear computational complexity.

Fig. 6.

Fig. 6

Hierarchical structure of Swin transformer.

The Swin transformer creates a set of visual elements with a specified form (H/4, W/4, 16 color channels) by employing a patch partition to divide an input image into multiple distinct and contiguous parts. The new set of visual elements with a modified shape (H/4, W/4, variable color channels) is created by first passing these pieces through a linear transformation and then processing them subsequently through two interconnected Swin transformer blocks. In the second, third, and fourth stages, patch merging and Swin transformer blocks are used to create elements that can be visually depicted with smaller spatial dimensions and more color channels (H/8, W/8 - double color channels, H/16, W/16 - quadruple color channels, and H/32, W/32 - octuple color channels). The input data is processed by the Swin transformer architecture using customized windows, as demonstrated in Fig. 7.

Fig. 7.

Fig. 7

Architecture diagram of Swin transformer.

The Shifted Window-based Multiple Sequence Alignment (SW-MSA) module has two Multi-Layer Perceptron (MLP) with Gaussian Error Linear Unit (GELU) non-linearity, each residual connection, and a Layer Normalization (LN) performed before each Multiple Sequence Alignment (MSA) and MLP module as seen in Fig. 8 below. The MSA module, as mentioned in Eq. (1) and the W-MSA in Eq. (2), presents an efficient substitute for the conventional MSA method, which lowers computing overhead and increases its viability for large-scale input.

graphic file with name d33e613.gif 1
graphic file with name d33e617.gif 2

where, H is the height, W is the width, C is the number of channels of the feature map and X is the size of each window.

Fig. 8.

Fig. 8

Architecture of two consecutive Swin transformer blocks.

The mathematical expressions for W-MSA and SW-MSA are defined in Eqs. (3–6).

graphic file with name d33e643.gif 3
graphic file with name d33e647.gif 4
graphic file with name d33e651.gif 5
graphic file with name d33e655.gif 6

where, Inline graphic is the current item, Inline graphic is the previous block item, W-MSA is window self-attention, LN is layer-norm, MLP is multi-layer perceptron and SW-MSA is shift window self-attention.

SWIN transformer types

The Swin transformer is a type of ViT with linear processing complexity that merges image patches in deeper layers to create hierarchical feature maps. Swin transformer models have different sizes and identification on the basis of their computational complexity and parameters such as Swin-Tiny (Swin-T), Swin-Small (Swin-S), Swin-Base (Swin-B), and Swin-Large (Swin-L) as mentioned in Table 2. Swin-T is the smallest model with 96 number of channels and approximately 28 million parameters for tasks with limited resources. Swin-S has the same number of channels as Swin-T, with almost 49 million parameters provides efficient and accurate results. Swin-B has a 128 number of channels and close to 87 million parameters for good accuracy with computational cost. Swin-L has a 192 number of channels and close to 196 million parameters for addressing highly complex issues with abundant resources. The Swin-T, Swin-B, Swin-S and Swin-L are computed against 32 batch size, 0.003 learning rate, 50 epochs and 256 x 256 pixels of input image.

Table 2.

Swin transformer types.

ST types Depth No. of layers No. of heads Parameters
Swin-T 96 2, 2, 6, 2 3, 6, 12, 24 27,518,999
Swin-S 96 2, 2, 18, 2 3, 6, 12, 24 48,963,263
Swin-B 128 2, 2, 18, 2 4, 8, 16, 32 86,989,941
Swin-L 192 2, 2, 18, 2 6, 12, 24, 48 195,210,617

Classifiers

Classification is a process used by various classifiers to classify images on the basis of their distinct features. It helps in organizing the data set by recognizing patterns and efficiently processing large datasets to make informed decisions. Large data sets are used to train deep learning models, which then understand and evaluate visual characteristics and patterns to accurately diagnose wheat diseases.

Softmax

Softmax30 creates a probability distribution by normalizing the real value vectors as mentioned in Eq. (7). It takes features extracted from the previous layer and predicts the probability of an image from a specific class. It provides an efficient, dynamic and comprehensible solution for classifying images. Softmax takes an input feature map of size 49,152.

graphic file with name d33e780.gif 7

where, c is the input vector, m is the output element, and n is the input element.

Recurrent neural network

Recurrent Neural Network (RNN)31 is a type of neural network designed to introduce spatial hierarchies of image features. It assigns weights to current and previous input, leveraging internal memory to improve processing. The RNN structure consists of successive recurrent layers with a feedback loop in hidden layers that allows the current step to be influenced by data from earlier time steps, as shown in Fig. 9.

Fig. 9.

Fig. 9

Architecture diagram of a recurrent neural network.

A fixed and steady output is obtained by iteratively calculating and transmitting the output values back to the modeling process as modified inputs, as shown in Eq. (8).

graphic file with name d33e818.gif 8

where Inline graphic and Inline graphic are the weights, k is the previous state, and y represents the biases, F is defined as the nonlinear transformation parameter, Inline graphic is the hidden number of neurons, B(t) is the input of the hidden layers and A(t) represents the output of the model. RNN reshaped a feature set of size 49,152 into a 2D representation of 192 × 256 with a batch size of 192 and 150 neurons in hidden layer.

Long short-term memory

Long-Short-Term Memory (LSTM)32 is a type of RNN that learns the order dependence to predict the characteristics of the image. The architecture diagram of LSTM, as shown in Fig. 10, consists of modulation and input gates that determine the information flow to the cell. Forget gate decides which information is crucial enough to be carried on, the cell acts as the core memory for holding information for a long duration, and the output gate controls the flow of information from the cell to the hidden layer. The working of each gate and cell on current input Inline graphic and previous state Inline graphic is represented in Eq. (9),

graphic file with name d33e885.gif 9

where A and U are the weights for input and previous states, respectively, and y represents the biases. LSTM reshaped a feature set of size 49,152 into a 2D representation of 192 × 256 with a batch size of 192 and 150 neurons in hidden layer.

Fig. 10.

Fig. 10

Architecture of long-short-term memory.

Homogeneous ensembling algorithm

Homogeneous ensembling is a technique used to improve the accuracy of classification models by combining the predictions of multiple identical models.

Adaboost algorithm

Adaboost33, also known as Adaptive Boosting, is an ensemble learning algorithm as mentioned in Algorithm 2 that iteratively trains a set of weak learners by combining their outputs to create a strong classifier, which makes predictions by taking a weighted majority vote. The weights are updated based on the performance of each weak learner, with more accurate learners receiving higher weights. The Adaboost algorithm uses 4 ensemble of learners to improve accuracy.

Algorithm 2.

Algorithm 2

DDPM sampling algorithm.

MAML algorithm

Model-Agnostic Meta-Learning (MAML)34 algorithm is a meta-learning approach that integrates various base models to improve generalization and adaptation skills for new challenges as mentioned in Algorithm 3. The objective is to train θ (neural network parameter) on a task distribution so that, in the event of a new challenge, the network may be quickly adjusted with only a few gradient steps, as shown in Fig. 11.

Algorithm 3.

Algorithm 3

Adaboost algorithm.

Fig. 11.

Fig. 11

Model-agnostic meta-learning algorithm.

A predictive framework is tuned for versatility and adaptability to a broad range of issues through meta-training. A broad notion of transitioning from classification to consecutive decision-making is defined. The formal components of each challenge includes, a transitional probability distribution Inline graphic, an initial observation distribution Inline graphic, a performance metric Inline graphic, and a sequence time C. Each challenge is represented by Eq. (10),

graphic file with name d33e985.gif 10

Figure 12 defines the model parameters such as ϕ, and the loss function, allowing the use of gradient-based methods for training and adaptation. Multiple iterations of gradient-based optimization are applied to a particular problem Inline graphic, the MAML method updates ϕ of the model and produces an updated parameter vector as mentioned in Eq. (11),

graphic file with name d33e1017.gif 11

where, Inline graphic is the loss function of Inline graphic, β is a fixed learning rate or hyper-parameter and Inline graphic are parameters learned. The performance adaptability, as mentioned in Eq. (12) of the initial model Inline graphic to a variety of challenges Inline graphic is optimized by training the model parameters.

graphic file with name d33e1050.gif 12

The model parameter ϕ is updated via meta-optimization against a range of problems using a stochastic gradient descent (SGD) technique, which allows the model to learn and adapt quickly, as mentioned in Eq. (13).

graphic file with name d33e1062.gif 13

where α is the meta step size.

Algorithm 4.

Algorithm 4

MAML algorithm.

Fig. 12.

Fig. 12

Versatile model-agnostic meta-learning framework.

Boosted MAML algorithm

Boosted MAML algorithm is a robust and adaptive learning model that integrates the Adaboost ensemble with the MAML algorithm. Adaboost combines multiple base models to improve prediction accuracy, while a meta-learning algorithm, MAML, learns to fine-tune models for new tasks. In the boosted MAML algorithm, the base models in Adaboost can be meta-trained using MAML, allowing them to adapt to new tasks and datasets more effectively. This integration leads to improved performance and generalization in various applications. The MAML algorithm employs a task division strategy, dividing the main classification task into 150 smaller sets. These sets are further split into training and testing tasks, with 100 sets dedicated to training and 50 sets reserved for testing to evaluate model performance. Each training set consists of 4 different classes, and is further subdivided into 10 support images for training and 15 query images for testing per class, resulting in more manageable sub-tasks that enable more efficient and effective disease identification. With 25 images per class, resulting in each set has 100 images. So in total, the 50 sets reserved for testing have 5000 images, whereas the 100 sets for training contain 10,000 images.

Heterogeneous ensembling algorithm

Heterogeneous ensembling is a technique used to improve the prediction accuracy by combining classification models with different architectures. In this study, we explore the application of weighted ensembling35 and boosted MAML with various deep learning classifiers for wheat disease identification. Weighted Ensembling Algorithm, as mentioned in Algorithm 4, implements a weighted ensembling technique for deep learning models by training multiple models on a dataset and computing their accuracy on a validation set alongside iteratively calculating weights for each model based on their accuracy, with higher accuracy resulting in higher weights. Finally, the combined prediction of all models using the calculated weights to produce a final ensemble output, which is evaluated on a test set to improve the overall accuracy by leveraging the strengths of multiple models.

Algorithm 5.

Algorithm 5

Weighted ensembling.

The flow chart in Fig. 13 begins with the start node that leads directly to the dataset comprising original and augmented images of healthy and infected wheat plants. The first step is to divide the dataset into training, testing, and validation sets. The testing and validation sets contains original images, while the training set comprises of both original and augmented images. Our proposed method involves designing customized variants of Swin Small transformer (Sv-I to Sv-VII and SHARP models) to extract features from the wheat disease images. These variants were optimized by varying number of channels, layers and heads to maximize performance. The most optimized and accurate Swin-SHARP model is seletec on the basis of accuracy, precision, recall, and F1 score. Softmax, LSTM and RNN are integrated with Boosted MAML and weighted ensembling to classify wheat diseases. Our proposed methodology is implemented in Python for efficient computation.

Fig. 13.

Fig. 13

Flowchart of the proposed methodological framework for wheat disease classification.

Results and discussion

The method proposed in ths research is simulated on a development setup consisting of Nvidia T4 GPU, 15GB GPU memory, 12GB RAM and 128GB hard drive. 7495 images consisting of yellow stripe rust, brown leaf rust, loose smut, powdery mildew and healthy wheat were selected from web sources and manual photography. 200 images from each class were placed in testing and validation sets. However, the remaining images undergo classical and deep learning-based augmentation to balance the dataset with each class consisting of 2000 images as shown in Table 3. To keep the evaluation fair, image augmentation was applied only after dividing the data into training, test, and validation sets. This way, no original image or its augmented versions appear in more than one set. It helped ensure that the model was tested on unseen images, making the results more reliable and reflective of real-world performance.

Table 3.

Augmented images used in training set.

Wheat diseases Original images Manual augmented DDPM augmented Total
Brown leaf rust 1320 50 430 1800
Yellow stripe rust 1700 50 50 1800
Powdery mildew 1120 50 630 1800
Loose smut 705 50 1045 1800
Healthy 1650 50 100 1800

The dataset distribution in Fig. 14 shows that 75% of the images are accumulated from online publicly available ICLR Workshop Challenge, Mundi, Watershed, Grabcut datasets, and manual photography. This dataset comprises a diverse distribution of sources, with 17% originating from ICLR Workshop Challenge, 22% from Mundi, 15% from Watershed, Grabcut, and 21% from manual photography. The remaining 25% of images from the dataset are obtained through 2% manual augmentation, such as cropping, rotating, and flipping, and 23% from the DDPM augmentation method.

Fig. 14.

Fig. 14

Data acquisition and augmentation distribution.

The DDPM augmentation technique is employed to generate new images at various epochs (60, 45, 30, and 15) as shown in Fig. 15. The generated image quality improves with increasing epochs, with the best results achieved at 60 epochs for brown leaf rust Fig. 15d, yellow stripe rust Fig. 15h, powdery mildew Fig. 15l, loose smut Fig. 15p, and healthy Fig. 15t and the worst at 15 epochs for brown leaf rust Fig. 15a, yellow stripe rust Fig. 15e, powdery mildew Fig. 15i, loose smut Fig. 15m, and healthy Fig. 15q. Therefore, we utilize the 60-epoch generated images in this study, leveraging the optimal augmentation output.

Fig. 15.

Fig. 15

DDPM augmented images at different epochs.

Effect of Swin transformer on wheat disease classification

The dataset is divided into 80% training, 10% test, and 10% validation set, enabling the model to learn from 8000 images, also providing 1000 images for testing and 1000 images for validation and hyperparameter tuning. To ensure a fair evaluation of all Swin transformer types’ performance, the number of epochs is held constant. The performance parameters of the Swin transformer types for classifying wheat diseases are outlined in Table 2. Figure 16a shows an upward trend in the accuracy curve. Swin-L achieves the lowest accuracy despite being the most computationaly complex model. Swin-B performs marginally better and is slightly less computational than Swin-L. Swin-T and Swin-S performs much better and are significantly less computationally demanding. Swin-S achieves the highest accuracy and provides an optimal balance between computational efficiency and performance. Figure 16b shows a notable decline in the loss curve. Swin-S achieves the lowest loss as compared to Swin-T, Swin-B and Swin-L and demonstrate exceptional performance. The results from Fig. 16a and b validate the excelled performance of Swin-S transformer as mentioned in Table 4.

Fig. 16.

Fig. 16

Accuracy and loss graph of Swin transformer tiny, base, small, and large.

Table 4.

Swin transformer types accuracies.

Swin transformer types Tiny Base Small Large
Accuracy (%) 96.9 97.2 97.7 94.2

Effect of Swin-S transformer on wheat disease classification

A confusion matrix as shown in Fig. 17 is constructed to evaluated the performance of Swin-S transformer in classifying wheat diseases. The precision, recall and F1-Score is computed from this confusion matrix to assess the effectiveness of the Swin-S transformer as mentioned in Table 5. Swin-S transformer achieves a minimum accuracy of 98% in classifying wheat diseases. The precision values range from 96% to 100% for brown leaf rust and yellow stripe rust to powdery mildew. The recall values range from 95% to 99% for powdery mildew to brown leaf rust and healthy. The F1-Score remains 98% for all wheat disease classes. The confusion matrix of Swin-S transformer shows that the model misclassifies 4 instances of brown rust as loose smut and 2 instances of loose smut as brown rust because both may present dark or brownish patches. Similarly, 2 instance of healthy are occasionally misclassified as yellow rust and 6 instances of yellow rust as healthy since early-stage yellow rust may present very subtle discoloration. In addition, powdery mildew is misclassified as brown rust (3 instances), healthy (2 instances), and loose smut (4 instances) because, in its early or less severe stages, it may lack the distinctive white powdery texture and instead resemble rust-like lesions or even appear similar to unaffected leaves.

Fig. 17.

Fig. 17

Confusion matrix of Swin-S transformer.

Table 5.

Swin-S performance metrics.

Wheat diseases Precision Recall F1-score
Brown leaf rust 0.96 0.99 0.98
Healthy 0.98 0.98 0.98
Loose smut 0.99 0.97 0.98
Powdery mildew 1.00 0.95 0.98
Yellow stripe rust 0.96 0.99 0.98
Accuracy 0.98
Marco average 0.98 0.98 0.98
Weighted average 0.98 0.98 0.98

The performance of the Swin-S transformer is further validated by employing a k-fold cross-validation technique. In this research, we used 10-fold cross-validation technique that partitions the dataset into 10 equal parts, and the model undergoes 10 training and testing iterations, each with a different subset for testing and the other partitions for training, ensuring the appearance of each point in both training and validation sets. k = 10 is selected for wheat disease dataset to evaluate the performance of Swin-S transformer across ten distinct data splits. Table 6 lists the results of Swin-S transformer on 10-fold dataset and achieve the highest accuracy of 97.7% at fold k = 2 and second-best accuracy of 97.1% at Inline graphic with a mean accuracy of 97.05% and a low standard deviation of 0.255.

Table 6.

k-fold model on Swin-S transformer with k = 10 for wheat diseases.

Swin-S k=1 k=2 k=3 k=4 k=5 k=6 k=7 k=8 k=9 k=10
Accuracy (%) 96.8 97.7 97.0 97.1 97.0 96.9 97.1 96.8 97.0 97.1

Effect of Swin-SHARP transformer on wheat disease classification

Swin-S transformer accurately classifies wheat diseases with 97.7% accuracy and high computational resource requirements. In this research, we propose and evaluate eight variants of Swin-S transformer with different number of channels, layers and heads as outlined in the Table 7 to find the most optimized and accurate variant. A datailed ablation studies is conducted by inputing these varaints with 256x256 image, 32 batch size, 0.003 learning rate and 50 training epochs and evaluating them on the basis of training time, epoch time, inference time, GPU utilization and FLOPs. Sv-III is the least computationally complex model, requiring 8.6 GB of GPU memory, 0.69 GMac FLOPs to achieve an inference time of 26 ms per image and 95.9% accuracy. Although Sv-IV and Sv-VI variants exhibit slightly better performance due to their larger parameter sets, they consume significantly more GPU resources and have longer inference times compared to the SHARP transformer. This increased resource demand is attributed to their layer configuration of 2, 18, 2, in contrast to the SHARP transformer with 2, 2, 18 layer structure. The Sv-I variant is more lightweight in terms of GPU usage, consuming only 7.5 GB, 2.09 GMac FLOPs and 29 ms per image inference time but incurs higher parameters and lower accuracy of 96.8%. Our optimized SHARP transformer model achieves significant 82.5% parameter reduction by streamlining its architecture reducing number of channels by 50, removing the final stage of Swin-S transformer, modifying the number of layers from 2,2,18,2 to 2,2,18 and number of heads from 3,6,12,24 to 3,6,12. This optimized model operates with 9.9 GB of GPU, 2.13 GMac FLOPs, and a 30 ms per image inference time, incurring only a marginal 0.2% accuracy loss compared to the Swin-S transformer. Meanwhile, Sv-II and Sv-V have over 33 million parameters, far exceeding the SHARP transformer 8,534,399 parameters. They also incur significantly higher FLOPs, longer inference times as compared to optimized SHARP transformer. This optimized design enables faster processing and reduced computational resources while maintaining accurate disease identification capabilities.

Table 7.

Comparison of Swin-S transformer variants on hyperparameters and computational overhead.

Swin-S types No. of channels No. of layers No. of heads Parameters Accuracy (%) Training time (hrs) Epoch time (min) GPU (GB) FLOPs (GMac) Inference time (ms/image)
Swin-S 96 2, 2, 18, 2 3, 6, 12, 24 48,963,263 97.7 5.7 3.93 12.7 8.65 40
Sv-I 48 2, 2, 18 2, 4, 8 8,494,385 96.8 5.210 3.06 7.5 2.09 29
Sv-II 96 2, 2, 18 2, 4, 8 33,537,473 97.4 5.556 3.45 9.8 7.84 42
Sv-III 24 2, 2, 18 3, 6, 12 2,261,303 95.9 5.027 2.90 8.6 0.69 26
Sv-IV 48 2, 18, 2 3, 6, 12 3,158,303 96.6 5.928 3.75 12.3 2.11 38
Sv-V 96 2, 2, 18 3, 6, 12 33,577,487 97.5 5.403 3.40 10.3 7.89 43
Sv-VI 48 2, 18, 2 2, 4, 8 3,134,705 96.8 6.524 4.52 13.4 2.08 35
Sv-VII 96 2, 18, 2 2, 4, 8 12,234,113 97.2 6.257 4.13 13.6 7.84 48
SHARP 48 2, 2, 18 3, 6, 12 8,534,399 97.5 5.188 3.13 9.9 2.13 30

The results in Fig. 18 display the performance of the Swin-S variants in classifying wheat diseases, with details of the architecture detailed in Table 7. The accuracy curve in Fig. 18a moves in an upward trajectory, with Sv-V and SHARP achieving the highest accuracy of 97.5%, but Sv-V requires more resources and has a complex architecture as compared to SHARP. In contrast, Sv-III, with the simplest architecture, as mentioned in Table 7, produces the lowest accuracy of 95.9%. The loss curve in Fig. 18b shows a decline, with Sv-III experiencing the highest losses, while Sv-V and SHARP achieve substantially lower losses. The outstanding results from Fig. 18a,b suggest that the SHARP transformer model has excelled in its training, resulting in efficient and outstanding performance, verifying the results mentioned in Table 7.

Fig. 18.

Fig. 18

Swin-S transformer types accuracies and losses.

The performance of Swin-S variants on the wheat disease dataset is comprehensively evaluated using a confusion matrix Fig. 19. The performance of seven Swin-S variants (Sv-I to Sv-VII) and the SHARP model is evaluated using confusion matrices, Fig. 19a–h. These models achieve high accuracy, precision, recall, and F1-scores, indicating excellent performance. Across all variants, the precision, recall, and F1-scores demonstrate consistently strong performance for majority of wheat disease classes. Sv-I achieves precision of 95–99%, recall values of 95–98%, and F1-scores of 96–97%. Sv-II exhibits precision of 96–100%, recall of 96–99%, and F1-scores of 97–98%. Sv-III shows slightly lower performance, with precision of 92–100%, recall of 92–99%, and F1-scores of 93–98%. Sv-IV, Sv-V, Sv-VI, and Sv-VII maintain precision values of 92–100%, recall of 94–99%, and F1-scores ranging from 95–98%. The proposed SHARP model achieves precision between 95–100%, recall of 95–99%, and F1-scores of 97–98 thus demonstrating a classification that is both robust and balanced across all classes a. Overall, all variants show strong performance for each class with SHARP providing considerably more consistent results across the disease categories.

Fig. 19.

Fig. 19

Swin-S transformer variants Sv-I, Sv-II, Sv-III, Sv-IV, Sv-V, Sv-VI, Sv-VII, and SHARP confusion matrix (CM).

The overall accuracy across the evaluated variants remains commendably high, with Sv-I, Sv-II, Sv-IV, Sv-V, Sv-VI, Sv-VII, and SHARP attaining 97%, whilst Sv-III registers slightly lower at 96%. These results indicate that although every variant performs well SHARP stands out by consistently delivering the highest accuracy. It also provides balanced and reliable performance across all disease classes. A detailed examination of confusion matrices reveals that brown rust is commonly misidentified as loose smut, powdery mildew is oftenly confused with brown rust, healthy leaves are sometimes misclassified as yellow rust, and yellow rust are also predicted as healthy. These misclassifications frequently occurs in Sv-III and Sv-IV, whereas SHARP demonstrates fewer misclassifications, providing an optimal balance between accuracy and computational complexity. The misclassifications made by Swin-SHARP transformer occur due to the similar charachteristics of wheat diseases such as the pustule patterns of brown rust and loose smut and subtle discolorations of healthy as yellow rust. Despite these occasional errors SHARP demonstrates strong and reliable accuracy. It also effectively reduces the most frequent misclassification patterns seen in the baseline variants.

The results in Fig. 20 display the accuracy of the Swin-S variants in classifying wheat diseases at 10, 20, 30, 40, and 50 epochs. The highest accuracy is achieved by SHARP at 40 epochs, closely followed by Sv-IV at 50 epochs. Sv-II and Sv-VI achieve comparable performance at 50 and 40 epochs, respectively. Sv-I at 50 epochs, Sv-V and Sv-VII also demonstrate comparable performance at 40 epochs, while Sv-III at 50 epochs trails behind. All Swin-S variants perform better at 40 and 50 epochs compared to 10, 20, and 30 epochs, indicating that additional training epochs enhance their predictive capabilities.

Fig. 20.

Fig. 20

Swin-S transformer variants accuracy at 10, 20, 30, 40 and 50 epochs.

The results from Table 8, the Swin-SHARP transformer achieved its highest accuracy of 97.5% at fold k = 3 and second-best accuracy of 97.4% at k = 7. Swin-SHARP achieved a mean accuracy of 97.27% and standard deviation of 0.216. The Welch’s one tail t-test is conducted from the resuts of 10-fold experiments with a confidence interval of 95% for Swin-S and Swin-SHARP transformers as mentioned in Tables 6 and 8. In this test, null hypothesis (Inline graphic) states that the accuracy of Swin-SHARP is less than or equal to the accuracy of Swin-S and alternate hypothesis (Inline graphic) claims that the accuracy of Swin-SHARP is greater than the accuracy of Swin-S. The standard deviations for both Swin-S and Swin-SHARP transformers are different that results in t-statistic of 2.06 with 18 degrees of freedom and critical value of 1.734. The Welch’s t-statistic value is greater than the computed t-critical, thus, resulting in the rejection of null hypothesis that indicates that the accuracy of Swin-SHARP is statistically higher than Swin-S transformer.

Table 8.

k-fold model on Swin-SHARP transformer with k = 10 for wheat diseases.

Swin-SHARP k=1 k=2 k=3 k=4 k=5 k=6 k=7 k=8 k=9 k=10
Accuracy (%) 97.1 96.9 97.5 97.3 97.2 97.1 97.4 97.1 96.9 97.2

Effect of classification models on wheat disease identification

Three deep learning classification models have been implemented in this study to demonstrate a significant impact on wheat disease identification, yielding highly accurate results. Softmax, RNN, and LSTM classifiers process wheat disease images substantially faster than traditional machine learning models and human experts. As summarized in Table 9, the results demonstrate the impressive performance of classifiers in accurately identifying wheat diseases. In particular, the Softmax classifier achieved the highest accuracy, outperforming the RNN and LSTM classifiers. These results highlight the efficacy of Softmax in wheat disease identification by exhibiting exceptional precision and efficiency.

Table 9.

Accuracy of deep learning classifiers with boosted MAML.

Classifiers Softmax LSTM RNN
Original accuracy (%) 97.51 96.40 96.70
Accuracy with Adaboost (%) 97.58 96.60 96.90
Accuracy with boosted MAML (%) 97.80 97.50 97.40

Effect of boosted MAML with classifiers on wheat disease identification

The proposed Swin-SHARP method eliminates the MLP component, instead extracting 49,152 features, which are then fed into Softmax, RNN, and LSTM classifiers. These deep learning classifiers are first enhanced with Adaboost having 4 learners, than integrated with the boosted MAML technique that leads to improved accuracy in identifying wheat diseases. The Softmax, LSTM and RNN classifiers exhibit a modest improvement in accuracy when integrated with Adaboost having 4 learners as shown in Fig. 21. Softmax achieves a marginal 0.07% improvement in accuracy, whereas LSTM and RNN both achieve a 0.2% improvement in diagnosis wheat diseases. To further improve the performance, a MAML is integrated with these classifiers as mentioned in Table 9. Specifically, Softmax with boosted MAML achieves an impressive precision of 97.8%, outperforming the original Softmax classifier by 0.4%. Similarly, the RNN and LSTM classifiers also benefit from boosted MAML, with boosts in accuracy of 0.5% and 0.7%, respectively. These findings highlight the effectiveness of boosted MAML in enhancing the performance of classifiers, leading to more accurate identification of wheat diseases.

Fig. 21.

Fig. 21

Boosted MAML learners’ effect on Softmax, RNN, and LSTM accuracy.

Effect of weighted ensembling with boosted MAML classifiers on wheat disease identification

The weighted ensembling approach is applied along with Softmax, RNN, and LSTM boosted MAML methods on the wheat disease dataset. In weighted ensembling, the weight of least accurate LSTM boosted MAML classifier is represented by, β = 97.4, while the weight of the highest accurate classifier Softmax is represented by Inline graphic, followed by the weight of the next most accurate classifier RNN, represented by Inline graphic and lastly the weight of the least accurate LSTM classifier is represented by Inline graphic35. The combination of boosted MAML and weighted ensembling techniques achieves an accuracy of 98.1% in the test set, demonstrating the effectiveness of combining both homogeneous and heterogeneous ensembling architectures for accurate classification of wheat diseases.

Figure 22 shows the confusion matrix of Softmax classifier with integrated boosted MAML and weighted ensembling. The accuracy, precision, recall and F1-Score is computed from this confusion matrix as listed in Table 10. Our proposed model achieves an accuracy of 98.1% in classifying wheat diseases. Precision values range from 97.5% to 99% for powdery mildew and yellow stripe rust to healthy. Recall values range from 97% to 100% for brown leaf rust and loose smut to powdery mildew. F1-Score ranges from 97.4% to 98.7% for brown leaf rust to powdery mildew. The detailed inspection of confusion matrix reveals that proposed model miscalssifies 3 instances of brown rust as loose smut due to the similar color of both rusts and 1 instance of brown rust as yellow rust because both exhibit patchy symptoms. 2 instances of healthy are misclassified as yellow rust because early-stages of yellow rust closely resemble the coloration of healthy leaf. Loose smut is 3 times misclassified as brown rust, both exhibit darker infected regions. 2 instances of powdery mildew are incorrectly classified as brown rust and 3 instances as loose smut, which may occur when yellow rust is not prominent. Yellow rust is once misclassified as brown rust, however it is 4 times incorrectly classified as healthy because of subtle disease patterns in the early stages of infection.

Fig. 22.

Fig. 22

Confusion matrix of Softmax classifier with integrated boosted MAML and weighted ensembling.

Table 10.

Performance metrics of weighted ensembling.

Wheat diseases Accuracy Precision Recall F1-score
Brown leaf rust 0.990 0.980 0.970 0.974
Healthy 0.994 0.990 0.980 0.984
Loose smut 0.991 0.985 0.970 0.977
Powdery mildew 0.995 0.975 1.000 0.987
Yellow stripe rust 0.992 0.975 0.984 0.979

The results from Table 11, our proposed method achieved its highest accuracy of 98.1% at fold k = 4 and second-best accuracy of 97.9% at k = 6. Our complete framework exhibited strong performane by achieving a mean accuracy of 97.72% and a low standard deviation of 0.187. The Welch’s one tail t-test is conducted from the resuts of 10-fold experiments with a confidence interval of 95% for Swin-SHARP transformer and complete framework as mentioned in Tables 8 and 11. In this test, Inline graphic states that the accuracy of Swin-SHARP is greater than or equal to the accuracy of complete framework and Inline graphic claims that the accuracy of Swin-SHARP is less than the accuracy of complete framework. The standard deviations for both Swin-SHARP transformer and complete framework are different that results in t-statistic of -6.437 with 18 degrees of freedom and critical value of -1.734. The Welch’s t-statistic value is less than the computed t-critical, thus, resulting in the rejection of null hypothesis that highlights that the accuracy of our complete framework is statistically higher than Swin-SHARP transformer.

Table 11.

k-fold model on our proposed methodology with k = 10 for wheat diseases.

Proposed method k=1 k=2 k=3 k=4 k=5 k=6 k=7 k=8 k=9 k=10
Accuracy (%) 97.8 97.5 97.5 98.1 97.6 97.7 97.9 97.8 97.6 97.7

Comparison of proposed architecture with deep learning models in wheat disease identification

To conduct a more in-depth evaluation of our proposed model, we compare its performance with widely used CNN architectures, including ViT-Base, VGG-16, ResNet-18, and Inception-v3. These models have been frequently used in literature to classifiy plant diseases, so we also train them on our wheat disease dataset and compare their performance with our proposed method to ensure fair evaluation. The accuracy and parameters of these models with our proposed method on wheat disease dataset is listed in Table 12. Our proposed method outperforms all these models by achieving the 98.1% accuracy with minimum parameters. ViT-Base achieves the minimum accuracy of 82.4% with 86 million parameters. In comparison, VGG-16 with 138 million parameters leads to 95.2% accuracy. ResNet-18 performs marginally better than VGG-16 by achieving 96.1% accuracy at the cost of 11 million paramters. However, Inception-v3 has 23 million paramters and slightly improves ResNet-18 accuracy by 0.1%. Our proposed model utilize 8.5 million parameters and achieved the highest accuracy of 98.1%, thus providing a balanced, optimal and highly accurate solution.

Table 12.

Comparison of our proposed architecture with deep learning models.

Technique Parameters Accuracy (%)
ViT-Base 86,000,000 82.4
VGG-16 138,357,544 95.2
ResNet-18 11,688,128 96.1
Inception-v3 23,851,784 96.2
Proposed architecture 8,534,399 98.1

Cross validation of proposed architecture on wheat plant diseases

Our proposed model is cross validated on an unseen Wheat Plant Diseases dataset with authentic real-world images, without any artificial augmentation. The dataset consists images of healthy wheat, brown rust, yellow rust, powdery mildew, and loose smut classes, amounting to a total of 1,243 images in the test set as mentioned in Table 13. The model yielded an accuracy of 95.57% on this unseen wheat plant disease dataset with class imbalance and without any pre-processing.

Table 13.

Comparison of proposed model accuracy on original and wheat plant diseases test set.

Wheat diseases Number of images in test set
Our wheat disease dataset Wheat plant diseases
Healthy 200 213
Brown rust 200 265
Yellow rust 200 278
Powdery mildew 200 218
Loose smut 200 269
Accuracy (%) 97.8 95.57

The performance of our proposed technique is further evaluated through the confusion matrix presented in Fig. 23. This confusion matrix shows that the model performs very well, correctly identifying most cases across five wheat disease categories. The results in Table 14 examine these metrics to determine the strengths and weaknesses of the proposed model to evaluate its effectiveness in classifying wheat diseases. The model demonstrates its high effectiveness in classifying wheat disease by achieving a minimum accuracy of 97.5% for yellow stripe rust. Precision values indicate a high degree of true positives ranging from 92% for healthy to 99.6% for loose smut class. Recall values highlight the ability of the model to detect diseased instances ranging from 92.6% for powdery mildew to 98.1% for loose smut class. The F1-score, balancing recall and precision, indicates a high level of overall performance ranges from 93.0% for healthy to 98.8% for loose smut class.

Fig. 23.

Fig. 23

Confusion matrix of proposed architecture on wheat plant diseases dataset.

Table 14.

Performance metrics of proposed architecture on wheat plant diseases dataset.

Wheat diseases Accuracy Precision Recall F1-score
Healthy 0.976 0.920 0.942 0.930
Brown leaf rust 0.980 0.951 0.958 0.954
Yellow stripe rust 0.975 0.924 0.962 0.942
Powdery mildew 0.983 0.986 0.926 0.955
Loose smut 0.995 0.996 0.981 0.988

Comparison of proposed architecture with published classifiers in wheat disease identification

The proposed architecture is compared to existing classifiers in the literature, demonstrating outstanding performance as listed in Table 15. Our proposed architecture demonstrated superior performance, achieving 97.8% accuracy, 97.8% precision, 97.7% recall, and an F1-score of 97.7% across 5 classes with 8.5 million parameters. In comparison, the second-best solution proposed by Haider et al.36 in 2021 reported 97.2% accuracy, 96.5% precision, 96.4% recall, and 96.5% F1-score, but was limited to 2-class classification with 11.9 million parameters. The per-class accuracy of our proposed model outperforms that reported in existing literature. The comparison of the results shows that our architecture delivers accuracy rates ranging from 98.3% to 99.8% accuracy in classifying healthy and disease wheat plants. In case of brown rust, powdery mildew and yellow stripe rust, our model achieves the highest per class accuracy of 99.7%, 99.3% and 99.8% respectively as compared to other models mentioned in Table 15. This highlights the effectiveness and robustness of our model in identifying wheat diseases.

Table 15.

Comparison of proposed architecture with published classifiers.

Paper Year Technique No. of classes Acc. (%) Accuracy per class (%) Prec. (%) Rec. (%) F1 (%) Parm. (M)
36 2021 Sequential CNN 2 97.2 – - 96.5 96.4 96.5 11.9
37 2022 SGDR-S 3 92 – - 92.6 91.3 92.3 14
38 2022 Inception-v3 4 92.5 Healthy Wheat 90 – 95 – –
Leaf Rust 91
Powdery Mildew 92
Stripe Rust 95
39 2023 Cereal Conv 5 97.05 Healthy Wheat 81 – – 97 –
Brown Rust 98
Mildew 80
Septoria 96
Yellow Rust 84
40 2024 Darknet-53 CNN 3 95 - – 95.4 95.3 95.3 –
41 2024 EfficientNet B3 3 95.12 - – – – – –
42 2024 GLNet 14 96.38 - – 96.65 96.35 96.37 –
43 2024 CNN & SVM 5 96.5 Stripe Rust 97 96 95.7 95.8 –
Powdery Mildew 97
Leaf Rust 97
Septoria Leaf Blotch 98
Fusarium Head Blight 98
44 2025 ViT 5 92.8 Black point 97.6 93 – 92.7 –
Blast 97
Fusarium root rot 97.2
Healthy 96.6
Leaf blight 97.2
45 2025 Customized CNN 4 94.49 – - 94.71 94.49 94.45 50.4
46 2025 ViT 4 95 Black rust 96.5 94 95 94 –
Brown rust 95.3
Healthy 96.5
Yellow rust 97.6
15 2025 CaiT-YOLOv9 7 94.51 – - 95 91 93 63.3
17 2025 MSFNet 4 95.4 Healthy wheat 99.5 95.6 95.6 – 14.2
Others 92.4
Stripe rust 91.5
Yellow dwarf 99.1
Our 2025 Proposed 5 98.1 Healthy wheat 98.3 97.8 97.7 97.7 8.5
Brown leaf rust 99.7
Loose smut 98.5
Powdery mildew 99.3
Yellow stripe rust 99.8

Conclusion

In this research, we addressed the knowledge gap, where current approaches often prioritize accuracy at the cost of computational expense and resource intensity. A novel efficient solution is proposed that leverages the strengths of our customized Swin-SHARP transformer, which is a streamlined variant of the Swin-S architecture, by integrating it with deep learning classifiers, Boosted Model-Agnostic Meta-Learning (MAML), and weighted ensembling for accurate wheat disease identification. The Swin-SHARP transformer achieves a substantial 82.5% reduction (48.9M to 8.5M parameters) while still maintaining a high accuracy of 98.1% as compared to traditional Swin-S transformer. Our model also outperforms deep learning, neural networks, and ensembling methods in the literature to classify wheat diseases by offering faster training and lower GPU memory requirements.

The scarcity of publicly available wheat disease datasets necessitated the use of data augmentation to generate a balanced dataset comprising 10,000 images. Although our wheat disease detection model is trained exclusively on a wheat disease dataset, it demonstrates strong performance. We validated the effectiveness of our proposed model by testing it on an unseen wheat plant diseases dataset and achieve an exemplary 95.57% accuracy. This rigorous test validates the capabilities of our proposed model, showcasing its suitability for real-world deployment.

Author contributions

W.K. conceived the study, designed the experimental framework, and performed the implementation and initial analysis. Y.A. contributed to methodology refinement, statistical validation, and interpretation of experimental outcomes. S.M.U. supervised the research, guided the model design, and contributed to manuscript structuring and critical revisions. S.K. provided technical oversight, validated the methodology, and managed overall project administration. S.S.A. assisted in data preprocessing, visualization, and validation of results. All authors contributed to writing, reviewing, and editing the manuscript, and approved the final version.

Funding

This work was supported and funded by the Deanship of Scientific Research at Imam Mohammad Ibn Saud Islamic University (IMSIU) (grant number IMSIU-DDRSP2602).

Data availability

The dataset and code used in this research have made publicly available on https://github.com/SWIN-SHARP/SWIN-SHARP for reproducibility purposes. This encourages researchers to take our work further and continue making strides in this field. Any queries or requests regarding the datasets or code should be directed to corresponding author

Declarations

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

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

The dataset and code used in this research have made publicly available on https://github.com/SWIN-SHARP/SWIN-SHARP for reproducibility purposes. This encourages researchers to take our work further and continue making strides in this field. Any queries or requests regarding the datasets or code should be directed to corresponding author


Articles from Scientific Reports are provided here courtesy of Nature Publishing Group

RESOURCES