Development of Automated Leaf Disease Detection in Pomegranate Using Alexnet Algorithm

Agriculture plays a crucial part in the overall growth of the country. Smart agriculture provides today's farmers a help in decision making. Farmers or professionals typically monitor crops for disease detection and identification by using traditional methods. Many techniques are designed to improve the productivity and quality of the crops, but the disease prediction of the existing techniques leads to loss of productivity and quality. Overcoming these issues this paper aims to develop a system to detect Bacterial Blight and Alternaria using Alexnet algorithm at early seedling stage. The main objective is to detect two major diseases Bacterial Blight and Alternaria using Alexnetalgorithm. The dataset of pomegranate leaf images total 1245 was created which was unavailable for these diseases, 80% of dataset is used for the training part another 20% is used for the testing part. For evaluating the performance of Alexnetalgorithm, the performassnce metrics such as accuracy, precision, recallwas considered. Results showed a high accuracy rate of 97.60% and this developed pomegranate leaf diseases detection system is better than other algorithm in terms of accuracy, loss, recall. Developed system has loss of 0.1(scaled between 0-1) which is very less comparative to other similar models. Finding of this paper isDataset was created which was unavailable and proposed approach have high accuracy than others through which we can detect diseases at very earlyseedling stage.


Introduction
Agriculture is important factor for country's economic growth. Also, it has played an important part in the development of mortal civilization. Pomegranate fruits are part of healthy diet and often liked by all people. pomegranate is one of best fruit which contain lots of nutrients and it is highlydemandable in Indian as well as foreignmarket. 2 Pomegranates are a valuable fruit crop with a significant economic impact worldwide. The global market for pomegranates and their products is projected to grow in the coming years, driven by the increasing demand for natural and healthy foods. 5 According to a report by Mordor Intelligence, the global pomegranate market was valued at USD 5.67 billion in 2020 and is expected to reach USD 8.46 billion by 2026, with a projected CAGR of 6.9% during the forecast period. 13 This growth is fuelled by the rising popularity of pomegranate juice and other pomegranatebased products, along with increasing consumer awareness of the health benefits of pomegranates. In India, pomegranate cultivation is concentrated in Maharashtra, Karnataka, and Andhra Pradesh. During the 2020-21 period, India exported 1,08,572 MT of pomegranates worth INR 671.77 crore (USD 91 million), with major export destinations being the UAE, the UK, and Bangladesh, according to the National Horticulture Board. 11 However, pomegranate cultivation in India is affected by various diseases such as bacterial blight and Alternaria. These diseases can cause significant income loss for farmers, with bacterial blight alone resulting in a yield loss ranging from 20% to 80%. So is very important to prevent the pomegranate from various disease in early stage, for all this problem we proposed system which have more accuracy than others.
There are many diseases that affects the plants, where the symptoms are not recognizable at very first stage which may lead to social and economic loss. To make things easier image processing is used that helps to make things easier image processing is used, that helps to overcome these kinds of situations, by extracting the features 8 of the leaves where can be diseases can be easily detected image processing involves steps like image segmentation. 4 Based on the multiple linear regressions a new recognition system of image is proposed. 6 Image segmentation consist of no of innovation. Feature extraction are used to while creating the recognition system. 3 The proposed algorithm for pomegranate leaf disease detection and identification using deep learning techniques overcomes the limitations of existing approaches in several ways. The Authors have 1 proposed a VGG19algorithm for pomegranate leaf disease but it have limitation like it have less accuracy and it is time consuming so we proposed a system which overcome this problem which have much more accuracy than existing system and it take very less time to predict the diseases of pomegranate. 9 The authors have discussed several pest management strategies have been proposed and implemented for pomegranate orchards. 19 The main objective of this paper is to create an automated and dependable system that can accurately detect leaf diseases in pomegranate plants by utilizing deep learning. The proposed system is intended to identify the type of disease affecting the leaf precisely. The study intends to test and validate the efficiency of the proposed system in detecting and classifying pomegranate leaf diseases. By achieving these objectives, this study aims to make a valuable contribution to the development of effective tools for plant disease detection, which can help reduce the negative impact of plant diseases on crop yield and quality.

Materials and Methods Data Creation
The collected a own dataset of pomegranate leaf images from various sources, including clicking real time images from the pomegranate orchards, Kaggle Dataset, plant pathology databases and online resources, total of 1245 images of pomegranate leaves. The dataset was split into 80% for training and 20% for testing. The dataset used for training the algorithm includes the following types of images

Healthy leaves
These leaves are green and free from any infections.

Alternaria Alternate infected leaves
These are images of leaves infected by a fungus that causes dark spots and rots plant parts.

Bacterial Blight infected leaves
These images depict leaves with pale green spots that later appear water-soaked due to a bacterial infection.
The split ratio used in this study (80-10-10) is also a common approach for dividing a dataset into training, validation, and testing sets. The training set is used to train the network, while the validation set is used to tune the network's hyperparameters and prevent overfitting. The testing set is used to evaluate the performance of the trained algorithm on new, unseen data. In pre-processed the dataset by resizing the images to a fixed size of 256x256 pixels and normalizing their pixel values. Then split the dataset into training, validation, and testing sets using a 80-10-10 split ratio.

Image Acquisition
Image Acquisition is the process of creating a dataset containing the image samples that includes infected leaf images and non-infected leaf images. Images are captured by a digital camera and samples are stored in dataset. A proper dataset is created containing train,test,valid folders where each folder has again had two folders healthy leaves and nonhealthyleaves. On-healthy leaves is further divided into different classes based on the name of disease.

Image Pre-Processing
Image Pre-processing is process where input images are reduced to a defined size which makes is easier to extract useful features, then image denoising is done for the removal of noise, unwanted features which are not required for classification. Color image is converted to grayscale image. 14 finally, image is converted into array form. Image pre-processing is an essential step in image analysis and computer vision tasks, such as image clustering. It involves a set of techniques to enhance the quality of the raw input image, remove noise, and extract relevant features. The following are some common preprocessing steps

Image Resizing
This involves resizing the image to a fixed size, which reduces the computational complexity of subsequent steps.

Image Enhancement
This step includes applying filters to the image to remove noise, sharpen edges, and improve the contrast of the image. Filters commonly used for image enhancement include Gaussian, median, and Sobel filters.

Image Thresholding
This step involves converting the image to a binary format, where all pixels with intensities above a certain threshold are set to white, and all those below the threshold are set to black. This is useful for segmenting the image into regions of interest.

Feature Extraction
This step involves extracting relevant features from the image, such as color histograms, texture, and shape descriptors. These features are then used to represent the image in a higher-dimensional space, where clustering algorithms can be applied.

Normalization
This step involves scaling the features extracted from the image to a common range, such as [0,1], to ensure that each feature has an equal contribution to the clustering algorithm.

Dimensionality Reduction
This step involves reducing the number of features used to represent the image, often through techniques such as Principal Component Analysis (PCA) or t-SNE. This reduces the computational complexity of the clustering algorithm and improves its performance.
By applying these pre-processing steps, we can improve the accuracy and efficiency of image clustering algorithms.

Image Segmentation
Image segmentation is applied to simplify the display of images containing segments for easy analysis. Perform image segmentation tosegment affected and unaffected parts of leaf disease. More specifically, image segmentation is the process of converting an image in multiple segments which is also called as an image objects. The main objective of segmentation is to make image representation simple and to convert it into a moremeaningful form.
Image segmentation is the process of dividing an image into multiple segments or regions, each of which represents a distinct object or part of the image. Image segmentation is an essential step in computer vision and image processing, as it enables us to identify and analyse different objects or regions within an image. The following are some common image segmentation techniques are given in previous research. 15 Thresholding This technique involves converting the image into a binary format by setting a threshold value, where all pixel values above the threshold are set to one and all those below are set to zero. This is useful for separating objects from the background in an image.

Edge Detection
This technique involves identifying the boundaries of objects or regions within an image by detecting edges or changes in pixel intensity. Edge detection algorithms include Sobel, Canny, and Laplacian edge detection.

Region Growing
This technique involves selecting a seed point in the image and iteratively expanding the region around the seed point based on a set of predefined criteria, such as pixel intensity or colour similarity.

Clustering
This technique involves grouping similar pixels together based on their color or intensity values. Common clustering algorithms include k-means clustering and mean-shift clustering.

Watershed Segmentation
This technique involves treating the image as a topographic map and identifying the local minima, or watershed points, which define the boundaries between regions.
By applying these segmentation techniques, we can extract regions of interest from an image and perform further analysis and processing on them. Image segmentation have increased the algorithm accuracy which in previous research were aligning. 16

Fig. 1: Algorithm for Alexnet
The algorithm for training and using Alexnet involves the following steps 1.
The input images are fed into the first layer, which applies 96 filters with a size of 11x11 and a stride of 4. The output of this layer is then passed through a ReLU activation function.

2.
The output of the first layer is passed into a max-pooling layer with a filter size of 3x3 and a stride of 2.

3.
The output of the max-pooling layer is passed into the second layer, which applies 256 filters with a size of 5x5 and a stride of 1. The output of this layer is then passed through a ReLU activation function.

4.
The output of the second layer is passed into another max-pooling layer with the same filter size and stride as the first one.

5.
The output of the second max-pooling layer is passed into the third layer, which applies 384 filters with a size of 3x3 and a stride of 1. The output of this layer is then passed through a ReLU activation function. 6.
The output of the third layer is passed into the fourth layer, which applies 384 filters with a size of 3x3 and a stride of 1. The output of this layer is then passed through a ReLU activation function. 7.
The output of the fourth layer is passed into the fifth layer, which applies 256 filters with a size of 3x3 and a stride of 1. The output of this layer is then passed through a ReLU activation function.

8.
The output of the fifth layer is passed into another max-pooling layer with a filter size of 3x3 and a stride of 2. 9.
The output of the last max-pooling layer is flattened into a vector and fed into three fully connected layers with 4096, 4096, and 1000 neurons, respectively. Each fully connected layer is followed by a ReLU activation function and a dropout layer for regularization.

10.
The final layer is a softmax layer that outputs a probability distribution over the 1000 possible classes. 11.
The network is trained using backpropagation with a cross-entropy loss function and stochastic gradient descent (SGD) optimization. Data augmentation techniques such as random cropping, horizontal flipping, and color jittering are used to increase the size of the training set and prevent overfitting.

12.
During inference, an input image is passed through the network and the class with the highest probability is output as the predicted class.

Mathematical Formulation of Alexnet
Let x be an input image with dimensions W x H x C, where W is the width, H is the height, and C is the number of channels (e.g., 3 for RGB images). The fourth and fifth layers are similar to the third layer, with 384 and 256 filters of size 3x.

Result and Discussion
Implementation of this system for detection of pomegranate diseases result in high accuracy than others system the accuracy of the this given algorithm is nearly 97.60% which is higher than that of other algorithms. The use of Alexnet result in less error than other existing systems.
The authors 17 have aimed to develop a deep learning model for plant disease detection using the AlexNet architecture. The study used a dataset of grapevine leaf images and reported an F1 score of 0.90, which is slightly lower than the F1 score reported in the current study. However, the study reported high precision and recall values ranging from 0.88 to 0.94 and 0.91 to 0.93, respectively, which is consistent with the high precision and recall values reported in the current study.
The authors 18  These studies suggest that the AlexNet architecture is effective in accurately detecting and classifying plant diseases. The high precision, recall, and F1 score values reported in the current study are consistent with the findings from these studies, further supporting the effectiveness of the AlexNet algorithm for plant disease detection.

Fig. 2: Accuracy of Different Algorithm
The proposed method was able to achieve an impressive overall accuracy rate of 97.60% in accurately classifying images of pomegranate leaves into their respective disease categories. The precision, recall, and F1 score for each individual disease class can be found in Table 1.   Notably, a proposed algorithm achieved the highest accuracy of 97.60% using a Alexnetbased approach trained on a dataset of pomegranate leaf images. However, it is crucial to note that different datasets' characteristics may impact accuracy levels. Therefore, comparing algorithms under similar conditions is necessary for more precise conclusions.

Conclusion
In this paper, we have developed a model for image classification used for the detection of pomegranate plant leaf disease. The model includes utilization of techniques which includes image pre-processing, image segmentation, image classification. Moreover, there are still no proper solutions available in the market, except those which are based on plant species recognition. Developing this system, Alexnet algorithm was explored to automatically classify and detect plant diseases from leaf images. The entire process was carried out from collecting the images which are used for training and validation of algorithm followed by image pre-processing and image augmentation and finally the procedure of training the model and fine-tuning was done. With the help of this system, we can easily detect whether pomegranate leaf is Infected with a disease or not by just uploading an Image on the website. Overall accuracy of 97.60% is achieved. Also created dataset can be used for further studies.