Plant Disease Management: A Fine-Tuned Enhanced CNN Approach with Mobile App Integration for Early Detection and Classi�cation

Farmers face a daunting challenge in meeting the escalating demands of a rapidly growing population for agricultural products, while plant diseases continue to exact a devastating toll on food production. Despite investing billions of dollars in disease management, agriculturists often struggle to achieve effective disease control without the support of advanced technology. The article explores a deep learning-based approach for disease detection. Specifically, it employs a Convolutional Neural Network (CNN) architecture for the detection. For the automated detection of plant disease, using plant images. This paper presents a new model for the early detection of plant detection based on processing plant images. And compare the in-depth performance analysis of hyper parameters in the context of plant disease detection by focusing on three distinct crops: (Apple, Corn, and Potato). Moreover, the data augmentation impact is analyzed. To enhance accessibility for farmers, our model is seamlessly integrated with a mobile application. The experimental results show the efficiency of our fine-tuned enhanced CNN model (E-CNN) achieving 98.17% accuracy on fungal classes. This research endeavors to pave the way for more effective plant disease management and ultimately to improve agricultural productivity in the face of mounting global challenges.


Introduction
Plant diseases are now a major worldwide issue, causing food shortages in numerous nations.Identifying these diseases accurately is essential to increasing agricultural yields.Convolutional Neural Networks (CNNs) have become increasingly popular in today's artificial intelligence era as efficient instruments for accurate disease identification through picture analysis.As a result, CNNs have become a prevalent choice for the early detection of crop diseases, leading to improved accuracy [1], [2], [3] and the expansion of technology's role in precision agriculture.Detecting diseases in maize leaves typically requires continuous crop monitoring According to professionals, these methods can come with high expenses, consume a significant amount of time, and inconsistencies.To address these challenges, CNNs are employed to automate the detection and classification of maize leaf diseases swiftly and accurately [4].Numerous researchers have embarked on developing predictive models capable of determining whether maize leaves will succumb to disease or remain healthy [5].The Figure 1 likely shows a visual representation that distinguishes between plant diseases caused by infections (such as pathogens like bacteria, viruses, fungi, or pests) and diseases that result from non-infectious factors (such as nutrient deficiencies, environmental stress, or genetic factors).This research focuses on CNNs and explores hyper parameter optimization to address farmers' concerns regarding disease detection and classification.The study concentrates on different kind of diseases and makes four key contributions: (i) Exploration of pre-trained Convolutional Neural Networks (CNNs) alongside a well-tuned set of hyper parameters, resulting in the development of a suite of classifiers.(ii) Machine learning models are employed for plant disease detection.(iii) Optimizing CNN hyper parameters, like learning rate and architecture, improves performance using methods such as grid search and proper dataset splitting.(iv) Integration of Best model in Flutter mobile Application.As the global population is projected to reach 10 billion in the next 25 years, enhancing agricultural systems is imperative.Leveraging artificial intelligence, particularly CNNs, can help farmers increase food production, mitigating the looming threat of food scarcity, a potential leading cause of mortality.
There are still many problems in the previous work such as, K. Sathya [6] proposed their model RDA-CNN, inspired by CNN architecture and their accuracy is 96.59% while they did not test their model by integrating their model in mobile application.Md.Tariqul Islam [7] their proposed model has 94.29% accuracy while they also not created any system to test their  [8] presented the CNN model by tuning hyperparameters but their results are not that accurate also they did not create any system to test their model.
We will propose a model which will be more optimized, fast, and accurate than previous ones.We will experiment with different hyperparameters of CNN architecture.You can see the basic architecture of the CNN model in fig. 2. We will increase the number of layers and will use the best performer hyperparameters such as optimizer, activation function, dropout, learning rate, epoch, batch size and many more.It will be called Enhanced Convolutional Neural Network (E-CNN).We will compare this model with pretrained models, and machine learning models.And in the end, we will convert our trained model into TF Lite file then we will integrate our model in mobile based application.
The discoveries in this paper contribute valuable support for plant disease detection and classification.The subsequent sections are organized as follows: Section 2 presents relevant previous studies.The formulation of the problem and the fundamental idea underlying the proposed method are detailed in Section 3. Section 4 provides an overview of the experimental results, and the paper concludes in the conclusions section, summarizing key insights and findings.

Related Works
Numerous plant diseases and research papers addressing different ailments were previously examined.In our research, we concentrated on Potato, Apple, and Corn diseases, specifically investigating Healthy Potato leaves, Early Blight Potato leaves, and Late Blight potato leaves, and diseases of apple leaves and corn.Convolutional Neural Networks (CNNs) were harnessed as a tool for accurate disease detection.In this context, we explored various hyperparameters such as optimizers, activation functions, and dropout rates, seeking optimal configurations that would maximize accuracy [9].It is worth noting that previous research primarily employed Grid Search for hyperparameter optimization, which is an exhaustive search method.Our literature review revealed a wealth of research papers dedicated to plant disease detection using various techniques [10], [11], [12], [13] This section of our paper underscored the significance of these valuable studies within the context of CNN models.The subsequent section provided an overview of different CNN architectures applied to plant disease diagnosis.CNNs, typically adopting the Lenet-5 architecture proposed by Yann LeCun in 1998 [14], served as the common architecture.Convolution layers were frequently employed for feature extraction, followed by pooling techniques like max, min, or average pooling [9].The final layer comprised a fully connected layer for disease classification.This study employed CNN-based deep learning techniques for plant disease identification.The process typically involved dataset collection, which included high-quality images of both healthy and diseased leaves, which were later split into training (80%), validation (10%), and testing (10%) sets.The study also featured a discussion on an innovative model for leaf prediction and identification, as well as the utilization of AlexNet and other deep learning models for forecasting leaf diseases [15].These models were optimized using the NAG Algorithm and demonstrated impressive accuracy in identifying disease characteristics from images.Furthermore, we examined research that applied CNNs for precise disease identification, including pre-processing techniques and optimizers [16].The study also delved into image enhancement methods, feature extraction, and various classification methods like, FUZZY, ANN and SVM [17].In contemporary image analysis research, the selection of image datasets significantly influenced research outcomes.Colored images offered a rich visual representation but posed computational challenges due to their size and complexity.Grayscale images were more computationally efficient but lacked color-related information.Segmented images were useful for precise object localization but required labor-intensive annotation [18].Researchers had to carefully consider their dataset choice in line with their study objectives, available resources, and the balance between data richness and complexity.Table 1 depicts the dataset used, the used ML/DL model, and the detection use-cases for recent studies in the field.In particular, Durmus et el.[19] used method of deep learning to detect disease in tomato leaves.In this method two different deep learning models are used: (i) AlexNet and (ii) SqueezeNet.The training was done with the help of ten different classes of apple, potato and corn and the accuracy was 95.65% and 94.30 % for AlexNet and SqueezeNet respectively.In [15], the authors applied the detection on Apple leaves using CNN's pre-trained model which is AlexNet.The model is trained to recognize four major diseases of apple leaves and the model achieved up to 97.62% of accuracy.Another study by DeChant et al. [20] conducted automatic identification of Northern leaf blight of Maize leaf through computation pipeline of CNN that shows the challenging part of the limited data.The system got accuracy up to 96.7%.Furthermore, AlexNet and GoogLeNet architectures for deep learning were used by Mohanty et al. [24] to produce models for categorizing tomato leaf diseases.By combining learning methods and different training and testing splits, their system got accuracy of 99.35% by using PlantVillage [21] dataset.Ahmed et el.[22] used four different Pre-trained CNN network VGG-16, ResNet50, Inception V3 and VGG-19, for identification and classification of tomato leaf disease where the model got 93% accuracy.The next study is Rumpf et al. in 2010 when he discussed about the differences between healthy and un-healthy leaves of sugar beet, he trained his model in such a way that without disease particular symptoms visibility on leaves the model identify the disease by using SVM and their model got the accuracy of 97%.In [23], Nachtigall et el.used CNN in detection and grouping of leaf disease also nutritional deficiencies and herbicides damage on apple leaves their system got the accuracy of 97.3% and the dataset was up to 2539 images.Recently, Swapnil Dadabhau Daphal et.al. [24] collected their own dataset of up to 2569 images with five different categories.The author used wellknown deep learning technique MobileNet-V2 proposing the system for better generalization and the system got accuracy of 84%.The primary contribution of this study lies in the comprehensive analysis of hyperparameters in the context of plant disease detection, emphasizing three specific classes while demonstrating the effectiveness of the fine-tuned model.Our study provides valuable insights by evaluating the different CNN-based networks used in the field, offering a foundation for future research in plant disease detection.

Methodology
In this section, the architecture of the CNN model and our proposed model E-CNN for detecting and classifying plant diseases is elucidated comprehensively.

The Architecture of CNN
Convolutional Neural Networks (CNNs) stand as a fundamental framework in deep learning.They are designed to process images by determining the significance of various elements within the image through adjustable biases and weights.This process enables CNNs to distinguish between different visual aspects.The initial design of a CNN involves the manual creation of filters in its training phase, which are then refined to recognize various features in the training data.
The structural design of CNNs closely mirrors the neuronal connectivity patterns observed in the human brain, particularly drawing inspiration from the organization of the Visual Cortex.In this biological parallel, individual neuron are responsive to specific stimuli present within a constrained zone of the visual field, known as the receptive field.To comprehensively analyze the entire visual area, these receptive fields overlap, creating a collective coverage.Similarly, in CNNs, this concept is emulated to ensure a detailed and holistic interpretation of the visual input.[22,23].4 showcases the E-CNN model's design.CNNs, inspired by the human visual system, are extensively used in image processing and analysis [39].Their strength lies in classifying unprocessed input data by autonomously determining the most appropriate filters for this task.This inherent ability of CNNs to extract and recognize features reduces the computational demands typically encountered in other machine learning methods for these functions [40].Key elements of a CNN include convolutional, pooling, and fully connected layers, as outlined in summary table 2. In contrast, Artificial Neural Networks (ANNs) usually have three

Image Processing and Augmentation
We show in Fig. 5, three types of samples used for training and testing.Furthermore, as shown in Fig. 6, Data augmentation was employed during training, encompassing positional techniques like scaling, cropping, flipping, and rotation.Additionally, adjustments in brightness, contrast, and saturation were applied to enhance color quality [41].Data augmentation also featured random rotations and distortions, along with horizontal flips.This process generated eight enhanced images for each original image.All images, both original and enhanced, were initially normalized by dividing each pixel's value by 255.Furthermore, the images were resized to match the input requirements of various model architectures.Due to hardware constraints, the input size for all EfficientNet architecture models was set at 132x132, ensuring uniform comparisons among models as done in [42].Statistical Analysis serves as a pivotal scientific instrument, facilitating the examination and collection of extensive datasets.Its primary purpose is to discern prevalent patterns and trends within these large volumes of data, thereby converting them into insightful and valuable information.
We will use only one way of Analysis of Variance (ANOVA) and we assist t-student test with in the most important feature to determine the statistical difference between diseased and healthy leaves.

Mobile App Integration
The combination of TFLite, Firebase, Flutter, and Dart [43] presents a comprehensive and powerful stack for developing machine learning-powered mobile applications.TFLite, or TensorFlow Lite, facilitates the deployment of machine learning models on mobile and embedded devices, ensuring efficient and optimized inference.Firebase integration adds a robust backend to the application, offering features like real-time database, authentication, and cloud functions, enhancing the app's functionality and scalability.Flutter, a UI toolkit developed by Google, along with Dart as its programming language, provides a cross-platform framework for building aesthetically pleasing and high-performance mobile applications.The inclusion of Dart for background processing ensures smooth and responsive app behavior even when running tasks in the background.Diagrams, presumably used for system architecture or workflow visualization, contribute to the clarity and understanding of the overall application structure.Fig. 8 represents the users interaction with our mobile application in which we integrated our proposed E-CNN model.
There are two options, one to capture an image of leaf at instant while second option is to upload captured image from gallery.After uploading or capturing, the image will pass through our proposed E-CNN model and then user can see the label of result on their screen.Users can also see the details, causes, and treatment of that observed disease.In our experiment we used Redmi 13C mobile to test this E-CNN based Mobile App.After testing we observed that our application took 25 seconds on average to detect disease from the image, almost 15 seconds required for uploading or capturing image while only 10 seconds on average required for processing E-CNN model and in showing result.In the whole testing we used 4G network.Tests results are shown in fig.16.

Implementation of the Model
This section describes how the proposed method of E-CNN, was taken into consideration for comparison and evaluation, was implemented using the Scikit-Learn library and Keras, a highlevel API based on TensorFlow Lite, in Python programming language.We used Jupyter Notebook which is an interactive web-based platform for machine learning training and testing.The dataset in the above experiment was taken from kaggle, a dataset provider named PlantVillage contained 54,000 images of different plants.We used 10% of dataset as validation, 10% of dataset as testing and remaining 80% as training.During training the batch size was set to 32, and epochs was set to 100.Other hyper parameters such as learning rate was set as 0.0001.
During training we compared ADAM, ADAMAX, ADAGRAD & NADAM, we selected ADAMAX as optimizer because of its better accuracy among all.

Dataset
By 2050, human society will need to raise food production by approximately 70 percent in order to feed the world's estimated 9 billion inhabitants.Currently, infectious illnesses limit potential yield by 40% on average, with yield losses reaching 100% for many farmers in developing nations.For evaluation of the proposed method of E-CNN, The dataset in the above experiment was taken from kaggle, a dataset provider named Plant Village contained 54,000 images of healthy and infected leaves of different crops.

Evaluation Metrics
It has been noted that the PlantVillage dataset was used in most of the research.As a result, the classifications' nature and outcome are extremely similar.Additionally, some researchers have classified bean crop diseases using deep learning algorithms.To prevent findings from repeating, with the help of three deep learning models which are utilizing different optimization techniques the dataset of leaf disease has been used.After the DL model and optimization technique were shown to be the most efficient duo, the collection of photos of bean leaves underwent a varied class illnesses classification.To distinguish diseases, we collected photos of diseased leaves from PlantVillage dataset. (3) (5) Where TN and TP are the number of accurate guesses made when the actual class is False or True, respectively.Additionally, the numbers FN and FP indicate how many wrong predictions there were when the actual class was True or false, accordingly.These metrics are combined to create a graphic known as the receiver's operating characteristic (ROC) curve.This curve illustrates the trade-off between a model's classification mistakes and FN and FP rates.Furthermore, using the ROC curve, the AUC graph can be generated.Specifically, the level of separability is represented by AUC, which is led by ROC, a probability curve.AUC indicates a model's capacity to perform well in a classification test.High separability metrics indicate a superior model with an AUC close to one.Conversely, a very poor separability measure is indicated by an AUC close to zero.Assuming that sensitivity & 1-specificity correspond with the probability of TP and FP respectively, the following is an estimate of the AUC.
Table 7 shows how confusion matrix represent values.
(  The following table 8 represents the feature name and its real features such as mean_c1_rgb having the mean of red color, mean_c2_rgb having the mean of green color, and mean_c3_rgb having the mean of blue color.While std_c1_rgb refers to the standard deviation of red color, std_c2_rgb refers to the standard deviation of green color and std_c3_rgb refers to the standard deviation of blue color while min_c1_rgb is minimum of red, min_c2_rgb is minimum of green and min_c3_rgb is minimum of blue and same as for max.Max_c1_rgb is maximum of red, max_c2_rgb is maximum of green and max_c3_rgb is maximum of blue.Mean_c1_lab represents mean of L, mean_c2_lab represents mean of a, mean_c3_lab represents the mean of b same as std_c1_lab showing the feature of standard L, std_c2_lab showing the feature of standard a and std_c3_lab showing the features of standard b. at the end min_c1_lab, min_c2_lab and min_c3_lab represents minimum L, a and b and max_c1_lab represents maximum L, a and b.We have predicted these values and their classification report with the help of logistic regression and Pearson Correlation Coefficient, which is generally known as PCC, we have performed this classification using k-fold cross validation predict, which is initially put as value of 10 and we got the accuracy of up to 82% of logistic regression.Notably, the highest accuracy observed is 88%, achieved with the "0.1" dropout rate using the Adagrad optimizer.Conversely, the lowest accuracy, 1%, was obtained with the Sigmoid activation function.These results showcase the significant impact of hyperparameter selection on the performance of the plant disease detection model.Further analysis and discussion of these outcomes are provided in the following sections.This research also included a comprehensive Classification Report that considered different optimizers, activation functions, and dropout rates.As shown in Table 13, we present a comparison of pretrained models for plant disease detection using various metrics such as the number of layers, parameter count, dataset size, accuracy, and the types of diseases considered.Table 13, the accuracy levels achieved in different studies related to crop disease detection are provided.The highest accuracy recorded among these studies is 98.17%, which is achieved by the proposed system for Potato disease detection using a CNN approach on the PlantVillage dataset.On the other hand, the lowest accuracy in the table is 73.50%, achieved by Bi et al. in the case of Apple disease detection using MobileNet with 300+ captured images.This comparison serves as a reference point to evaluate the performance of the proposed system and its significance in the field of crop disease detection.Further discussions and implications of these results are elaborated upon in the subsequent sections.

Conclusion
This paper introduces an advanced model for plant disease classification, leveraging an enhanced Convolutional Neural Network (CNN) methodology.The core CNN structure underwent modifications, including an increase in the number of network layers and the incorporation of a Global Average Pooling (GAP) layer and a Batch Normalization (BN) layer.In comparison to contemporary image classification techniques, our proposed model E-CNN demonstrates superior classification accuracy, and the structural adjustments contribute to a reduction in the number of parameters.The experimental results affirm the efficacy of the proposed method, particularly in the domain of plant disease classification.Notably, the suggested E-CNN model found successful application in identifying citrus illnesses.However, it is imperative to acknowledge certain limitations in the present study, such as the utilization of a relatively dataset comprising 9175 photos.Models trained on smaller datasets are susceptible to overfitting, leading to inaccurate assessments.To address this, data augmentation was employed to artificially enhance the photos.Nonetheless, the introduction of augmentation poses a challenge: if the source data exhibits biases, the augmented images may inherit the same issues.Thus, the selection of an appropriate augmentation technique becomes a complex task.In future research endeavors, our focus will extend to training the proposed network to handle larger and more varied dataset in plant disease recognition and classification.This forward-looking approach aims to overcome current limitations and contribute to a more robust and versatile solution for plant disease analysis.

Declarations
Conflict of interest The authors declare that they have no conflict of interest.
Ethical Approval This paper does not contain any studies with human participants or animals performed by any of the authors.
Human and Animal Rights This paper does not contain any studies with human participants or animals performed by any of the authors.
Informed Consent Informed consent was obtained from all individual participants included in the study.

Figure 1 .
Figure 1.Types of Plant Diseases

Figure 3 .
Figure 3. Illustration of Proposed Framework Fig. 3 visually represents the entire workflow of our enhanced E-CNN Disease Detection Model.It offers a comprehensive overview of the model's functionality and the distinct stages it undergoes for efficient disease detection.In the next subsections we delve into a detailed breakdown of the components and steps as illustrated.

Figure 4 .
Figure 4. Architecture of E-CNN Model Fig. 2 illustrates the structure of the Basic Convolutional Neural Network (CNN), whereas fig.4showcases the E-CNN model's design.CNNs, inspired by the human visual system, are extensively used in image processing and analysis[39].Their strength lies in classifying unprocessed input data by autonomously determining the most appropriate filters for this task.This inherent ability of CNNs to extract and recognize features reduces the computational demands typically encountered in other machine learning methods for these functions[40].Key elements of a CNN include convolutional, pooling, and fully connected layers, as outlined in summary table 2. In contrast, Artificial Neural Networks (ANNs) usually have three distinct layers: Input, Hidden, and Output.Neurons in the Hidden layer are characterized by specific bias values and weights.These are multiplied with input values and passed through an activation function.If the output value surpasses a certain threshold, it gets forwarded to the next layer in the network; if not, no data is transmitted.ANNs function in a feed-forward manner, meaning data moves in sequence through the layers.The main goal in adjusting the model is to lower the cost function for each input.The primary objective during model adjustment is to minimize the cost function for each input.CNNs represent a type of neural network with one or more layers designed to extract dependencies from inputs, such as text and images.A key feature of CNNs is the convolution operation performed across multiple intermediate layers.Convolution involves the dot-product of input bundles with a grid structure and a set of weights.CNNs are particularly popular in image processing and recognition.CNN architectures have seen significant advances, with LeNet-5 in 1998 being a notable milestone.Earlier computer vision techniques relied on feature identification, demanding substantial expertise in image processing.However, CNNs have transformed image processing by automating feature extraction.They are compatible with matrices, RGB color images, and even tensors, enabling image classification, segmentation, face detection, and object identification.CNNs have found successful applications in diverse fields, including healthcare, web services, mail, and natural language processing.A CNN comprises stacked layers, including convolution, pooling, ReLU activation, and fully connected layers as mentioned in Fig.4.These layers process each input image through stages of filtering, correction, and reduction before being transformed into a vector.The convolution layer is instrumental in teaching CNNs to recognize specific features, such as object detection.Multiple convolution layers can be employed for added efficiency.The pooling layer further enhances efficiency by down-sampling, significantly reducing computational demands.
Fig.2illustrates the structure of the Basic Convolutional Neural Network (CNN), whereas fig.4showcases the E-CNN model's design.CNNs, inspired by the human visual system, are extensively used in image processing and analysis[39].Their strength lies in classifying unprocessed input data by autonomously determining the most appropriate filters for this task.This inherent ability of CNNs to extract and recognize features reduces the computational demands typically encountered in other machine learning methods for these functions[40].Key elements of a CNN include convolutional, pooling, and fully connected layers, as outlined in summary table 2. In contrast, Artificial Neural Networks (ANNs) usually have three distinct layers: Input, Hidden, and Output.Neurons in the Hidden layer are characterized by specific bias values and weights.These are multiplied with input values and passed through an activation function.If the output value surpasses a certain threshold, it gets forwarded to the next layer in the network; if not, no data is transmitted.ANNs function in a feed-forward manner, meaning data moves in sequence through the layers.The main goal in adjusting the model is to lower the cost function for each input.The primary objective during model adjustment is to minimize the cost function for each input.CNNs represent a type of neural network with one or more layers designed to extract dependencies from inputs, such as text and images.A key feature of CNNs is the convolution operation performed across multiple intermediate layers.Convolution involves the dot-product of input bundles with a grid structure and a set of weights.CNNs are particularly popular in image processing and recognition.CNN architectures have seen significant advances, with LeNet-5 in 1998 being a notable milestone.Earlier computer vision techniques relied on feature identification, demanding substantial expertise in image processing.However, CNNs have transformed image processing by automating feature extraction.They are compatible with matrices, RGB color images, and even tensors, enabling image classification, segmentation, face detection, and object identification.CNNs have found successful applications in diverse fields, including healthcare, web services, mail, and natural language processing.A CNN comprises stacked layers, including convolution, pooling, ReLU activation, and fully connected layers as mentioned in Fig.4.These layers process each input image through stages of filtering, correction, and reduction before being transformed into a vector.The convolution layer is instrumental in teaching CNNs to recognize specific features, such as object detection.Multiple convolution layers can be employed for added efficiency.The pooling layer further enhances efficiency by down-sampling, significantly reducing computational demands.

Figure 5 .
Figure 5. Types of Samples for training and testing

Figure 9 .
Figure 9. Training and Validation of MobileNet and DenseNet.

Figure 11
Figure 11  presents the classification results for different machine learning models on a given task.The Support Vector Machine (SVM) and ResNet50 achieved accuracy, with a score of 96% and 97.80.The Decision Tree model performed well with an 80% accuracy, indicating its ability to create a hierarchical decision structure for classification.Lastly, the K-Nearest Neighbor (KNN) model achieved a lower accuracy of 71%, implying that its performance was not as strong in this task, potentially due to its sensitivity to local variations in the dataset.While our E-CNN model achieved

Figure 11 :
Figure 11: Accuracy Bar Chart of Pretrained Models and Machine Learning Models

Figure 13 .
Figure 13.Proposed Confusion MatrixThe model's overall reliability was assessed through accuracy, and equations (1) to (4) were employed to calculate various performance measures using the confusion matrix.The results indicated that as the number of iterations increased, accuracy improved while model loss decreased, as illustrated in the accompanying graphs.To prevent overfitting, both training and validation accuracy were evaluated, with the model being trained over 100 epochs.In summary: In the 10th epoch, the CNN model trained on the mentioned dataset achieved an accuracy of 75%.By the 100th epoch, the CNN model's validation accuracy for the potato dataset reached an impressive 98.17%.

Figure 14 :
Figure 14: Loss and Accuracy of Proposed Enhanced CNN Model

Figure 16 :
Figure 16: Integration of TF model in flutter mobile application

Table 1 List of previously implemented deep-learning techniques: Year Author Datasets Method Research Areas 2016
Figure 2. Architecture of Basic CNN Model

Table 2 :
The Configuration of E-CNN Architecture A CNN architecture using the Keras Sequential model, designed for image classification.The initial operation, assumed to be rescaling, adjusts pixel values from the typical 0-255 range to a normalized scale of 0-1.The network then applies Conv2D layers with 32, 64, and 64 filters, sequentially, to detect increasingly complex features in the input images.
extracting detailed hierarchical features from the input images.The final part of the network involves flattening the 2D feature maps into a 1D vector, followed by a densely connected layer with 64 units and ReLu activation.Another dropout layer is applied before the output layer, which consists of 10 units, representing the number of classes in the classification task, and utilizes softmax activation for multi-class classification.The architecture is capped off with a final dropout layer before the output, enhancing model generalization.Overall, this CNN

Table 3 :
HyperparametersTable3shows several important hyper parameters which set up to affect the learning process during the training phase of a machine learning model.Training is done for this model over a period of 100 epochs, where an epoch is one full iteration over the dataset.The model's weights are updated using the ADAMAX optimizer, and the loss function selection is set to sparse categorical cross-entropy, which denotes a situation in which the target variable is categorical, and the classes are incompatible.To maximize computing effectiveness and memory utilization, the training data is handled in batches of 32 samples at a time.The dataset's images are standardized to 256 pixels in size, with three channels signifying the representation of RGB color.

Table 4 and
Fig. 5 report information about different types of diseases affecting plants.

Table 6
shows the algorithm of our proposed E-CNN model where you can see the each step clearly. 3.

4 Feature Extraction and Selection Feature
Extraction: First, basic properties like statistical characteristics of colors (like RGB, HSV, and CIELab, min, max, mean, standard deviation, bias, and kurtosis) will be extracted.Textural and morphological elements like Haralick or Local Binary Patterns can be extracted if necessary.Feature Selection: We can determine the salient characteristics of all diseases plus the salient characteristics of nutritious vegetables with the aid of feature selection.To find hidden patterns in the data, we employed filter techniques like Pearson Correlation Coefficient (PCC), Variance, ANOVA and Principal Component Analysis (PCA).Variance is a measure of how sensitive the model is to variation in the training set.It is a metric for the extent that the model's predictions change depending on the subsets of the training set it is trained on.Moreover, it can be defined as how much the predicted values are away from each other.A high variance model runs the risk of being overfitting because it is excessively complicated and captures both the random noise and the deeper trends in the data.Because the model has basically remembered the training data instead of generalizing from it, overfitting happens if a model performs outstanding over trained data but badly on unknown data.
ANOVA: ANOVA refers to the Analysis of Variance.It is used to show the difference between two or more than two means.It is generally used to identify which features are most important in predicting outputs.It is an important feature of feature selection.Principal Component Analysis (PCA): PCA is used to overcome overfitting errors in model through different views, it is a statistical procedure that uses orthogonal alteration that fluctuates set of correlated variables to set uncorrelated variables.

Table 7
Confusion matrix

Table 8 :
Features Extraction

Table 9 :
Logistic Regression on Extracted Features

Table 10 .
Result comparisons of Pretrained models on plant disease detection

Table 12 :
Result of Hyperparameters Table12, each trained model underwent individual training with distinct optimizers, learning rates, epochs, dropout rates, and batch sizes.These variations were meticulously analyzed to determine their impact on model performance.The confusion matrix generated during the analysis facilitated the calculation of key classification metrics, including True Positive (TP), False Positive (FP), True Negative (TN), and False Negative (FN).These metrics are instrumental in evaluating the model's classification accuracy and error.To provide clarity, these classifications can be understood in the context of multi-class image classification as follows: True Positive (TP): Refers to images correctly categorized within their respective classes.False Positive (FP): Denotes images from relevant categories that were inaccurately classified as belonging to unrelated categories.True Negative (TN): Signifies correctly categorized images, excluding those within the relevant categories.False Negative (FN): Represents images from unrelated categories that were erroneously classified as belonging to relevant categories.These classifications were employed to compute performance metrics using the equations presented.The experimentation conducted in this study leveraged the Jupyter Notebook and focused on CNN models.The proposed research study centered on the potato, apple, and corn dataset, consisting of 9175 images divided into train, test, and validation sets.The potato dataset encompassed three distinct classes: healthy, early blight disease, and late blight disease, apple and corn also have divided with their respective diseases.In this experiment, various CNN models underwent training using different optimization approaches (specifically, Adam, Adamax, Adagrad, and Nadam) with fixed learning rates, epochs, and batch sizes.In table12the classification results for different hyperparameter settings are presented.
[45]e 12provides numerical representations and insights into various aspects of the experimentation, including the validation accuracy, the impact of different activation functions, and the effect of varying dropout rates.The results indicate promising outcomes, with Softmax activation and a dropout rate of 0.1 emerging as particularly effective configurations for the model.Further experimentation and exploration of these findings could lead to improved plant disease detection models with real-world applications.In Figure10(e) and (f), our pre-trained VGG-16 model demonstrated an impressive 91% accuracy while utilizing 23 layers with a total of 138 parameters.The associated image dataset occupied 528 MB.It is evident that our VGG-16 model outperformed the study in terms of accuracy.Moving on to Figure10(c) and (d), our finetuned model based on the pre-trained AlexNet[44],[45]achieved an accuracy of 87.56% with just 8 layers and a minimal parameter count of 60.The image dataset used for this model was 240 MB in size.Thus, our AlexNet model showcased superior accuracy compared to the referenced study.Now, in Figure10(a) and (b), our pre-trained ResNet50 model exhibited remarkable accuracy, reaching an impressive 98%, while boasting a substantial 50-layer depth with a parameter count of only 23.The image dataset occupied 98 MB.Clearly, our ResNet50 model excelled in accuracy.In Figure9(a) and (b), our pre-trained DenseNet 121 model achieved an accuracy of 92.20% with a substantial 121 layers.The specific parameter count is not mentioned.The image dataset size was 93 MB.It's worth noting that despite its increased accuracy, the parameter count has been reduced from 4.24 million to a mere 3.47 million.Lastly, in Figure9(c) and (d), our pre-trained MobileNet model attained an accuracy of 84.02% using 88 layers and a parameter count of 3.37.The image dataset was relatively compact at 14 MB in size.

Table 13 :
Baseline and target performance levels