A subscription to JoVE is required to view this content. Sign in or start your free trial.

Research Article

A Transform-Based Extraction and Advanced Cross-Attention-Aided Convolutional Stacked Sparse Autoencoder for Tomato Disease Detection

2 views

⸱

DOI:

10.3791/69982

⸱

October 9th, 2026

 , 

In This Article

Summary

The proposed method aims to accurately diagnose and classify tomato plant diseases using image enhancement, SIFT-based feature extraction, COA-driven feature selection, and a cross-attention aided convolutional stacking sparse autoencoder.

Abstract

Low agricultural productivity is significantly influenced by plant diseases. Most farmers find it difficult to accurately recognize and effectively control plant diseases. Early disease detection is essential to minimizing future losses. This paper presents a novel deep learning framework for the precise categorization of tomato plant diseases. An Adaptive Threshold-Based Bilateral Filtering (ATBF) approach is used in the pre-processing step to improve image quality and reduce noise. Scale-Invariant Feature Transform (SIFT) is used for feature extraction, and the Coati Optimization Algorithm (COA), which lowers dimensionality by taking advantage of the coati's unique hunting and escape tactics, is used for feature selection. A Cross-Attention Aided Convolutional Stacked Sparse Autoencoder (CA-CSSAE) is proposed for classification, combining cross-attention mechanisms, sparse representation, and convolutional learning. The proposed model outperforms existing techniques in terms of precision, recall, and F-measure, achieving 99.5% accuracy across experiments on the PlantVillage dataset, which includes a variety of tomato diseases. PlantVillage dataset is a publicly available standard dataset. The proposed framework demonstrates effective tomato disease classification on the PlantVillage dataset and provides a robust approach for automated disease detection.

Introduction

Knowledge of the agricultural sector is of great importance in contributing to the nation's growth1. The UN’s Food and Agriculture Organization (FAO) projects that by 2050, the global population will reach approximately 9.1 billion2. To satisfy the global nutritional demands, food production must increase by approximately 70% by 2050. Nevertheless, to maximize food production and improve farmers’ profits, various factors must be considered3,4. To maintain living standards and overcome food shortages, agriculture must be effectively integrated into the global market. In addition, plant diseases are the primary cause of crop losses5. Due to widespread crop diseases, crop loss can severely affect the country’s economy. The data on different types of crops and their associated diseases, along with their early detection, play an important role in the agricultural sector. This study examines 10 tomato leaf condition classifications using the PlantVillage dataset, including nine disease categories and one healthy class. Bacterial Spot, Early Blight, Late Blight, Leaf Mold, Septoria Leaf Spot, Spider Mites (Two-Spotted Spider Mite), Target Spot, Tomato Mosaic Virus, and Tomato Yellow Leaf Curl Virus are the disease classifications with healthy tomato leaves6. The main concern for optimal food yield in agriculture is the classification and study of diseases. Food safety remains a major concern due to inadequate technological adoption and infrastructure7,8. Crop diseases have a profound economic impact, largely reducing farmers’ incomes and increasing customers’ food prices. These issues can lead to severe food shortages and hunger, especially in underdeveloped countries9. In general, crop diseases are determined by human resources by directly observing crop areas in the field10. However, this process is time-consuming and makes it difficult to monitor every plant.

Therefore, the determination of plant diseases is urgently needed for food security, disease management, and yield assessment11. Plant disease detection is an important research topic, as it enables monitoring of large crop fields and analysis of disease symptoms in affected leaves. In earlier studies, molecular biological and immunological approaches were used to detect plant diseases12,13. However, these methods require significant resources, specialized personnel, and high costs. Since most growing areas belong to underdeveloped nations, costly solutions are impractical for farmers14. To improve decision-making performance, machine learning (ML) methods are used in agriculture15. Due to the rapid development of digital methods, large amounts of data can be applied via ML-based methods to drive better decisions. ML techniques like K-nearest neighbours (KNN), decision trees (DT), support vector machines (SVM), etc., are utilized for plant disease classification in the existing algorithms16. The overall effectiveness of traditional machine learning techniques is impacted by their high processing resource requirements and often poor detection resilience17. Also, the utilization of small feature subsets minimizes the system’s localization efficiency18. Still, there are huge requirements for performance enhancement, especially for making decisions for large amounts of data. Recently, the robustness of deep learning (DL)-based approaches19, such as deep belief networks (DBN), recurrent neural networks (RNN), and convolutional neural networks (CNN), has yielded better outcomes than ML. Some of the familiar CNN approaches20, including AlexNet, ResNet, VGG and GoogleNet, have achieved better results in crop disease classification tasks.

Tomatoes are among the most common vegetables consumed worldwide. However, pests, fungi, viruses, and other diseases quickly affect the tomato plants and impact the production rate. To avoid large-scale crop losses, early-stage detection of tomato diseases is crucial. However, farmers have utilized excessive pesticides to prevent multiple diseases, such as leaf spots, late blight (LB), early blight (EB), etc. Excessive usage of pesticides harms the soil quality and the environment. To mitigate these issues, various studies have designed an automated disease detection system. Nevertheless, the current systems have several drawbacks, including misclassifications, feature dimensionality, computational cost, and difficulties managing inputs. Thus, for making an effective disease classification task in tomato leaves, designing a novel model is highly important. Recently, hybrid deep learning models have become increasingly popular in disease detection. Because hybrid deep learning networks can effectively learn feature relationships and focus on the most relevant feature maps for accurate detection. Also, the deep layers in the neural network architectures help to analyze the variations among each disease category and produce improved classification performance. In this study, a PlantVillage dataset is utilized to address the issues and accurately categorize several tomato diseases. In the proposed work, a robust classification model is implemented to achieve improved accuracy with minimal computational time. Training and inference times under the same hardware setup are used to quantify reduced computational time. The main contributions of this study are as follows. A robust deep learning model, CA-CSSAE, is proposed for accurate and computationally efficient tomato disease classification. Adaptive Threshold-Based Bilateral Filtering (ATBF) is employed to enhance image quality by suppressing noise during preprocessing. Scale-Invariant Feature Transform (SIFT) and the Coati Optimization Algorithm (COA) are used for feature extraction and feature selection to improve training performance while reducing feature dimensionality. Finally, the proposed approach is compared with existing state-of-the-art methods to evaluate its effectiveness.

For analyzing diverse leaf diseases in apple trees, Yadav et al.21 presented the Apple Foliar Disease Network (AFD-Net). This existing research has employed a plant pathology dataset from the Kaggle public dataset for 2020 and 2021. The AFD-Net model used the Hybrid EfficientNet method for categorizing foliar diseases. The presented model associates B3 λ layers and B4 network layers to prevent overfitting issues. An accuracy of 98.7% was achieved for the Plant Pathology 2020 dataset, and 92.6% for the Plant Pathology 2021 dataset. However, the major drawback is excessive time consumption. Javidan et al.22 established a multi-class SVM to identify and classify grape leaf diseases. Through the adoption of K-means clustering, the disease symptom areas were separated from healthy portions. The principal component analysis (PCA) method was carried out to minimize the feature dimensionality, and the necessary features were selected through the relief selection method. The accuracy rate for the Gray-level co-occurrence matrix (GLCM) features was 98.71%, while 98.97% was attained using PCA. A deep CNN model was presented by Upadhyay et al.23 to detect rice plant leaf diseases. The plant diseases were identified based on the size, shape, and colour of the lesions in the leaf images. Otsu’s global thresholding strategy was employed to binarize the image and eradicate unwanted noise. The pooling and convolution layers' many repeating components were used to extract the effective features. For classification, a fully connected layer and a softmax layer were used. An overall accuracy of 99.7% was obtained, but the computational complexity was found to be very high.

The combination of attention-based models with trained CNN-based EfficientNet models was described by Ravi et al.24 to identify the small, affected regions of cassava leaf. Kernel principal component analysis (KPCA) was used to solve the feature dimensionality problems. A stacked ensemble meta-classifier was used with the combined, minimized features for better categorization. Support vector machine (SVM) and random forest (RF) were employed for the prediction, and a two-stage model known as a stacked ensemble meta-classifier was used. The classification was done using the logistic regression (LR) model. The obtained accuracy value was 87%, which was relatively very low. The nine tomato plant diseases, yellow leaf curl virus, mosaic virus, two-spotted spider mite, target spot, bacterial spot, Late Blight (LB), leaf mold, early blight and Septoria leaf spot, were effectively classified in this research. The classification process was carried out using EfficientNet-B5 in Bhandari et al.25 without segmenting the affected portions. To demonstrate the interpretability of the model, locally interpretable model-agnostic explanations and gradient-weighted class activation mapping (GradCAM) were used. The average testing accuracy of 99.07% was obtained on consideration of 10-fold cross-validation. Effective accuracy can be attained, but the complexity was high, and the convergence rate was low. ML-based approaches and other statistical methods require manual features for processing, and the performance degrades. Hence, DL-based methods have a significant role in diagnosing different plant diseases. In particular, the DL frameworks are investigated to solve the difficult problems in a relatively short amount of time. Ineffective pre-processing causes several drawbacks, such as deteriorated image quality and performance suppression due to the large amount of noise. Due to incorrect classification and increased time consumption, overall performance is diminished. Therefore, this study proposes plans to design a novel classification methodology to promote better classification outcomes.

Access restricted. Please log in or start a trial to view this content.

Protocol

In the proposed work, tomato crop disease categorization is done by using a new hybrid architecture. Initially, the input images of multi-class plants are gathered from a public dataset and pre-processed using adaptive threshold-based bilateral filtering techniques. Then, using the SIFT approach, a different set of features is extracted. Following that, the feature selection procedure is done to mitigate the feature dimensionality problem by using the COA technique. Finally, multiple classes of plant diseases are classified by proposing a new CA-CSSAE model. Figure 1 shows the basic model of the proposed algorithm.

Image Pre-processing Using Adaptive Threshold-Based Bilateral Filtering (ATBF)

To eliminate noise from the raw tomato leaf images while maintaining crucial edge and texture information, apply Adaptive Threshold-Based Bilateral Filtering (ATBF). Bilateral filtering is an edge-preserving smoothing technique that reduces noise by combining spatial closeness with intensity similarity. Although the classic bilateral filter successfully preserves image edges, it has a high computing cost, is sensitive to parameter selection, and performs badly when noise levels are high. These limitations motivate the use of more adaptable pre-processing methods for improved image enhancement. The filtering performance is evaluated under different noise conditions. Conventional bilateral filtering requires repeated evaluation of each pixel and uses fixed parameters. Impulse or speckle noise in the local window affects filtering performance. The filtered output for each pixel using a weighted average of neighboring pixels. After normalizing the filtering response, spatial and grayscale similarity weights are calculated using Gaussian kernel functions. By dynamically altering the filtering parameters, adaptive thresholding can enhance denoising performance in a variety of noise scenarios. Both speckle and impulse noise are meant to be handled by the ATBF approach. By modifying the filtering weights according to local image properties, adaptive thresholding efficiently reduces noise while preserving edge and texture information. The mathematical expression of processing the input images in ATBF is given as,

Mathematical expression: Vxy ∈ φ, |Vxy - σw| ≤ j · μw; inequality formula.    (1)

These are some examples of fast adaptive thresholds data processing rules, where j is the sample trimming depth. In the image’s reference frame, the sample’s (x,y) intensity value is represented by Vx,y. S indicates the dimension of the local window, and μw and σw are specified as the mean and standard deviation of each sample in the reference window of the image, respectively. The similarity weight between the central pixel and its neighboring pixels is calculated based on grayscale intensity. The geometric similarity is calculated using a Gaussian kernel function based on spatial distance between pixels. The computed weights are normalized using a normalization factor.

Kernel equation k(i) definition; integral symbol; mathematical analysis diagram.   (2)

where Mathematical function expression g(f(η), f(i)), illustrating nested function composition. is the similarity weight of the grayscale of the centre pixel i and η represents the nearby pixel, central pixel i,q(η,i) function is the weight of the geometric similarity value and its surrounding pixels η, h(i) is the normalization index.

Mathematical formula for double integral concept in functional analysis; equation of h(i).   (3)

Gaussian kernel function is computed to determine geometric similarity between the central pixel and surrounding pixels. The following steps were taken to construct the Gaussian image kernel function to determine geometric similarity.

Equation for exponential function in scientific data analysis, showing q(η,i)=e^(-1/2)(d(η,i)/χd)^2.   (4)

where d represents the geometric expansion factor, which primarily limits the geometric expansion factor of the low-pass filter intensity and d(η,i) stands for the distance among the surrounding pixel point η and the central pixel point i. The low-pass filtering power decreases with decreasing χd value, and the resulting filtering result becomes clearer. The construction of the Gaussian kernel function of grayscale similarity is as follows,

Mathematical formula for static equilibrium, \( g(f(n), f(i)) = e^{-\frac{1}{2}(f(n), f(i)/k_r)^2} \).   (5)

The diffusion factor for grayscale image similarity is called χr. Equations (1) to (5) show that with conventional bilateral filtering, each pixel must be evaluated numerous times, resulting in the poor real-time performance of the method. Mean and standard deviation is computed for each sample within the reference window. The terms μw and σw are expressed as Equations (6-7),

Statistical variance equation, μw=√(1/S²ΣΣ(Vx,y-σw)²), mathematical formula.   (6)

Static equilibrium equation, σᵥ formula, mathematical calculation, educational diagram.    (7)

All data within the local reference frame would be kept and subjected to bilateral filtering if μw and σw  Equation (6); otherwise, the samples would be removed. After the trimming of the samples, the combined weight of filtering k(i), which is produced by Equations (5) to (7), as well as the initial sample, η is then swapped out for the trimmed sample φ. Depending on the trimming depth value j, the edge similarity index (ESI) and equivalent view number of looks (ENL) are utilized to evaluate how effectively the bilateral filter preserves the edges of an image during processing.

The ENL and ESI were computed to evaluate edge preservation and speckle reduction. ESI assesses how comparable the edge maps of the original and filtered images are, whereas ENL is calculated as Enhanced noise level formula: ENL = μ²/σ², used in image analysis and quality assessment. within a homogeneous image region, where larger ENL values indicate stronger speckle suppression. As the value of trimming depth increases, more sample data and image features are maintained, but despeckling efficiency will decrease. The construction of the depth kernel function is specified as Equation (8),

Equation of diffusion coefficient; scientific formula, diagram; educational resource.    (8)

where μk represents the value of the overall image’s standard deviation μw and  represents the local reference window’s standard deviation value. In the truncated image, a smaller weight value φ represents a higher ability to shorten the image feature information. The amount of automatically trimmed data samples is lower, the edge data and texture of j image are well retained, and μw is more than μk as well as the value of A is larger if the filtered pixel is an edge pixel in the image. However, if the pixels filtered are mostly cluttering pixels, μw is smaller than μk and smaller j becomes more pixels that diverge from the deleted images of the mean value. As a result, there are a lot of automatically trimmed samples, which can significantly improve the smoothness of the speckle noise. The significant speckle noise signal is smoothed due to the improved accuracy of the enhanced combined similarity weight, which also aids in keeping the image’s edge detail information. After the pre-processing stage, the denoised image is then given to the feature extraction stage, where the features are extracted by SIFT techniques.

Feature extraction

SIFT feature extraction is implemented with the OpenCV library, ContrastThreshold is 0.04, edgeThreshold is 10, sigma is 1.6, features are 500, and OctaveLayers is 3, which are the parameters that are set. Low-contrast and edge-response keypoints were filtered using standard SIFT criteria, and only the remaining stable keypoints were used for feature extraction. Enhancing classification performance requires feature extraction. In this work, robust features are extracted from pre-processed images using the SIFT approach. By identifying keypoints and characterizing them using 128-dimensional descriptors based on local gradient orientations, SIFT successfully manages issues including scale and rotation variations, light alterations, and perspective rotations.

Although convolutional neural networks can learn hierarchical features end-to-end, the inclusion of SIFT-based handcrafted features in the proposed framework is motivated by their ability to capture scale- and rotation-invariant local keypoint descriptors, which can be particularly helpful in situations with little data variability or subtle disease patterns. By adding robust local structure information to the learned representations, SIFT features improve the discriminative capability in the work. It is acknowledged that adding hand-crafted features to deep learning increases computing costs and may not always be necessary, especially when large and diverse datasets are available for end-to-end training. The current study employs this hybrid approach to benefit from the advantages of both paradigms, particularly when working with controlled datasets.

Extreme detection for scale in space: This phase of filtering aims to isolate the scales and locations that can be distinguished between images of the same object. The ‘scale space’s function is used to find an effective way. Furthermore, it has been demonstrated that Gaussian functions are based on probabilistic assumptions. Equation (9) defines the scale space:

Economic model formula, E(p,q,π)=U(p,q,π)•I(p,q), illustrating utility function.    (9)

The term E(p,q,π) represents the scale space, U(p,q,π) is a variable-scale Gaussian, I(p,q) is the input image and (•) is the convolution operator.

The next step is to identify the keypoints’ stable positions in the scale space using a variety of techniques. Such a method is the variance of the Gaussians, which locates scale-space extrema, B(p,q,π) by calculating the difference among two images, where one image has a scale g times than the other image. Difference of Gaussians (DoG) computation refers to how the DoG image is calculated in the SIFT algorithm. It is obtained by subtracting two Gaussian-blurred versions of the same image at different scales. The expression for D(p,q,π) in Equation (10):

Static equilibrium, energy difference equation D(p,q,π)=E(p,q,gπ)−E(p,q,π), formula analysis.    (10)

Every theme is contrasted with 8 neighbours on the same scale, as well as 9 neighbours down and up a scale to find the local maximum and minimum values of D(p,q,π). An extrema is a point that lies between the lowest and highest values among all these points.

Localization and filtering of the key point

This step identifies the weak contrast images and incorrectly positioned images on the edge and eliminates the additional essential spots from the list. This computes the Laplacian value for each keypoint identified in step 1. The following Equations indicate where the extremum, k is in Equation (11):

Partial derivative equation; k = -∂²B⁻¹/∂p² * ∂B/∂p; mathematical formula.    (11)

When the function value at k is lower than a predetermined level, this point is degraded. Low contrast extrema are eliminated in this way. As a result, extrema determined by insufficient localization are eliminated in some cases when there is a considerable principal curvature at the boundary but a tiny curvature in the opposite direction in the variation of the Gaussian function. When the variations are less than the ratio of the eigenvector from the 22 Hessian matrix at the location and scale of the key point, then it is ignored.

Assignment of orientation

Using local image attributes, this step will provide continuous orientation to the key points. Once expressed in relation to this orientation, the keypoint descriptor, which is detailed below, becomes rotation-invariant. select the Gaussian-smoothed image corresponding to the scale of the keypoint. Next, calculate the gradient magnitude, h using:

Edge detection formula \( h(p, q) \) in digital image processing, mathematical equation.    (12)

and determine the gradient orientation, Φ using:

phase angle calculation equation, delineates image processing method, math formula analysis   (13)

Construct an orientation histogram from the sampled points and identify the highest peak. Assign the dominant orientation represented by this peak to the keypoint. Additional peaks with heights equal to at least 80% of the highest peak may also be assigned, resulting in multiple orientations for some keypoints. For each selected peak, fit a parabola to the three nearest histogram values to interpolate the peak location more accurately.

Keypoint descriptor:

Keypoint descriptors are created by applying Gaussian weighting depending on the keypoint scale and aligning the local gradient information with the keypoint orientation. Each cell in the 4 × 4 grid created by dividing the image region has an 8-bin orientation histogram. For every keypoint, a 128-dimensional feature vector is created by combining these histograms.

Feature selection

To decrease dimensionality and increase efficiency, the feature selection stage finds the most pertinent features. In this work, redundant features are removed using the COA, a population-based metaheuristic motivated by coati behavior.

The Coati Optimization Algorithm is a minimization problem where the fitness function simultaneously minimizes the classification error and decreases the number of selected features. The objective is to identify the optimal feature subset that achieves high classification accuracy while reducing feature redundancy. The fitness function is defined as follows:

Fitness equation; α(1-Accuracy)+β(|S|/lf); mathematical formula; optimization analysis.  (14)

where, S represents the features subset, f represents the total feature set, α,β are the weighting factors. Fitness equation; α(1-Accuracy)+β(|S|/lf); mathematical formula; optimization analysis. Initializing feature placements in the search space at random is the first step in the method.

Random number generation formula, Px: px,y = LBy + rand(UB - LB), statistical analysis.  (15)

In Equation (14), Px denotes the location of the xth feature in the search area, px,y indicates the range of yth decision variable, M denotes the number of coatis, N represents the number of decision variables, rand denotes a random number ranging between 0 and 1 and UBy and LBy  specifies the upper bound and lower bound of the yth decision variable. The population initialization of COA is given in the matrix.

Matrix equation Q transformation; symbol; educational math concept; vector notation.    (16)

where,Q mentions the discovered objective function’s vector and Qx represents the discovery of the discovered objective function based on xth coati. Each iteration of the algorithm updates the candidate solutions, which update the best features. The two distinct phases of updating the COA population are explained as follows.

Hunting and attack tactics (exploration phase)

In the exploration phase, search agents can migrate to different locations within the exploring region and demonstrate the COA’s ability to search globally within the problem-solving area.

Equation (17) represents the position of the best features,

Species interaction equation; method chart; population dynamics simulation formula; ecological model.  (17)

The update process will accept the new feature locations if they raise the goal function value; otherwise, the search agents will remain in their previous placements. The position updation of search agents to obtain the optimal features is expressed as,

Static equilibrium equation P<sub>x</sub>=f(F<sub>x</sub>,P<sup>s1</sup><sub>x</sub>) in mechanics diagram.   (18)

where Static equilibrium formula, P_s1_x, equations; relevant for physics and engineering studies. mentions the updated position of  xth search agent, the objective function value is represented as Static equilibrium diagram, summation of forces, ΣFx=0, illustrating balanced forces in physics.. The term rand represents the random value ranges from 0 to 1. Iprey represents the feature's location in the exploring region, which refers to the best position, Iprey y denotes the yth position, I is an integer randomly selected among [1, 2], the location of the prey is represented as Static equilibrium diagram with equation ΣFx=0; demonstrates balance of forces, educational use., Prey population growth, logistic equation, mathematical model, population dynamics analysis. is the ythdimension, Static equilibrium; equation ΣFx=0; diagram; forces analysis in physics education. is the objective function and (•) specifies the great integer function or floor function.

The action of fleeing predators (exploitation phase)

In the exploitation phase, the location of search agents in the exploring region is changed based on the natural behavior of each piece of information in encountering and avoiding predators.

Equations (19) and (20) are employed to analyze the random spot to mimic the behaviors of each coati.

Static equilibrium equations; LB and UB local bounds formula; educational diagram.  (19)

Genetic algorithm formula diagram for parameter optimization using random variation and local bounds.  (20)

The newly generated position is beneficial and is represented as Equation (21)

Static equilibrium equation Px={Psx²,Fsx²<Fx;Px,else} formula; physics concept study.   (21)

here, Static equilibrium; equation F<sub>x</sub><sup>2</sup>; mechanics analysis diagram; vector forces balance.  indicates the objective function value, Probability equation Ps^2x, depicting mathematical relationship; used in statistical analysis. is its yth dimension, rand is a random term varied between 0 and 1, c represents the iteration count and Static equilibrium formula, LBylocal in subscript, educational diagram for physics concepts. and Static equilibrium equation, UBy^local symbol, force balance concept, educational diagram. are the local lower bound and upper bound of the yth decision variable, respectively. The terms LBy and UBy mentions the lower bound and upper bound of the yth decision variable. The basic flowchart of the optimization technique is given in Figure 2.

Classification

The suggested CA-CSSAE model is used for classification following feature selection. This hybrid architecture efficiently learns discriminative and hierarchical features by combining convolutional layers, stacked sparse autoencoders, and attention algorithms. The attention module suppresses unimportant information while highlighting significant patterns like lesions and textures. The following hyperparameters, like learning rate 0.001, batch size 64, activation tanh, epochs 300, optimizer Adam, and hidden units 2, are used to divide the tomato illnesses into 10 classes.

To improve reproducibility, the CA-CSSAE architecture has been described layer by layer, as initially Convolution Layer (3 × 3 × 3 pixels) follows Max Pooling Layer (2 × 2), then a Cross-Attention Layer. Subsequently, perform SAE1 (200 hidden units), then SAE2 (400 hidden units) follows Softmax Output Layer (10 classes), then the final image (32 × 32 × 3 pixels). The model was trained using the categorical cross-entropy loss function, and then it was optimized using Adam. The notation 32 × 32 × 155 represents a feature tensor of spatial size 32 × 32 pixels with 155 extracted feature channels. Tomato leaf sections that have already undergone background removal and noise filtering are called segmented images.

A layer of attention that has been modified for the proposed model is called the cross-attention layer. In there, N the number of CSSAE. Vector notation formula in linear algebra, illustrating force components as a matrix equation. is the input features, where Matrix equation F∈R^(d×p), mathematical expression, relevant to linear algebra studies. is the input image. The terms d and p refer to the dimensions of the image and the number of pixels, respectively. The ith CSSAE hidden output is represented by the formula Hierarchical data structure equation \(H^i=[h_1^i, h_2^i, ... h_p^i]\); formula representation.  where Static equilibrium, \( H^i \in \mathbb{R}^{p \times 2d^i} \), mathematical equations.,  distands for the ith CNN hidden dimension. As indicated in the following Equation (24), the row-max-pooling is employed for jth CSSAE hidden output, which has the form Matrix equation H^j=[h_1^j,h_2^j,...h_p^j] in linear algebra diagram..

Max pooling formula, k=h_s^i=maxpooling_{row}(H^i), mathematical equation for neural networks.  (22)

where Linear algebra formula, \( k \in R^{2dj}, dj \), integral part of vector space concepts. represents hidden dimensions of the jth CNN. To get query matrix K , the k is used n times where Mathematical symbol equation, \( K \in \mathbb{R}^{p \times 2d} \), matrix representation concept.

The attention weight is then calculated using the additive approach, as stated in the following expression:

Mathematical equation depicting neural network computation: z = v tanh(V K + V H).  (23)

Softmax function equation in probability theory and neural networks. (24)

where, tanh function is used in this instance as the activation function. The relevance of the qth hidden output of the jth CNN is indicated by the expression Equation showing probability notation y(a=q|Hⁱ,K) in statistical diagram, Bayesian inference concept.. The weighted average representation of the hidden output of the jth CNN is obtained using the normalized attention weight Bayesian inference equation, P(a|H^i,K), statistical analysis method for hypothesis testing. as demonstrated in the following formula:

Mathematical equation for probability distribution, Σ notation, formula in statistical analysis.   (25)

where Mathematical notation, static equilibrium, equation: h_s ∈ R^d^i, d^i. represents the hidden dimension of the jth CNN. The final pixel form hs is created by combining Static equilibrium formula, \( h_s^j \), in equation for mechanical balance study. and static equilibrium, ΣFx=0, ΣFy=0, forces diagram, vector analysis, physics, mechanical balance  as given inside the expression below:

Mathematical equation, static equilibrium, diagram, showing symbol h_s with summation.   (26)

where Mathematical expression of vector space notation, h_s ∈ Rⁿˣ²⁽ⁱ⁺ʲ⁾, illustrating dimensions.. The value of i depends on the value of j. The element from {1,2,...,j-1}, i is a subset of all sets made up of elements.

The essential building block of a CNN is the convolutional layer. Assume a convolutional layer now where the convolution kernel is EN×N and the input is a matrix LM×M in which the padding is 0, and the stride is 1. This layer’s output is C of size (M - N + 1)×(M - N +1), and Equation (29) shows how to estimate C.

Mathematical expression for matrix calculation; symbol Σ for summation, indices a, b, i, j.   (27)

where ReLU, Leaky ReLU, or Sigmoid are examples of non-linear activations f. The pooling layer, which is commonly max pooling or average pooling, is a further basic building block in CNN. By reducing the output size, the pooling layer could further minimize the computing complexity.

Unsupervised learning is the foundation of AE neural system functions (feed-forward back-propagation). The input images are reconstructed using AE, which produces same sized output images. The encoder and decoder phases are the two important processes in the AE model. Assume a vector X contains unlabelled sub-inputs, which are represented by the letters Mathematical formula for sequences \(S_1, S_2, ..., S_m\) with real number vectors \(x_i \in \mathbb{R}^n\).

The Z hidden layers Equation for neural network hidden layers, z_i in R^u, u equals total hidden units, formula. that are produced during the encoder stage are shown in Equation (30).

Mathematical function formula, f(X)=Z=ω(aX+b), linear algebra, equation.  (28)

The kernel vector and bias are represented by a and b respectively. The activation module’s symbol is Static equilibrium diagram, equation ΣF=0; illustrates balance of forces for educational reference.. (As defined in Equation (31)).

Logistic function equation, ω(X) = 1/(1+e^(-X)), mathematical expression.   (29)

The reconstruction or decoding phase is indicated by Equation (30).

Equation showing linear transformation with symbols, exploring mathematical expression.   (30)

where Equilibrium diagram, ΣFx=0, illustrating static balance principles and forces analysis. represents the reconstructed vector’s result, a represents the kernel vector, b mentions the bias value and Static equilibrium diagram, equation ΣF=0; illustrates balance of forces for educational reference. represents the error value introduced during back-propagation.

At the hidden layer Z, the stacked autoencoder (SAE) has sparsity parameters. The main objective of SAE is to quantify the ideal kernel values (a,a) and associated bias representations (b,b). Then, as shown in Equation (31), the optimal values are obtained by minimizing a cost function.

Static equilibrium equation SAE=ε+γ+ηφ; formula illustration; education research.   (31)

where ε is used to represent the MSRE (as shown in Equation (32)).

Mathematical formula for error calculation ε; summation with vector norms; educational use.   (32)

here γ stands for the weight decay module (also called the L2 regularisation weight). This reduces overfitting (which is mentioned in Equation (31)).

Equation of nonlinear optics formula γ=(φ/2)(||a||²+||â||²), showing intensity relation.   (33)

where η (controls weight), as mentioned in Equation (33) and Static equilibrium diagram with ΣFx=0 and ΣFy=0 equations, force vector analysis. shows the sparsity penalty (sparsity regularization)

Static equilibrium equation φ=Σⁿₐ=₁KL(λ‖λ̂ₐ), mathematical formula, educational use. (34)

where λ indicates the value of the sparsity parameter. ln mentions the entire number of neurons in the hidden layer, while KI stands for the KL (Kullback-Leibler) divergence unit. The average activation values of the hidden neurons are given as Unit vector notation, λ̂_a symbol, mathematical equation, vector analysis concept..

Layers SAE1 and SAE2 are stacked to reduce the dimensionality of large feature maps. The first SAE output serves as the second SAE’s input. As the innermost layer of the stack, shallow SAE is used rather than the entire SAE. The term “Shallow SAE” refers to the SAE-exclusive encoder section that has been chosen for the process of feature learning and acquisition. The features are also passed on to the following layer. The softmax is chosen to connect the layered network.

Static equilibrium equation, SSAE formula, educational equations and symbols.   (35)

Equation Δ(Zi) = (eaiZi) / (Σ_j=1^T eaiZi); mathematical formula for distribution analysis.   (36)

where zi is used to represent the CA-CSSAE output. Classification based on probability is done using the softmax classifier Δ. With T  showing all classes, ai stands for the ithneuron unit kernel vector. The probability of the ith class is displayed in the output Δ(Zi).

For training the CA-CSSAE, the segmented images (X) are provided. There are 155 slices in the input vector, which has a size of 32 × 32 × 155. As a result of the input 32 × 32, the CA-CSSAE model is given 1024 units. It is sent to SAE1 as an input with 200 concealed units. An initial image vector is constructed in SAE1 with bias and weight, and then it is fed into SAE2 as an input. In SAE2, a feature vector is produced using 400 hidden units together with bias, weight and many hyperparameters. On the basis of the feature vector acquired from SAE2, the classification is performed using the softmax layer. Also, the parameters of the proposed CA-CSSAE model are fine-tuned by using the Adam optimizer to mitigate the training complexities. Figure 3 represents the classification model of the proposed model.

Experimental analysis

The proposed work is implemented in a Python tool, with Python libraries used in the implementation including TensorFlow, Keras, OpenCV, NumPy, SciPy, Scikit-learn, and Pandas, with the PlantVillage dataset. The computer was equipped with a 64-bit operating system, an x64-based processor, an Intel Core i5-3470 CPU running at 3.20GHz and 8GB of installed RAM. The proposed model is evaluated with existing models for key elements like accuracy, precision, recall and f-measures. The research compared many plant diseases like LB, YLCV, BS, EB, TSSM, TMV, LM, SLS and TS. A detailed explanation is given in the following section.

The COA's stopping criterion is set at a maximum of 100 iterations or until the fitness improvement set at 10-4 convergence threshold. The COA population has thirty agents. For model initialization, Xavier (Glorot) initialization is used for convolutional and autoencoder weights, and biases are initialized to zero. Every test uses a predetermined random seed value of 42 to ensure reliable and reproducible results. A batch size of 64 and a learning rate of 0.001 are used during 300 epochs of training. The 2 hidden units is the number of hidden layers in the architecture. After evaluating several settings, the optimal trade-off between computational efficiency and model performance was found in the selected setup. The hyperparameter tuning was performed using manual trial-and-error.

It was discovered that a reduced number of hidden units was adequate to avoid overfitting and computational overhead while simultaneously capturing the key feature representations following dimensionality reduction via COA. These requirements offer experimental consistency and greatly improve the suggested procedure's repeatability, transparency, and dependability. Table 1 displays Reproducibility and Implementation Settings.

The implementation settings utilized in this investigation to guarantee reproducibility are summarized in Table 1. By clearly defining these parameters, the suggested model's transparency and dependability are increased, and consistent experimental replication is made possible.

Dataset details

The PlantVillage dataset, a publicly available standard dataset for categorizing plant diseases, was used in this study. There are about 54,000 images of plant leaves from 14 distinct crop varieties, both healthy and diseased. From this dataset, only the tomato leaf subset, which comprised 20,732 images of both healthy leaves and different tomato disease categories, was selected. Every image has a resolution of 250 × 250 pixels. Before feature extraction, the recommended Adaptive Threshold-Based Bilateral Filtering technique was applied as a preprocessing step to enhance image quality and reduce noise. The selected tomato photographs were divided into training, validation, and testing sets using a 70:20:10 ratio. From this, the proposed study has chosen the tomato crop, which is presented in a separate folder26. The resolution of each image in this dataset is 250 × 250 pixels. Table 2 represents the total number of images of the diseases present in the tomato plant.

Access restricted. Please log in or start a trial to view this content.

Results

Performance evaluation for different types of disease

The proposed model is evaluated using different diseases in terms of accuracy. The proposed model achieved an accuracy value of 99.87% for EB, 99.1% for LB and 99.23% for TMV, respectively. Furthermore, the existing methods reproduced and evaluated each current strategy under the same experimental conditions, such as the same dataset, data split, evaluation metrics and hardware/software environment, to provide a fair and ob...

Access restricted. Please log in or start a trial to view this content.

Discussion

The proposed CA-CSSAE model demonstrates strong performance in tomato disease classification, achieving high accuracy, precision, recall, and F-measure across several disease classes with test data. Each component, such as pre-processing (ATBF), feature extraction (SIFT), feature selection (COA), and classification (cross-attention with stacked sparse autoencoder)21, contributes positively to overall performance, according to the ablation study. Specifically, the complete model configuration attai...

Access restricted. Please log in or start a trial to view this content.

Disclosures

Authors declare that they have no conflict of interest.

Acknowledgements

No funding is provided for the preparation of manuscript.

Access restricted. Please log in or start a trial to view this content.

Materials

List of materials used in this article
NameCompanyCatalog NumberComments
Deep learning frameworkGoogle LLCVersion 2.x, https://www.tensorflowTensorFlow
Operating SystemCustom built systemx64-based architecture64-bit Operating System
ProcessorIntel Corporationhttps://www.intel.comi5-3470@ 3.20 GHz;  Intel Core i5-3470 CPU @ 3.20 GHz
Programming LanguagePython software foundationVersion 3.x, https://www.python.orgPython
RAMGeneric/OEM/8 GB DDR3 RAM

References

  1. Dogan M, et al. Dry bean cultivars classification using deep CNN features and salp swarm algorithm based extreme learning machine. Comput Electron Agric. 2023;204:107575.
  2. Moupojou E, et al. FieldPlant: A dataset of field plant images for plant disease detection and classification with deep learning. IEEE Access. 2023;11:35398–35410.
  3. Wajid AH, et al. Tomato leaf disease detection and classification using convolutional neural network and machine learning. J Comput Biomed Inform. 2024.
  4. Bhosale S, Chhabria A. Tomato Plant Disease Identification via Deep Learning Technique. Int J Image Graph. 2024;2650007.
  5. Bruno A, et al. Improving plant disease classification by adaptive minimal ensembling. Front Artif Intell. 2022;5:868926.
  6. Wang X, Liu J. An efficient deep learning model for tomato disease detection. Plant Methods. 2024;20(1):61.
  7. Kumar VV, et al. Paddy plant disease recognition, risk analysis, and classification using deep convolution neuro-fuzzy network. J Mob Multimed. 2022;18(2):325–347.
  8. You H, Lu Y, Tang H. Plant disease classification and adversarial attack using SimAM-EfficientNet and GP-MI-FGSM. Sustainability. 2023;15(2):1233.
  9. Kumar S, Pal S, Singh VP, Jaiswal P. Performance evaluation of ResNet model for classification of tomato plant disease. Epidemiol Methods. 2023;12(1).
  10. Borhani Y, Khoramdel J, Najafi E. A deep learning based approach for automated plant disease classification using vision transformer. Sci Rep. 2022;12(1):11554.
  11. Umar M, et al. Precision agriculture through deep learning: Tomato plant multiple diseases recognition with CNN and improved YOLOv7. IEEE Access. 2024;12:49167–49183.
  12. Chouchane A, Ouamanea A, Himeur Y, Amira A. Deep learning-based leaf image analysis for tomato plant disease detection and classification [conference presentation]. Presented at: 2024 IEEE International Conference on Image Processing (ICIP); 2024. pp. 2923–2929.
  13. Albattah W, Nawaz M, Javed A, Masood M, Albahli S. A novel deep learning method for detection and classification of plant diseases. Complex Intell Syst. 2022;8(1):507–524.
  14. Narayanan KL, et al. Banana plant disease classification using hybrid convolutional neural network. Comput Intell Neurosci. 2022;2022:9153699.
  15. Mohameth F, Bingcai C, Sada KA. Plant disease detection with deep learning and feature extraction using PlantVillage. J Comput Commun. 2020;8(6):10–22.
  16. Raghuram K, Borah MD. A hybrid learning model for tomato plant disease detection using deep reinforcement learning with transfer learning. Procedia Comput Sci. 2025;252:341–354.
  17. Pandian JA, et al. Plant disease detection using deep convolutional neural network. Appl Sci. 2022;12(14):6982.
  18. Tiwari M, et al. Tomato disease detection using vision transformer with residual L1-norm attention and deep neural networks. Int J Intell Eng Syst. 2024;17(1).
  19. Vinutha HR, Pashanth GK, Karegowda A. An Effective Analysis of Tomato Plant Leaf Disease Identification Using Deep Learning [conference presentation]. Presented at: International Conference on Data Science and Network Security (ICDSNS); 2024. pp. 1–4.
  20. Chen Z, et al. Plant disease recognition model based on improved YOLOv5. Agronomy. 2022;12(2):365.
  21. Yadav A, et al. AFD-Net: Apple Foliar Disease multi classification using deep learning on plant pathology dataset. Plant Soil. 2022;477(1):595–611.
  22. Javidan SM, Banakar A, Vakilian KA, Ampatzidis Y. Diagnosis of grape leaf diseases using automatic K-means clustering and machine learning. Smart Agric Technol. 2023;3:100081.
  23. Upadhyay SK, Kumar A. A novel approach for rice plant diseases classification with deep convolutional neural network. Int J Inf Technol. 2022;14(1):185–199.
  24. Ravi V, Acharya V, Pham TD. Attention deep learning-based large-scale learning classifier for Cassava leaf disease classification. Expert Syst. 2022;39(2):e12862.
  25. Bhandari M, et al. Botanicx-AI: Identification of tomato leaf diseases using an explanation-driven deep-learning model. J Imaging. 2023;9(2):53.
  26. Spagnolo F, Corsonello P, Frustaci F, Perri S. Efficient implementation of signed multipliers on FPGAs. Comput Electr Eng. 2024;116:109217.

Access restricted. Please log in or start a trial to view this content.

Reprints and Permissions

Explore More Articles

Deep Learning FrameworkPlantVillage DatasetFeature ExtractionBilateral FilteringScale-Invariant Feature TransformCoati Optimization AlgorithmCross-Attention MechanismImage Preprocessing