Leaf diseases detection empowered with transfer learning model

: The detection of leaf diseases using modern technology has significant importance in agriculture and artificial intelligence. Deep learning, specifically, plays a crucial role in this field, as it enables accurate and efficient disease classification. Early detection of leaf diseases is vital to implementing timely treatments and preventing widespread damage to leaves. Leaf diseases can be caused by various factors, including bacteria, fungi, viruses, and other pathogens. Among them, bacteria and viruses are the most invasive and can lead to substantial yield losses if not identified and treated promptly. Bacterial and viral infections are common in agricultural settings, affecting leaves of all types and ages. Our research aims to propose a transfer learning-based model for predicting leaf diseases using a dataset of leaf images. The images will be classified into healthy or diseased leaves based on extracted features. The proposed model, named Leaf Disease Transfer Learning Algorithm (LDTLA), demonstrates promising results with an average accuracy of 97.37% on the dataset. Utilizing convolutional neural networks (CNN) and deep learning techniques, our LDTLA model outperforms previous quantitative and qualitative research studies in leaf disease detection. This advanced approach to leaf disease identification holds the potential to revolutionize agriculture by enabling farmers to make informed decisions, implement targeted treatments, and minimize leaf losses caused by diseases.


Introduction
In agriculture, there exists a diverse range of leaf diseases caused by various factors, including bacteria, fungi, viruses, and other pathogens.Some bacteria and viruses can be beneficial for leaves, aiding in nutrient uptake, pest control, and disease resistance.However, others can be highly detrimental, leading to severe yield losses and economic implications for farmers.Leaf diseases pose a significant threat to agriculture and food security.Early detection of these diseases is crucial to implementing timely and effective treatments, preventing their spread, and mitigating potential damage to leaves.Timely intervention can save leaves, increase yields, and reduce the need for excessive chemical inputs.Transfer learning, a technique commonly used in deep learning algorithms, has shown great promise in various image processing tasks and computer vision applications, including leaf disease detection.By leveraging pre-trained weights from large datasets, transfer learning allows models to learn relevant features efficiently, even with limited labeled data.
In our proposed study, we aim to develop a transfer learning-based model for leaf disease detection.The model will be trained on a dataset of leaf images as shown in Figure 1, representing both healthy and diseased plants.The model's architecture, inspired by convolutional neural networks (CNNs), will enable it to learn meaningful features from the images and classify them accurately.The binary classification problem in leaf disease detection will involve distinguishing between healthy leaf images and those infected with various diseases.The proposed model is expected to outperform classical machine-learning techniques, which rely on manual feature extraction, and deliver higher accuracy in classifying leaf diseases.The successful implementation of this transfer learning-based approach holds the potential to revolutionize leaf disease management, empowering farmers with a powerful tool to detect and combat diseases early on.By enabling swift and accurate detection, this model can contribute to improving agricultural practices, optimizing resource utilization, and ensuring global food security.The proposed transfer learning-based model aims to accurately classify such images, aiding farmers in making informed decisions and adopting appropriate disease management strategies.Deep learning and machine learning techniques are utilized for the leaf disease detection system we create.We adopt a supervised learning approach when dealing with various types of leaf images.In supervised learning, we establish a function F with two inputs, x, and y, and aim to map them to an output z = f(x, y) using datasets of input leaf images.The Convolutional Neural Network (CNN) learns from the provided weights represented by W by analyzing the pixels in the image, focusing on the specific regions of interest.
The remainder of this paper is structured as follows: In Section 2, we will review related work on leaf disease detection using machine learning and deep learning methods.In Section 3, we will delve into the components and the architecture design of our proposed system.The fourth section will discuss the dataset used in our research and the evaluation of the model's performance.The research aims to develop an advanced leaf disease detection system using state-ofthe-art deep learning techniques.By employing supervised learning, we can effectively train the model to distinguish between healthy and diseased leaf images.The architecture design will leverage CNNs to efficiently learn relevant features from the images, enabling accurate classification of leaf diseases.In Section 2, we will explore existing literature on similar applications of machine learning and deep learning for detecting various leaf diseases.By studying previous work, we can build upon the advancements and identify potential improvements for our approach.Section 3 will focus on the technical aspects of our proposed system.We will discuss the components that constitute our model, such as data preprocessing, CNN architecture, hyperparameter tuning, and other relevant considerations.
The research dataset, explained in Section 4, plays a crucial role in training and evaluating the performance of our leaf disease detection model.A comprehensive dataset that includes diverse examples of healthy and diseased leaves will be essential for the system's accuracy and generalization.Finally, in Section 4, we will conduct an in-depth performance evaluation of the proposed model.The evaluation will involve metrics such as accuracy, precision, recall, and F1-score to assess the model's effectiveness in detecting leaf diseases.By thoroughly examining the results, we can draw meaningful conclusions about the model's capabilities and identify areas for potential enhancements.In conclusion, this research aims to present an advanced leaf disease detection system that leverages the power of deep learning and supervised learning techniques.By accurately identifying and classifying leaf diseases, this system has the potential to revolutionize agriculture practices, contribute to increased yields, and ensure global food security.

Related work
The detection of leaf diseases from images is a challenging task in agricultural imaging and deep learning.The vast diversity of leafs and diseases makes it difficult to efficiently and accurately classify the data manually.To address this issue, deep learning offers a promising solution by providing an automated approach that can detect various leaf diseases caused by bacteria, fungi, viruses, and other pathogens.The use of leaf x-ray images can be employed to identify the presence of diseases in Leafs, including both bacterial and viral-related diseases While traditional machine learning methods have been used for leaf disease detection, deep learning models, particularly convolutional neural networks (CNNs), have shown significant advantages, especially when working with image datasets.Researchers have explored different CNN architectures and applied transfer learning to fine-tune pretrained models for leaf disease detection, achieving impressive results.Previous studies have also highlighted the challenge of data scarcity in the context of leaf diseases, which necessitates significant effort in research.To overcome this limitation, researchers have leveraged datasets like ImageNet and used transfer learning to enhance the performance of the detection models.Early diagnosis of leaf diseases is essential to prevent further spread and mitigate their impact on leaf yields.Deep learning models, in combination with image segmentation techniques, have been proposed to improve the accuracy of detection and reduce computational complexity.
Comparative analysis between deep learning and traditional machine learning approaches has consistently shown that deep learning models outperform on performance evaluation metrics.Researchers have also explored novel approaches, including ensemble models and adversarial network techniques, to enhance the detection capabilities of the models.Transfer learning has emerged as a critical technique in deep learning-based leaf disease detection, allowing models to utilize knowledge from previously learned data sequences and improve classification on different types of leaf diseases.The main contributions of the research in this domain include increasing precision and accuracy in leaf disease detection, setting high threshold criteria, and conducting comparative analysis with previous studies to enhance prediction systems.Recent works in leaf disease detection have also explored transfer learning with CNNs.Researchers have fine-tuned pre-trained models on various leaf disease datasets, achieving impressive accuracy and outperforming state-of-the-art methods.In conclusion, transfer learning is a promising approach for improving the accuracy and efficiency of leaf disease detection from images.It allows models to leverage knowledge from pre-trained models and enhance classification on different types of leaf diseases.Although previous research has shown significant progress, further exploration is needed to apply transfer learning to other imaging modalities and real-world agricultural settings [1].The vast diversity of leaves and diseases makes it difficult to efficiently and accurately classify the data manually [2].To address this issue, deep learning offers a promising solution by providing an automated approach that can detect various leaf diseases caused by bacteria, fungi, viruses, and other pathogens [3].The use of leaf x-ray images can be employed to identify the presence of diseases in leaves, including both bacterial and viral-related diseases [4,5].
While traditional machine learning methods have been used for leaf disease detection, deep learning models, particularly convolutional neural networks (CNNs), have shown significant advantages, especially when working with image datasets [5,6].Researchers have explored different CNN architectures and applied transfer learning to fine-tune pre-trained models for leaf disease detection, achieving impressive results [7].Previous studies have also highlighted the challenge of data scarcity in the context of leaf diseases, which necessitates significant effort in research [8].To overcome this limitation, researchers have leveraged datasets like ImageNet and used transfer learning to enhance the performance of the detection models [8,9].Early diagnosis of leaf diseases is essential to prevent further spread and mitigate their impact on leaf yields [10].Deep learning models, in combination with image segmentation techniques, have been proposed to improve the accuracy of detection and reduce computational complexity [11,12].
Comparative analysis between deep learning and traditional machine learning approaches has consistently shown that deep learning models outperform on performance evaluation metrics [13].Researchers have also explored novel approaches, including ensemble models and adversarial network techniques, to enhance the detection capabilities of the models [14].Transfer learning has emerged as a critical technique in deep learning-based leaf disease detection, allowing models to utilize knowledge from previously learned data sequences and improve classification on different types of leaf diseases [15].The main contributions of the research in this domain include increasing precision and accuracy in leaf disease detection, setting high threshold criteria, and conducting comparative analysis with previous studies to enhance prediction systems [16].Recent works in leaf disease detection have also explored transfer learning with CNNs [17,18].Researchers have fine-tuned pre-trained models on various leaf disease datasets, achieving impressive accuracy and outperforming state-of-the-art methods [19].In conclusion, transfer learning is a promising approach for improving the accuracy and efficiency of leaf disease detection from images [20].It allows models to leverage knowledge from pre-trained models and enhance classification on different types of leaf diseases.Although previous research has shown significant progress, further exploration is needed to apply transfer learning to other imaging modalities and real-world agricultural settings.Limitations in leaf disease detection research include the use of conventional CNNs, limited dataset classes and images, and relatively lower accuracy and higher loss rates compared to advanced models.Further research and development are required to address these limitations and advance leaf disease detection systems using deep learning approaches.Limitations in leaf disease detection research include the use of conventional CNNs, limited dataset classes and images, and relatively lower accuracy [21] and higher loss rates compared to advanced models.Further research and development are required to address these limitations and advance leaf disease detection systems using deep learning approaches.

Model and materials
Deep learning and machine learning [22] have revolutionized various fields, including medicine and medical diagnosis.With the help of modern high-capability graphics cards, a considerable amount of data can be trained and tested rapidly.Artificial intelligence is being implemented in diverse domains, such as fraud detection, image prediction, and object classification, to analyze and classify large volumes of data based on distinct features.In the field of medicine, early detection of diseases like pneumonia is critical for prompt and effective treatment planning.Machine learning algorithms have been widely applied to quantitative data, but deep learning techniques have not been extensively utilized in medical diagnosis due to the high resource requirements, especially related to Graphics Processing Units (GPUs).
In this research, we focus on developing an efficient system for early detection of leaf diseases, akin to the application-level system architecture depicted in Figure 2. The proposed system model, Leaf Disease Transfer Learning Algorithm (LDTLA), comprises two layers: the pre-processing layer and the application layer.For feature extraction from images in the dataset, we use a modified version of AlexNet, which is a Convolutional Neural Network (CNN) [23] capable of extracting features from images.AlexNet is already a pre-trained model, and we leverage its previous weights while training it on the new dataset of leaf images.The primary motivation behind this research is to create a robust and practical system that can be implemented in real-world scenarios.In conclusion, our research aims to develop an efficient leaf diseases detection system using deep learning techniques, specifically transfer learning with the AlexNet model.By leveraging the power of deep learning and feature extraction from images, the proposed LDTLA model has the potential to significantly improve early detection of leaf diseases and aid in optimizing agricultural practices for better leaf yields and global food security.
After training and testing the dataset, the leaf diseases detection system validates the proposed model.In the first pre-processing layer, the dimensions, height, and width of the input leaf images are changed to 227 × 227 × 3.This transformation ensures that all images are in a standardized format suitable for further processing in the model's application layer [24].In the application layer, the pre-processed images are classified into two classes: Class 1, labeled as "normal," and Class 2, labeled as "disease" (representing leaf diseases, such as bacterial or viral infections).If a leaf diseases is detected in an image, the system will refer the case to a specialized medical professional for further investigation and appropriate action.Machine learning and artificial intelligence algorithms are utilized to draw valid inferences from data and make future predictions, especially in the context of quantitative data.However, when it comes to image and video-based predictions, more advanced techniques are required, such as feature map extraction, focal loss, and intersection over union (IoU) loss.These methods enable accurate and efficient image and video detections.In today's era, image and video-based predictions play a crucial role in various applications, and deep learning techniques have shown great effectiveness in fields like biomedicine and disease-based classification.Pre-trained models like YOLO v4, AlexeBAb [25], ResNet, and AlexNet are widely used for transfer learning in new problem domains.When a model is already familiar with the base concepts of object classification, it becomes fast and efficient in making predictions.For instance, YOLO v4 can perform object detections in milliseconds [26].In the context of leaf diseases detection, deep learning techniques, especially transfer learning with pre-trained models [27], can significantly enhance the accuracy and speed of detecting various leaf diseases.By leveraging feature extraction methods and loss functions optimized for image-based predictions [28], the proposed model aims to improve the early detection of leaf diseases and facilitate timely intervention to safeguard leaf yields and global food security.
In conclusion, the proposed leaf diseases detection system utilizes deep learning and advanced image-based prediction techniques to classify leaf images into normal or diseased categories.The integration of pre-trained models and transfer learning allows the system to efficiently detect leaf diseases [29] and contribute to the optimization of agricultural practices for better leaf yields and global food security.

Pre-processing model
In our leaf diseases detection system, we utilize AlexNet as the pre-trained model.AlexNet is a convolutional neural network primarily used for image classification tasks.It has been trained on a large dataset, ImageNet, which contains millions of images belonging to 1000 different classes related to various objects.During the training of AlexNet on ImageNet, the images are resized to a dimension of 227 × 227 × 3, as depicted in Figure 4.This resizing ensures that all images are in a uniform format and can be processed efficiently by the network.For our leaf diseases detection problem, we leverage the knowledge and weights learned by AlexNet from ImageNet and fine-tune it on our leaf diseases dataset.The images in our leaf diseases dataset are also resized to the same dimension as used during the training of AlexNet (i.e., 227 × 227 × 3).By adopting transfer learning and using AlexNet as the pre-trained model, we can effectively leverage the feature extraction capabilities of the network and enhance the accuracy and efficiency of leaf diseases detection.The model will be able to detect patterns and features relevant to leaf diseases, even with a limited amount of leaf diseases images, thanks to the knowledge gained from the vast ImageNet dataset.The preprocessing steps for leaf diseases detection are essential to prepare the leaf images for analysis using deep learning models.The following steps are included in the preprocessing pipeline:  Conversion to grayscale: Leaf images may be captured in color, but for analysis purposes, converting them to grayscale is sufficient.Grayscale images reduce the computational complexity while retaining the important structural information needed for disease detection.By performing these preprocessing steps, the leaf diseases detection system can efficiently process the leaf images and extract relevant features for accurate disease classification.These steps contribute to the success of the deep learning model in detecting leaf diseases, enabling timely intervention and optimization of agricultural practices for better leaf yields and food security.

Transfer learning (adapted AlexNet)
In our leaf diseases detection system, we leverage transfer learning with an adapted version of AlexNet.The original AlexNet introduced in 2012 had a larger number of layers compared to the modern version.Transfer learning is commonly used to apply pre-trained models like AlexNet to solve new problems, including leaf diseases detection.The adapted AlexNet used in our system contains eight layers in total.It is not as complex as the YOLO network, which is divided into a head, backbone, and tail, and comprises more than 126 layers for training.Instead, AlexNet includes five convolutional layers along with a combination of max pooling layers and three fully connected layers.
Each layer in AlexNet has multiple kernels or filters, which help in detecting different patterns and features in the leaf images.An activation function called ReLU (Rectified Linear Unit) is applied in each layer.ReLU is preferred in deep neural networks as it enables faster training compared to sigmoid functions.After the implementation of the ReLU function, the leaf images undergo normalization, which includes image Leafping and resizing.Normalization ensures that the images are in a standardized format, making it easier for the deep learning model to process them efficiently.Training a new deep learning model from scratch often requires a significant amount of data and extensive pre-processing, which can be timeconsuming and computationally expensive.Transfer learning, on the other hand, allows us to use a previously trained model like AlexNet, which can extract features faster due to its familiarity with patterns, squares, and edges.This significantly reduces the training time and computational resources required for our leaf diseases detection system.
The data collection process for training the adapted AlexNet is depicted in Figure 5. Collecting a large amount of data from scratch for leaf diseases detection can be a challenging task.However, by employing transfer learning, we can leverage the knowledge and features learned by AlexNet on other image classification tasks, making it effective for leaf diseases detection with a smaller amount of leaf diseases images.In conclusion, the adapted AlexNet in our leaf diseases detection system uses transfer learning to accelerate the training process and effectively extract features from leaf images for disease detection.By utilizing the power of transfer learning, we can develop an efficient leaf diseases detection model that aids in optimizing agricultural practices and ensuring global food security.In our leaf diseases detection system, we adopt transfer learning using an already pre-trained neural network, specifically AlexNet.The first five layers of AlexNet have been trained on a massive dataset, ImageNet, which contains millions of pre-trained images.The training was accomplished using Graphics Processing Units (GPUs) for faster processing.The softmax function is applied in the AlexNet model to convert the output into probabilities, assigning values of 0 and 1 to different classes.In our leaf diseases detection problem, we are dealing with a binary classification task, specifically distinguishing between two classes: bacterial-based leaf diseases and virus-based leaf diseases.Therefore, the model output will have two units corresponding to these two classes.
Classification layer.The convolutional to leverage the pre-trained model efficiently, we modify only the last three layers of the network to suit our specific problem.These layers include the fully connected layers, softmax layer for classification, and the output layers present in the earlier stages of the model are responsible for feature extraction and image filtering.They have been pre-trained on ImageNet and have learned to detect various patterns and features in images.To fine-tune the model for our leaf diseases detection problem, we set different learning rates between 0 and 1 epochs during the training phase.The number of iterations is determined based on the requirements of our problem.In the experimentation phase, we initially set the total epochs to 60, but this resulted in over-fitting, where the model performed well on the training data but failed to generalize to new unseen data.Eventually, the number of epochs was fixed to 40 to achieve a balance between training and generalization performance.The learning rate was set to 1e−4 to ensure the model converges to optimal weights during training.The proposed leaf diseases Transfer Learning Algorithm (LDTLA) system model leverages transfer learning effectively, implementing the knowledge and specific learning parameters obtained from the pre-trained AlexNet.This allows us to apply the convolutional neural network layers, originally trained on a different domain (ImageNet), to the new problem of leaf diseases detection.By adopting transfer learning, we accelerate the training process and improve the model's ability to detect leaf diseases with high accuracy.The convolutional layers effectively extract relevant features from leaf images, enabling the model to classify them into the two classes: bacterial-based and virus-based leaf diseases.In conclusion, transfer learning with AlexNet serves as a powerful tool in our leaf diseases detection system.By reusing the pre-trained convolutional layers and customizing the last layers for our specific binary classification problem, we can efficiently detect leaf diseases and contribute to enhancing agricultural practices and global food security.

Dataset
The "New Plant Diseases Dataset" available on Kaggle is a comprehensive and valuable collection of images aimed at aiding research in the field of plant pathology.This dataset encompasses a wide variety of images depicting different types of leaf diseases affecting plant species such as apple, blueberry, cherry, grape, peach, pepper, potato, raspberry, soybean, and strawberry.Each image is labeled with the corresponding leaf diseases, facilitating supervised machine learning tasks.With its large size and diversity of plant species and diseases, this dataset provides an excellent resource for developing and evaluating machine learning models for accurate and early detection of plant diseases, thus contributing to effective disease management and ensuring agricultural productivity and sustainability.

Results and simulations
In this evaluation section, we will discuss the results obtained from the training phase and the results generated by the proposed model using transfer learning on the basis of certain performance metrics.The basic idea of this research was to develop a smart and fast mechanism for disease and healthy leaf.We used MATLAB 2018 to generate the binary classification results for the experimentation.The training is run on a single GPU NVIDIA 840 m with 2 GB detected ram for processing.The dataset employed is divided into 80% for training and 20% for validation.Performance evaluation in various fields, such as machine learning and diagnostics, relies on a range of metrics to assess model effectiveness.Sensitivity (Equation ( 1)), specificity (Equation ( 2)), precision (Equation ( 3)), accuracy (Equation ( 4)), miss rate (Equation ( 5)), false positive rate (Equation ( 6)), false negative rate (Equation ( 7)), and F1 score (Equation ( 8)) are key parameters used for this purpose.Sensitivity measures the model's ability to identify true positives, while specificity quantifies its capacity to correctly recognize true negatives.Precision gauges the accuracy of positive predictions, whereas accuracy reflects overall correctness across all classes.Miss rate and false positive rate highlight the proportions of misclassified positive and negative cases, respectively.The F1 score balances precision and recall, providing a unified metric for performance assessment.Matthews Correlation Coefficient (MCC, Equation ( 9)) offers insight into the correlation between observed and predicted classifications, particularly useful for imbalanced datasets.These equations allow for precise quantification and comparison of model performance, aiding in the development and refinement of predictive models.
In our leaf diseases detection system, the evaluation results are represented in Table 1.The equations in the table are self-created to measure various performance metrics based on the confusion matrix and the outcomes of the experimental analysis phase.In the context of leaf diseases detection, the term "Pneumonia" is used to signify the presence of infection or inflammation in the leaf, as detected in the specific leaf image fed into the model.If the image is not recognizable or does not meet the minimum threshold criteria, the proposed model will not classify it, and the class "Unknown" will be assigned.The proposed leaf diseases detection system, named LDTLA (Leaf Disease Transfer Learning Algorithm), classifies the leaf images into two binary classes: Class "Normal": Represents leaf images in which no abnormality or disease is detected, indicating healthy Leafs.Class "Disease": Represents leaf images in which signs of infection or disease are detected, indicating that the leaf is affected by a bacterial or viral infection.
The performance metrics, including sensitivity, specificity, precision, accuracy, False Negative Rate (FNR), False Positive Rate (FPR), Miss Rate, F1 Score, Likelihood Ratio Positive (LRP), Likelihood Ratio Negative (LRN), and Matthews Correlation Coefficient (MCC), are used to evaluate the performance of the proposed leaf diseases detection model.By applying these self-created equations to the confusion matrix and the results obtained in the experimental analysis phase, we can quantify the model's performance in accurately detecting leaf diseases and differentiating between healthy leaves and diseased leaves.The results will provide valuable insights into the effectiveness and efficiency of the LDTLA model in optimizing agricultural practices and ensuring global food security through early and accurate leaf diseases detection.he LDTLA (Leaf Disease Transfer Learning and Augmentation) system model was trained with various simulation parameters, as presented in Table 2.The dataset underwent training for multiple epochs, specifically at intervals of 10, 20, 30, and 40 epochs.To avoid overfitting, the number of epochs was determined through multiple training runs, and the optimal accuracy with the minimum loss per class was achieved at 40 epochs.Notably, the LDTLA model demonstrated remarkable performance compared to other models utilizing different algorithms, with seven of them exhibiting lower accuracy and higher loss rates.The LDTLA model yielded impressive results in the context of leaf diseases detection.It achieved a high accuracy rate of 98.43% and a low loss rate of 0.043.To ensure its efficacy, multiple parameters and layers were carefully selected, taking into account the unique problem characteristics and image dimensions relevant to leaf diseases detection.In our paper on leaf disease detection, we utilized the confusion matrix to visualize and compare the predictive analytical results with other studies, providing valuable insights through a comparative analysis.The Leaf Disease Transfer Learning and Augmentation (LDTLA) model was trained on a single CPU, taking a maximum of 140 min for training, with a total of 1240 iterations performed over 40 epochs.Table 3 illustrates the training progress, and each epoch consisted of 30 iterations.Despite adjusting the learning rate to 1e−4 for optimal results, the model's convergence was slow.In Table 4, the model demonstrated exceptional performance metrics with specificity, sensitivity, precision, and accuracy reaching 99.9%, 99.2%, 99.7%, and 99.0%, respectively, along with an impressive F1 Score of 0.9972 and an NPR of 0.0003%.The FPR, FNR, and FDR were reported as 0.0067%, 0.021%, and 0.53%, respectively, while the MCC reached 99.47%.Throughout the training phase, the LDTLA model achieved a remarkable accuracy of 99.8%, and during the validation phase, it maintained strong performance with an accuracy of 98.43%.The model's specificities, sensitivities, precisions, and accuracies during validation were 99.3%, 96.3%, 98.3%, and 97.21%, respectively, along with an F1 Score of 0.9848 and an NPR of 0.0069%.The FPR, FNR, and FDR were reported as 0.0367%, 0.017%, and 3.79%, respectively, while the MCC during validation was 96.21%.These comprehensive statistical findings demonstrate the LDTLA model's efficacy and robustness in accurately detecting leaf diseases, making it a reliable and practical tool for leaf diseases detection tasks.

Conclusion
In conclusion, leaf disease detection is a challenging classification problem that demands substantial data, software, and hardware resources.Addressing these difficulties is crucial for developing effective solutions.In our future endeavors, we aim to develop a platform-independent system that leverages cloud computing servers to handle vast amounts of data, enabling the creation of a virtualized application with more classes for enhanced accuracy.By employing artificial intelligence, our proposed tool aims to enable fast and accurate detection of leaf diseases, providing valuable assistance to agricultural professionals in diagnosing and treating specific infections affecting leaves.The intelligent detection system will be versatile, capable of handling diverse types of non-colored and RGB images to identify symptoms of diseases or normal conditions in leaves.In our research, we have utilized a convolutional neural network (CNN) based on the AlexNet architecture for transfer learning, achieving promising results.After training on our dataset, the model attained an impressive accuracy of 94.53% on the testing and validation datasets, demonstrating its potential in leaf diseases detection.As we move forward, we aspire to refine and expand this system to contribute significantly to the agricultural industry and help secure global food security.

Figure 1 .
Figure 1.The figure illustrates typical leaf images alongside images showing signs of different leaf diseases.
Figures 2 and 3 illustrate the detailed diagram of the proposed LDTLA model, showing how the pre-processing layer processes the dataset images, converting them into a uniform size of 227 × 227 × 1.The second layer of the model imports the pre-trained AlexNet and adapts it to our binary classification problem for detecting bacterial and viral-based leaf diseases.To evaluate the performance of the LDTLA model, we obtained our leaf disease dataset from the Kaggle repository.The dataset was in raw format, and in the pre-processing layer, all the images were standardized to a consistent size and dimension of 227 × 227 × 1.The pre-trained AlexNet model was then fine-tuned in the second layer to suit our leaf disease detection problem.

:
ResizingLeaf images in the dataset may have different dimensions, and resizing them to a standard size is crucial for consistent analysis.Resizing ensures that all images have the same width and height, making it easier to process them efficiently. Intensity normalization: The pixel intensities in leaf images can vary, and normalizing them helps to improve contrast and enhance the visibility of important features.By adjusting pixel intensities, the deep learning model can better detect patterns associated with leaf diseases. Denoising: Leaf images might contain noise or artifacts that can hinder disease detection.Applying denoising techniques can help remove unwanted noise and improve the clarity of the images. Segmentation: In leaf diseases detection, the regions of interest are the affected parts of the plant.Thus, segmentation techniques are used to isolate and focus on the areas where diseases are likely to appear.This step helps the deep learning model to concentrate on relevant regions for analysis. Data augmentation: To augment the dataset and increase its size, data augmentation techniques are employed.These techniques introduce variations in the position, orientation, and scale of the leaf images.Common data augmentation methods include rotation, flipping, scaling, and translation.Data augmentation helps in training the deep learning model on a diverse set of images and improves its ability to generalize to new and unseen leaf diseases cases.

Figure 5 .
Figure 5. Transfer learning using pre-collected data.

Table 2
presents the performance metrics of the Leaf Disease Transfer Learning and Augmentation (LDTLA) system model at various training epochs for leaf diseases detection.At the 10-epoch mark, the model achieved 70% accuracy but had a relatively high miss classification rate of 8.71%.By the 20-epoch mark, the accuracy improved to 88%, and the miss classification rate reduced significantly to 0.520%.The accuracy and miss classification rate at 30 epochs are not provided.In the final phase of training (40 epochs), the LDTLA model demonstrated outstanding performance with an optimal accuracy of 98.43% and a low miss classification rate of 0.0479%.Table3also complements by showcasing the results of the validation dataset for leaf diseases detection.It includes labeled images, with 18 images classified as normal and two images classified as displaying symptoms of leaf diseases.The validation dataset results depict randomized classification from both classes, offering an overall view of the model's effectiveness in accurately detecting normal and disease-affected leaves.These results highlight the robustness and potential of the LDTLA system in leaf diseases detection tasks.

Table 3 .
Performance evaluation metrics training.

Table 3
also shows the loss per class for the LDTLA model during the 40 epochs of training.These analytical approaches demonstrate the model's efficacy in leaf diseases detection and contribute to the advancement of research in this domain, offering valuable comparisons with other studies.Table 4 presents comprehensive statistical results for the Leaf Disease Detection model (LDTLA), encompassing accuracy, precision, sensitivity, specificity, FPR (False Positive Rate), FNR (False Negative Rate), F1 Score, FDR (False Discovery Rate), NPR (Negative Predictive Value), and MCC (Matthews Correlation Coefficient).

Table 4 .
Performance evaluation metrics test.

Table 5
displays a comparative analysis of different types of research in our research analysis phase.Our research study performed better in comparison with these other neural network models.We conducted a comparison with the latest research studies.