# Detection of Fungal Infections in Gloriosa Superba Plant Using the Convolution Neural Network Model

Authors: Guillermo Napoleón Pelaez-Diaz; Rosa Vílchez-Vásquez; Antonio Huaman-Osorio; R. Mahaveerakannan; S. Pushpa; Nilesh Shelke; Sumitha Jagadibabu; Jenifer Mahilraj
Journal: Journal of Food Quality
 (2022)

---

## Abstract

Herbal treatments’ efficacy, safety, and mild side effects are also high priorities in primary care. Furthermore, as the world’s population expands, food production becomes more difficult. We need to use innovative biotechnology-based fertilization technologies to boost food production output. Gloriosa superba is one of the most well-known plants for its antibacterial and medicinal capabilities. The money plant is also known as the Gloriosa superba. We used a deep learning-based convolution neural network (CNN) classifier model to optimize the CNN algorithm parameter for better prediction. The enhanced particle swarm optimization (PSO) technique was used for optimization. Scale-invariant feature transform (SIFT) was used to extract the fungal spotted area. Digital camera with a high resolution acquires 300 dataset photographs from different villages in India for this investigation. Using a real-time fungal-affected image to train and test the model, different parametric measures are used to assess the model’s performance. The categorization accuracy obtained in this experiment was 99.32 percent.


---

## Body

## 1. Introduction

Nowadays, agriculture impacts the economy and society and is the central pillar of sustainable development in most countries. Continuous plant monitoring scheme is the detection of plant diseases significantly. Agriculture is one of India’s main occupations (66.5% rural) [1], and plant conservation has become a key concern. In the industrialized world, the effectiveness, safety, and minor side effects of herbal medications are also quite demanding in primary medicines. Furthermore, as the world's population expands, food production becomes more difficult. We need to use innovative biotechnology-based fertilization technologies to boost food production output. In addition, early illness prevention measures must be improved [2, 3]. Despite their rich traditional expertise, India’s herbal medicines’ history and vast biodiversity have a modest worldwide market share due to the export of crude extracts and drugs [4]. Gloriosa superba is one of the best-renowned plants with antibacterial properties [5] and therapeutic use. As medical plants get more scientific and economic attention, the wild plant populations from which most medicinal herbs are harvested are used for various treatment. It is a popular medical plant because it contains two toxic alkaloids, colchicine and gloriosine, which are used to treat gout and rheumatism, respectively [6, 7]. Some of the current century’s most severe global health challenges were bacterial and fungal infections. In developing countries, bacterial diseases represent a substantial share of health problems. Many synthetic antibiotics are used regularly to control bacterial diseases [8]. Sunlight, the right temperature, moisture, air, and nutrients are all essential for plants to thrive. The natural or artificial settings in which the plants reside give these five things. If any of these ingredients are absent, plant development will be restricted. Monitoring of air, water, soil and lands, plants and animals, ecosystems, and the human population are all examples of environmental monitoring. It also aids in the identification of environmental stress, the comprehension of environmental patterns, and the evaluation of the efficacy of methods and programs.Samples are collected and evaluated regularly after the visual signs show. In order to discover and rectify quality concerns, a variety of details must be reviewed and authorized throughout each process. Visual approaches that help in spotting plant issues via experience and training are often used in traditional plant inspection procedures. The traditional technique is restricted to cognitive, psychological, and deceptive phenomena. Furthermore, specialists in remote and underserved areas are not always available. The systems based on artificial intelligence approaches have been presented in the literature to help decision makers in agriculture for the identification of plant diseases robotically [9]. In some farms and sectors, technical support from experts is not stress-free to acquire, and regular local monitoring is unnecessary and valuable. This is essential and helpful. In recent studies of sensor-based techniques, imaging technologies have been identified and developed that are widely used to detect and diagnose plant diseases. Several methods have been established for predicting and preferring early detection of illnesses in plants [10,11]. Researchers have developed ANN, support vector machine (SVM), extreme learning machine (ELM), and deep learning. Photographs of the sick plant leaves mainly support these prediction models.In recent years, significant improvements in artificial intelligence (AI) technology have made it straightforward and efficient to build these intelligent systems. Precision agriculture entails using artificial intelligence to increase overall harvest quality and accuracy. AI technology aids in the detection of plant disease, pests, and inadequate agricultural nutrition. AI sensors can identify and target weeds and then determine the best herbicide to use in the area. Artificial intelligence (AI) is the capacity of robots to mimic human intelligence. Artificial intelligence (AI) is being used in agriculture to help grow better crops, manage pests, monitor soil and growing conditions, organize data for farmers, reduce labor, and enhance a variety of agriculture-related operations throughout the food supply chain [12, 13]. This is usually performed using machine learning, allowing computers to complete jobs instead of executing an explicitly written computer program for the issue by learning from available data. In the domain of AI, so-called “deep learning” is an ever-increasing subset of machine learning. Deep learning is a machine learning and artificial intelligence (AI) approach that simulates how humans learn. Deep learning is a major component of data science, which includes statistics and predictive modeling [14, 15]. Deep learning technology has been applied in numerous application domains, such as picture analysis. With this approach, the features in the training image phase were demonstrated. The profound study technique introduces the key benefits of various conventional methods of picture processing [16]. First of all, it is built on neural networks that may leverage the features' hierarchy and interaction. Second, the optimization process of the deep architecture can identify operations such as extraction, selection, and classification. The CNN, as mentioned, is the most prevalent and most used architecture in profound learning. Deep learning algorithms, particularly CNNs, are the most promising technique for automatically learning decisive and discriminative characteristics. Deep learning (DL) is composed of several convolutional layers that represent data learning features [17, 18]. Compared with other conventional neural feedforward networks, CNN uses a small number of artificial neurons, making it easy to use with image processing and recognition. However, in the training phase, CNNs must pay a significant amount of trials [19]. CNNs also include several hyperparameters and a wide variety of defined structural designs, which are seen as challenging and expensive to determine the appropriate values for these hyperparameters manually. Because hyperparameters have a significant effect on the efficiency of CNN designs, CNNs are sensitive to the levels in their hyperparameters. In the field of artificial intelligence, so-called “deep learning” is a growing subset of machine learning. Deep learning is a machine learning and artificial intelligence (AI) technique that mimics human learning. Deep learning technology has been used in a variety of applications, including image analysis. The characteristics in the training picture phase were illustrated using this method. The most promising technology for automatically learning decisive and discriminative qualities is deep learning algorithms, notably CNNs.Furthermore, hyperparameters should be adjusted for any dataset, as hyperparameters that are well adapted to a dataset do not have to adapt well to another dataset. However, it is not easy to determine the correct settings for CNN hyperparameters for a particular dataset because there can be no valid mathematical equation and procedure but testing and error, implying the manual determination of these values [20]. Therefore, the importance of hyperparameters requires a conscious expert to recognize the optimal values of the hyperparameters that encourage the utilization of random searches or grid searches to improve the performance of the CNNs. At the same time, random searches and grid searches are far better than the hyperparameter manual search. However, both waste more time; therefore, some scientists have recently considered calculating hyperparameter values as an optimization issue [21]. However, we applied the PSO optimization method to minimize time and improve classification results.


## 2. Literature Review

Many stories exist describing the usage of Indian medicinal plants and their products to treat a variety of diseases [22]. Gloriosa superba Linn is a valuable medicinal plant in the Liliaceae family, which is one of the medicinal plants’ extinction [23, 24]. It is called as glory lily and climbing lily in English since it is endemic to India, particularly Southern India [25]. Tubers and seeds have yielded a number of colchicine-related alkaloids. Cornigerine, a powerful antimitotic, and colchicoside, a muscle relaxant, are two of the most common dimethyl replacements. Considering the fact that the entire plant is extremely deadly, Gloriosa superba is frequently utilized as a medicinal herb in South India. Glory lily is a rich source of colchicine and gloriosine on the global market. In recent times, this plant has acquired prominence in medicine because of its large-scale synthesis of colchicine [26].In analyzing the automatic categorization of rice diseases with image-processing technologies, Jayanthi et al. [27] suggested a model. They presented a detailed study of the various algorithms of picture classification. The approach for identifying rice illness regionally by image processing was suggested by Barik [28]. In addition to the disease of the rice plant, the author has provided a model that detects the damaged area. The author employed image treatment and used ML approaches such as support vector machine and naïve Bayes to classify it. The severity of the disease is identified and then divided into several categories once the forecast is made. Nithya et al. [29] offered a large data model. They have developed a symptom-based recommendation method based on paddy plant disease. Disease information can be found on many websites and blogs. The details were evaluated with Hadoop and Hive Q. The data are collected via the vector space ideal and weight determined using the T-IDF ranking. The documents are displayed in vector form. A perfect identification of the disease suffered by the plant was presented by Badage [30]. The author utilized an algorithm for canny edge sensing. The author has employed the canny rim detection procedure to follow the edge and predict the sickness. The model also screens the grown field periodically. In the early stages, the model detects the disease. Machine education is then employed for training. Then, the model will decide correctly and predict the illness of the plant.Rajmohan et al. [31] have suggested a system detecting paddy disease with CNN and SVM classifications. Their model uses image-processing feature extraction and SVM classification. You took 250 pictures. Fifty photographs and the rest 200 images have been used for the model training. You have invented a smartphone app that clicks, zooms, and cultivates the image of the sick plant, then loads the image and notifies the person.


## 3. Proposed Methodology

The proposed model detects the diseases of the plant. The ailment is classified as hispa, brown spot, and blast, which may be the sickness of the herb. The proposed scheme predicts that the leaf is healthy or unhealthy (fungal attacked). For the prediction and classification of diseases, the model uses CNN because of its efficiency. The chosen dataset includes two classes since one class is healthy and the second class is fungally afflicted. The model provided employs the addition of the picture to increase the image and lift it to achieve the desired outcome. Image input: a picture of the leaf is recorded with a better-resolution digital canon camera. Healthy region: the green canal value must be greater than the red canal value and the blue canal value, and the green pixel value must be at least 13 to be detected by a healthy region. Region of disease: the red canal value for region disease detection must be higher than both green and blue canal values according to the color-thresholding approach. The difference between green and blue is a minimum of 10. Below Table1 shows that the proposed algorithm flows.Table 1
Algorithm for the proposed work.
(i) Acquire the time image of Gloriosa superba plant(ii) Contains both healthy and fungal-affected leaves(iii) Data augmentation to extend and improve the dataset(iv) Preprocessing dataset by standardization and normalization to rescale the original image(v) For extracting the fungal spotted area by using scale-invariant feature transform(vi) Assign the classes to the label(vii) Categorize the data among training and testing dataset selecting from the class label.(viii) Particle swarm optimization to hyperparameter optimization CNN classifier(ix) Train the CNN model with help of training image(x) Test the CNN model with help of testing image(xi) Classify the input test images as healthy or fungal-affected class(xii) Validate the performance of proposed model(xiii) Compare the validation results with existing modelsThis study evaluates the experiment to predict fungal infection in the Gloriosa superba plant. Data are collected from the different villages by using a digital camera. We have collected 300 images; 200 images are fungal affected, and the remaining 100 are healthy leaves (not influenced by anyone’s diseases), which are provided to train and test the CNN classifier model. Figure1 shows the dataset sample images.Figure 1
Dataset sample images.


### 3.1. Preprocessing

For leaf illumination, standardization and normalization preprocessing techniques have been widely employed. Some algorithms will enhance the final image. This signifies that the lighting becomes normal.


#### 3.1.1. Standardization and Normalization

This is the scale to a specific small range of original data. This approach usually translates the original data to the interval [0, 1] linearly. Standardization is the primary preprocessing technique for data mining to standardize feature values or attributes from various dynamic ranges to a given area. Standardization is a random variable normalization that produces an average anticipated value of 0 and a standard deviation of 1. The entire dataset images are preprocessed by normal and standardizing, giving the ideas in proper ranges from the irregular range [32].


### 3.2. Image Augmentation

We need a large training dataset to develop the neural network’s performance, which gives the network a good learning experience. Image increase systems are used for virtually increasing the training data size, which aids in achieving good performance for the neural network classifier. It artificially generates training pictures by utilizing various processing methods, that is, rotations, flips, and cultivations. Keras library’s ImageDataGenerator function is used to perform data increase techniques. After the data augmentation, we improve the total dataset images to 1200 images.


### 3.3. Feature Extraction

The SIFT method turns a picture into a collection of local vectors. Each of these characteristic vectors should be characteristic and invariant for any scale, rotation, or image translation. These features can be used in the actual execution to locate distinctive objects in various photographs and can be expanded to fit the image faces.Figure2 shows the sample images after augmented the original image. Extracted from preprocessed images are the SIFT feature and color statistic feature. According to an analysis of these two factors, we used Johnson SB (JSB) distributors to represent the SIFT texture feature. The SIFT feature extracted is modeled on a Johnson SB model. The model parameters are horizontally linked to the color figure to generate a proposed part—the two key reasons to use the JSB for picture information on statistical texture. The time technique for estimating the Johnson SB distribution parameters is utilized. The SIFT mathematical representation is a matrix representation and is too difficult to apply in categorizing images. Figure 3 shows the proposed feature extraction process.(i)
Color statistic feature: the color statistical functionality is taken from the preprocessed image RGB color space. The color statistical property for each RGB color channel consists of a mixture of mean, standard deviation, and grade 2 to 5 moments, and feature length is 15.(ii)
Modeling SIFT with JSB distribution: extract SIFT from the image preprocessing. Estimate SIFT statistical parameters with the moment’s technique.X is the preprocessed image’s SIFT feature, and n is the matrix distribution number Get parameter values of the initial parameter by: x1 = mean, x2 = default, x3 = default, x4 = kurtosis. SIFT texture characteristic statistics are combined with color statistics to produce suggested characteristics.(iii)
SIFT feature: the descriptor and position information for an image texture are provided by the SIFT algorithm. The descriptor consists of a matrix K-by-128 where each line offers one of the K key points an invariant descriptor. The descriptor is a vector with 128 unit length-standardized values. The position is K-by-4, where each row has the four numbers for the key points. The guidance is in the radius [-P.I., P.I.].(iv)
Johnson SB probability distribution: this is interrelated to the normal distribution.Figure 2
Sample images after augmented the original image.Figure 3
Proposed feature extraction process.


### 3.4. Convolution Neural Network Classifier

The convolution, pooling, ReLU, and fully connected (FC) layers comprise the fundamental CNN design. Convolutional convolution layers offer the true potential of deep learning, particularly for image identification. It is the top and most important layer. A CNN convolves the entire image and the in-between feature maps using many filters in this layer, resulting in various feature maps. A feature map consists of a mapping from the input layers to the hidden layers. We have three hyperparameters to regulate the scope of the convolutional layer’s output volume: depth, stride, and zero-padding. Figure4 shows the architecture of CNN model.Figure 4
Architecture of CNN model.The sum of neurons in the layer that connect to the same region of the input volume is controlled by the deepness of the output volume. These neurons will learn to activate in response to various input aspects. For example, if the raw image is sent into the first conv. layer, different neurons along the depth aspect may activate in distinct oriented edges or color blobs.(a)
Hyperparameter network structure as:(i)
Kernel size is also called a filter, which mentions the filter size.(ii)
Kernel type is used for edge detection, sharpening the image value.(iii)
Padding—by adding the zeros at the edge of the image for computation, the image edges(iv)
The hidden layer is a vital layer placed among input and output layers.(v)
Activation functions—this is the function, which allows the perfect to learn nonlinear prediction borders.(b)
Hyperparameter that decides the trained the network as:(i)
Learning rate—to calculate and modify the weight of each batch at the end.(ii)
Momentum—to update the previous effect to the current weight.(iii)
An epoch has also been named the iterations, which mentioned the complete training dataset to the network for the training period.(iv)
Batch size—before the weights are updated, the number of patterns is shown to the network.Models can include more than 15 parameters, and finding the best grouping can be viewed as a search issue. As a result, selecting the appropriate hyperparameters (HPs) values can impact the performance of the model.


### 3.5. Hyperparameter Optimization of CNN Model

For many academics and practitioners, optimizing hyperparameters in CNN is a time-consuming task. To obtain better-performing hyperparameters, professionals must manually configure a set of HP options. Following that, the best results of this manual configuration are modeled and applied in CNN. However, various datasets necessitate a different model or combination of hyperparameters, which can be time-consuming and inconvenient. As a result, some works have been offered, including G.S. and R.S., which are limited to low-dimensional space, and tails, which employ random selection.


#### 3.5.1. Particle Swarm Optimization

The PSO technique has been utilized successfully in a variety of optimization applications. One of the key disadvantages of the PSO procedure is that it traps in local minima and has particular limitations in addressing high-dimensional difficulties. PSO, the particle’s position, corresponds to the solution of the original problem. We can evaluate the answer by calculating the fitness of each particle using the objective function. To represent the current state, each particle I have a velocity vectorVi=Vi1,Vi2,ViD and a location vector yi=yi1,yi2,yiD, where I denotes the index of the ith particle in the particle swarm and D represents the optimized problem dimension. Furthermore, each particle will keep track of its best location in history pbesti=pi1,pi2,…piD. The particle with the best position among all the particles will be recorded as gbest. The particle (solution) I then modify its velocity and work in each generation by learning from itself Pbest and the globally best gbest is as follows:(1)Vid=WVid+C2r2pbestid−yid+C1r1gbestid−yid,(2)xid=xid+Vid.TheVid and yid variables denote the dth velocity and position components of the ith particle in the dimension. W represents the weight of inertia. C1 and C2 are acceleration factors, and r1 and r2 are two random values in the range [0, 1]. And while pbest represents the particle’s historical best position in the evolution process, gbest is the best position of all particles, that is, the globally best. Underneath given is Table 2 that shows the PSO for CNN hyperparameters.Table 2
PSO for CNN hyperparameters.
VariablesHPsRangey1Number of first convolution kernels[1, 300]y2First convolution layer kernel size{3∗3, 5∗5, 7∗7, 9∗9}y3First convolution layer activation function{Sigmoid, ReLu, Tanh}y4First pooling layer types{Max-pooling, min-pooling, average-pooling}y5Number of second convolution kernels[1, 300]y6The 2nd convolution layer kernel size{3∗3, 5∗5, 7∗7, 9∗9}y7The 2nd convolution layer activation function{ReLu, Sigmoid, Tanh}y8The 2nd pooling layer{max-pooling, min-pooling, average-pooling}y9The first FC layer neuron[10, 800]y10Activation function of the first FC layer{ReLu, Sigmoid, Tanh}y11First FC layer dropout[0.1, 0.9]y12Number of second FC layer neurons[10, 800]y13The 2nd FC layer activation function{Sigmoid, ReLu, Tanh}y14The 2nd FC layer dropout[0.1, 0.8]y15Learning rate[0.01, 0.001, 1]We know that each dimension of vectory signifies a CNN HPs; therefore, each size has a diverse meaning and a different range of values. At the same time, we have various limits on different hyperparameters due to the current condition of CNN. To begin, some hyperparameters, such as the sum of convolution kernels (as y1 and y5) and the sum of neurons in the FC layer, can only be represented by an integer (as y9 and y12). Second, several hyperparameters, such as the kernel size (i.e., y2 and y6), the kind of activation function (as y3, y7, y10, and y13), and the type of pooling, are represented by discrete choice from a set (i.e., y4 and 8). In this work, we also utilize numbers to denote various options and consider integer variables. For variable y3, for example, y1 signifies the ReLu activation function, whereas 2 and 3 represent the Sigmoid and Tanh activation functions, correspondingly. Third, other HPs such as dropout (y11 and y14) and learning rate (y15) are actual numbers. Furthermore, in the practical use of CNN, the number of decimals in these fundamental values is usually limited to a specified number. Using the learning rate as an example, we do not require many decimals most of the time, so the learning rate can only accept three decimals at most (0.001, 0.002, and so on). For the same reason, dropout can take decimal (e.g., 0.1, 0.2, and so on).


## 3.1. Preprocessing

For leaf illumination, standardization and normalization preprocessing techniques have been widely employed. Some algorithms will enhance the final image. This signifies that the lighting becomes normal.


### 3.1.1. Standardization and Normalization

This is the scale to a specific small range of original data. This approach usually translates the original data to the interval [0, 1] linearly. Standardization is the primary preprocessing technique for data mining to standardize feature values or attributes from various dynamic ranges to a given area. Standardization is a random variable normalization that produces an average anticipated value of 0 and a standard deviation of 1. The entire dataset images are preprocessed by normal and standardizing, giving the ideas in proper ranges from the irregular range [32].


## 3.1.1. Standardization and Normalization

This is the scale to a specific small range of original data. This approach usually translates the original data to the interval [0, 1] linearly. Standardization is the primary preprocessing technique for data mining to standardize feature values or attributes from various dynamic ranges to a given area. Standardization is a random variable normalization that produces an average anticipated value of 0 and a standard deviation of 1. The entire dataset images are preprocessed by normal and standardizing, giving the ideas in proper ranges from the irregular range [32].


## 3.2. Image Augmentation

We need a large training dataset to develop the neural network’s performance, which gives the network a good learning experience. Image increase systems are used for virtually increasing the training data size, which aids in achieving good performance for the neural network classifier. It artificially generates training pictures by utilizing various processing methods, that is, rotations, flips, and cultivations. Keras library’s ImageDataGenerator function is used to perform data increase techniques. After the data augmentation, we improve the total dataset images to 1200 images.


## 3.3. Feature Extraction

The SIFT method turns a picture into a collection of local vectors. Each of these characteristic vectors should be characteristic and invariant for any scale, rotation, or image translation. These features can be used in the actual execution to locate distinctive objects in various photographs and can be expanded to fit the image faces.Figure2 shows the sample images after augmented the original image. Extracted from preprocessed images are the SIFT feature and color statistic feature. According to an analysis of these two factors, we used Johnson SB (JSB) distributors to represent the SIFT texture feature. The SIFT feature extracted is modeled on a Johnson SB model. The model parameters are horizontally linked to the color figure to generate a proposed part—the two key reasons to use the JSB for picture information on statistical texture. The time technique for estimating the Johnson SB distribution parameters is utilized. The SIFT mathematical representation is a matrix representation and is too difficult to apply in categorizing images. Figure 3 shows the proposed feature extraction process.(i)
Color statistic feature: the color statistical functionality is taken from the preprocessed image RGB color space. The color statistical property for each RGB color channel consists of a mixture of mean, standard deviation, and grade 2 to 5 moments, and feature length is 15.(ii)
Modeling SIFT with JSB distribution: extract SIFT from the image preprocessing. Estimate SIFT statistical parameters with the moment’s technique.X is the preprocessed image’s SIFT feature, and n is the matrix distribution number Get parameter values of the initial parameter by: x1 = mean, x2 = default, x3 = default, x4 = kurtosis. SIFT texture characteristic statistics are combined with color statistics to produce suggested characteristics.(iii)
SIFT feature: the descriptor and position information for an image texture are provided by the SIFT algorithm. The descriptor consists of a matrix K-by-128 where each line offers one of the K key points an invariant descriptor. The descriptor is a vector with 128 unit length-standardized values. The position is K-by-4, where each row has the four numbers for the key points. The guidance is in the radius [-P.I., P.I.].(iv)
Johnson SB probability distribution: this is interrelated to the normal distribution.Figure 2
Sample images after augmented the original image.Figure 3
Proposed feature extraction process.


## 3.4. Convolution Neural Network Classifier

The convolution, pooling, ReLU, and fully connected (FC) layers comprise the fundamental CNN design. Convolutional convolution layers offer the true potential of deep learning, particularly for image identification. It is the top and most important layer. A CNN convolves the entire image and the in-between feature maps using many filters in this layer, resulting in various feature maps. A feature map consists of a mapping from the input layers to the hidden layers. We have three hyperparameters to regulate the scope of the convolutional layer’s output volume: depth, stride, and zero-padding. Figure4 shows the architecture of CNN model.Figure 4
Architecture of CNN model.The sum of neurons in the layer that connect to the same region of the input volume is controlled by the deepness of the output volume. These neurons will learn to activate in response to various input aspects. For example, if the raw image is sent into the first conv. layer, different neurons along the depth aspect may activate in distinct oriented edges or color blobs.(a)
Hyperparameter network structure as:(i)
Kernel size is also called a filter, which mentions the filter size.(ii)
Kernel type is used for edge detection, sharpening the image value.(iii)
Padding—by adding the zeros at the edge of the image for computation, the image edges(iv)
The hidden layer is a vital layer placed among input and output layers.(v)
Activation functions—this is the function, which allows the perfect to learn nonlinear prediction borders.(b)
Hyperparameter that decides the trained the network as:(i)
Learning rate—to calculate and modify the weight of each batch at the end.(ii)
Momentum—to update the previous effect to the current weight.(iii)
An epoch has also been named the iterations, which mentioned the complete training dataset to the network for the training period.(iv)
Batch size—before the weights are updated, the number of patterns is shown to the network.Models can include more than 15 parameters, and finding the best grouping can be viewed as a search issue. As a result, selecting the appropriate hyperparameters (HPs) values can impact the performance of the model.


## 3.5. Hyperparameter Optimization of CNN Model

For many academics and practitioners, optimizing hyperparameters in CNN is a time-consuming task. To obtain better-performing hyperparameters, professionals must manually configure a set of HP options. Following that, the best results of this manual configuration are modeled and applied in CNN. However, various datasets necessitate a different model or combination of hyperparameters, which can be time-consuming and inconvenient. As a result, some works have been offered, including G.S. and R.S., which are limited to low-dimensional space, and tails, which employ random selection.


### 3.5.1. Particle Swarm Optimization

The PSO technique has been utilized successfully in a variety of optimization applications. One of the key disadvantages of the PSO procedure is that it traps in local minima and has particular limitations in addressing high-dimensional difficulties. PSO, the particle’s position, corresponds to the solution of the original problem. We can evaluate the answer by calculating the fitness of each particle using the objective function. To represent the current state, each particle I have a velocity vectorVi=Vi1,Vi2,ViD and a location vector yi=yi1,yi2,yiD, where I denotes the index of the ith particle in the particle swarm and D represents the optimized problem dimension. Furthermore, each particle will keep track of its best location in history pbesti=pi1,pi2,…piD. The particle with the best position among all the particles will be recorded as gbest. The particle (solution) I then modify its velocity and work in each generation by learning from itself Pbest and the globally best gbest is as follows:(1)Vid=WVid+C2r2pbestid−yid+C1r1gbestid−yid,(2)xid=xid+Vid.TheVid and yid variables denote the dth velocity and position components of the ith particle in the dimension. W represents the weight of inertia. C1 and C2 are acceleration factors, and r1 and r2 are two random values in the range [0, 1]. And while pbest represents the particle’s historical best position in the evolution process, gbest is the best position of all particles, that is, the globally best. Underneath given is Table 2 that shows the PSO for CNN hyperparameters.Table 2
PSO for CNN hyperparameters.
VariablesHPsRangey1Number of first convolution kernels[1, 300]y2First convolution layer kernel size{3∗3, 5∗5, 7∗7, 9∗9}y3First convolution layer activation function{Sigmoid, ReLu, Tanh}y4First pooling layer types{Max-pooling, min-pooling, average-pooling}y5Number of second convolution kernels[1, 300]y6The 2nd convolution layer kernel size{3∗3, 5∗5, 7∗7, 9∗9}y7The 2nd convolution layer activation function{ReLu, Sigmoid, Tanh}y8The 2nd pooling layer{max-pooling, min-pooling, average-pooling}y9The first FC layer neuron[10, 800]y10Activation function of the first FC layer{ReLu, Sigmoid, Tanh}y11First FC layer dropout[0.1, 0.9]y12Number of second FC layer neurons[10, 800]y13The 2nd FC layer activation function{Sigmoid, ReLu, Tanh}y14The 2nd FC layer dropout[0.1, 0.8]y15Learning rate[0.01, 0.001, 1]We know that each dimension of vectory signifies a CNN HPs; therefore, each size has a diverse meaning and a different range of values. At the same time, we have various limits on different hyperparameters due to the current condition of CNN. To begin, some hyperparameters, such as the sum of convolution kernels (as y1 and y5) and the sum of neurons in the FC layer, can only be represented by an integer (as y9 and y12). Second, several hyperparameters, such as the kernel size (i.e., y2 and y6), the kind of activation function (as y3, y7, y10, and y13), and the type of pooling, are represented by discrete choice from a set (i.e., y4 and 8). In this work, we also utilize numbers to denote various options and consider integer variables. For variable y3, for example, y1 signifies the ReLu activation function, whereas 2 and 3 represent the Sigmoid and Tanh activation functions, correspondingly. Third, other HPs such as dropout (y11 and y14) and learning rate (y15) are actual numbers. Furthermore, in the practical use of CNN, the number of decimals in these fundamental values is usually limited to a specified number. Using the learning rate as an example, we do not require many decimals most of the time, so the learning rate can only accept three decimals at most (0.001, 0.002, and so on). For the same reason, dropout can take decimal (e.g., 0.1, 0.2, and so on).


## 3.5.1. Particle Swarm Optimization

The PSO technique has been utilized successfully in a variety of optimization applications. One of the key disadvantages of the PSO procedure is that it traps in local minima and has particular limitations in addressing high-dimensional difficulties. PSO, the particle’s position, corresponds to the solution of the original problem. We can evaluate the answer by calculating the fitness of each particle using the objective function. To represent the current state, each particle I have a velocity vectorVi=Vi1,Vi2,ViD and a location vector yi=yi1,yi2,yiD, where I denotes the index of the ith particle in the particle swarm and D represents the optimized problem dimension. Furthermore, each particle will keep track of its best location in history pbesti=pi1,pi2,…piD. The particle with the best position among all the particles will be recorded as gbest. The particle (solution) I then modify its velocity and work in each generation by learning from itself Pbest and the globally best gbest is as follows:(1)Vid=WVid+C2r2pbestid−yid+C1r1gbestid−yid,(2)xid=xid+Vid.TheVid and yid variables denote the dth velocity and position components of the ith particle in the dimension. W represents the weight of inertia. C1 and C2 are acceleration factors, and r1 and r2 are two random values in the range [0, 1]. And while pbest represents the particle’s historical best position in the evolution process, gbest is the best position of all particles, that is, the globally best. Underneath given is Table 2 that shows the PSO for CNN hyperparameters.Table 2
PSO for CNN hyperparameters.
VariablesHPsRangey1Number of first convolution kernels[1, 300]y2First convolution layer kernel size{3∗3, 5∗5, 7∗7, 9∗9}y3First convolution layer activation function{Sigmoid, ReLu, Tanh}y4First pooling layer types{Max-pooling, min-pooling, average-pooling}y5Number of second convolution kernels[1, 300]y6The 2nd convolution layer kernel size{3∗3, 5∗5, 7∗7, 9∗9}y7The 2nd convolution layer activation function{ReLu, Sigmoid, Tanh}y8The 2nd pooling layer{max-pooling, min-pooling, average-pooling}y9The first FC layer neuron[10, 800]y10Activation function of the first FC layer{ReLu, Sigmoid, Tanh}y11First FC layer dropout[0.1, 0.9]y12Number of second FC layer neurons[10, 800]y13The 2nd FC layer activation function{Sigmoid, ReLu, Tanh}y14The 2nd FC layer dropout[0.1, 0.8]y15Learning rate[0.01, 0.001, 1]We know that each dimension of vectory signifies a CNN HPs; therefore, each size has a diverse meaning and a different range of values. At the same time, we have various limits on different hyperparameters due to the current condition of CNN. To begin, some hyperparameters, such as the sum of convolution kernels (as y1 and y5) and the sum of neurons in the FC layer, can only be represented by an integer (as y9 and y12). Second, several hyperparameters, such as the kernel size (i.e., y2 and y6), the kind of activation function (as y3, y7, y10, and y13), and the type of pooling, are represented by discrete choice from a set (i.e., y4 and 8). In this work, we also utilize numbers to denote various options and consider integer variables. For variable y3, for example, y1 signifies the ReLu activation function, whereas 2 and 3 represent the Sigmoid and Tanh activation functions, correspondingly. Third, other HPs such as dropout (y11 and y14) and learning rate (y15) are actual numbers. Furthermore, in the practical use of CNN, the number of decimals in these fundamental values is usually limited to a specified number. Using the learning rate as an example, we do not require many decimals most of the time, so the learning rate can only accept three decimals at most (0.001, 0.002, and so on). For the same reason, dropout can take decimal (e.g., 0.1, 0.2, and so on).


## 4. Result and Discussion

Real-time collected picture datasets utilized in image classification will be used in this experiment to test the performance of PSO-optimized CNN. The investigation takes place in a Windows 10 environment with a core I5 processor. Tensor flow is the foundation of our deep learning framework. Therefore, the entire process of constructing the model for plant disease identification using deep CNN is detailed. The procedure is broken into numerous necessary stages in the subsections below, beginning with image collection for the classification process utilizing DNN.


### 4.1. Performance Measure

The performance of the proposed methodology is estimated by using the different parametric measures as recall, f-score, accuracy, and precision. And also confusion matrix is used to appraise the performance of every instance.


#### 4.1.1. Confusion Matrix

The following metrics were used to evaluate classifier accuracy: positive predictive value (PPV), true positive rate (TPR), true negative rate (TNR), and negative predictive value (NPV). The confusion matrix is shown in Table3, and it is commonly used to evaluate the presence of a classification ideal on a test set by mapping expected outputs over actual outputs.Table 3
Confusion matrix performance measure.
Confusion matrixBioactivity class classifiersTrue positive (TP)True negative (TN)False positive (FP)False negative (FN)Fungal98.897.42.61.2Nonfungal9898.121.9Accuracy is the fraction of valid forecasts out of all predictions made, commonly expressed as a percentage, and determined using an equation (3).(3)Accuracy=Number of correct predictionTotal number of prediction.Precision, calculated as an equation (4), assesses a model’s ability to forecast values for a specific category correctly.(4)Precision=particular category predicted correctlyall category predictions.The recall is calculated as the fraction of correctly categorized positive patterns divided by the number of positive ways (5).(5)Recall=correctlypredictedcategoryallrealcategories.The F1-score is calculated as the weighted regular of precision and recall. The macro and micro averages were used to assess the overall performance of all assessment approaches except the confusion matrix.(6)F1−score=Average precisionAverage Recall.The comparison study of presenting measure after and before data augmentation method is shown in Tables4 and Table 5. The accuracy of the PSO-CNN model of the prior data augmentation process is 94.64 percent. PSO-CNN, on the other hand, achieved an accuracy of 96.88 following the data augmentation procedure. However, the proposed model (the full proposed scheme) had a higher accuracy result of 99.32 percent.Table 4
A comparative analysis of proposed method before data augmentation process.
MethodologyPrecisionRecallF1-scoreAccuracyCNN without preprocessing93.6693.5894.5691.00CNN with preprocessing93.9694.0193.5693.12PSO-CNN94.2894.1194.2194.64Table 5
Comparative analysis of proposed method after data augmentation process.
MethodologyPrecisionRecallF1-scoreAccuracyCNN without preprocessing94.3394.6294.6993.25CNN with preprocessing95.6794.0094.9995.50PSO-CNN96.195.5693.6196.88Proposed98.597.2598.9999.32


#### 4.1.2. Comparison of an Existing Model

Table6 and Figure 5 represent the comparison of accuracy performance of existing work with the proposed work. It has been observed that the proposed work shows higher accuracy (99.32%) as compared to existing algorithm. Previous studies show less accuracy in which Cheng et al.’s [18] work shows 93.40%, Oppenheim and Shani [19] found least accuracy (80.75%), and Rangarajan et al. [20] and Nandhini and Ashokkumar [21] observed 95.48% and 93.40% of accuracy, respectively. In work presented by [33], four cucumber infections termed anthracnose, downy mildew, target leaf spots, and powdery mildew are classified from the leaves. All of the photographs were captured in real time and classified using the DCNN.Table 6
Comparison of performance analysis of proposed with the existing method.
ReferenceClassifier modelPlant nameDiseasesDatasetAccuracy (%)[28]CNNMultipleMultipleSelf93.4[29]GoogLeNetMultipleMultipleDigipathos80.75[30]DCNNMultipleMultipleSelf95.48[31]CNNFirecracker and pomegranateMultipleSelf93.4ProposedCNNGloriosa superbaBinarySelf99.32Figure 5
Comparison of accuracy performance.The research [34] offered a study of plant pathology by using deep learning. In this paper, the author discusses numerous difficulties and parameters that affect network efficiency. Finally, the results validated the convolutional neural network's performance on photographs from the Digipathos repository.The study [35] suggested a DCNN for categorizing 10 diverse types of rice leaf disease from a collection of roughly 500 photographs encompassing both healthy and sick images in their study. The authors used a 10-fold cross-validation technique to achieve better classification results. The author [36] experimented with real-time illness classification from plant leaf photographs. For this job, the proposed method is developed in a cloud-based environment. Real-time images of plant leaves are collected for the category. However, the proposed model attained an accuracy of 99.32%.


#### 4.1.3. Receiver Operating Characteristic (ROC)

ROC is an analytical method that is commonly used to evaluate the presence of a system. In the true and false categories, ROC analysis overlaps the binormal distribution. The ROC of the suggested model is depicted in the image below. The cutoff can be made at any position inside the overlapped distribution area when the two distributions overlap. A y-3 coordinate indicates the corresponding TPR vs. FPR for each cutoff. These points can be connected to form a ROC curve. Figure6 shows the ROC for the proposed scheme.Figure 6
ROC for the proposed scheme.


## 4.1. Performance Measure

The performance of the proposed methodology is estimated by using the different parametric measures as recall, f-score, accuracy, and precision. And also confusion matrix is used to appraise the performance of every instance.


### 4.1.1. Confusion Matrix

The following metrics were used to evaluate classifier accuracy: positive predictive value (PPV), true positive rate (TPR), true negative rate (TNR), and negative predictive value (NPV). The confusion matrix is shown in Table3, and it is commonly used to evaluate the presence of a classification ideal on a test set by mapping expected outputs over actual outputs.Table 3
Confusion matrix performance measure.
Confusion matrixBioactivity class classifiersTrue positive (TP)True negative (TN)False positive (FP)False negative (FN)Fungal98.897.42.61.2Nonfungal9898.121.9Accuracy is the fraction of valid forecasts out of all predictions made, commonly expressed as a percentage, and determined using an equation (3).(3)Accuracy=Number of correct predictionTotal number of prediction.Precision, calculated as an equation (4), assesses a model’s ability to forecast values for a specific category correctly.(4)Precision=particular category predicted correctlyall category predictions.The recall is calculated as the fraction of correctly categorized positive patterns divided by the number of positive ways (5).(5)Recall=correctlypredictedcategoryallrealcategories.The F1-score is calculated as the weighted regular of precision and recall. The macro and micro averages were used to assess the overall performance of all assessment approaches except the confusion matrix.(6)F1−score=Average precisionAverage Recall.The comparison study of presenting measure after and before data augmentation method is shown in Tables4 and Table 5. The accuracy of the PSO-CNN model of the prior data augmentation process is 94.64 percent. PSO-CNN, on the other hand, achieved an accuracy of 96.88 following the data augmentation procedure. However, the proposed model (the full proposed scheme) had a higher accuracy result of 99.32 percent.Table 4
A comparative analysis of proposed method before data augmentation process.
MethodologyPrecisionRecallF1-scoreAccuracyCNN without preprocessing93.6693.5894.5691.00CNN with preprocessing93.9694.0193.5693.12PSO-CNN94.2894.1194.2194.64Table 5
Comparative analysis of proposed method after data augmentation process.
MethodologyPrecisionRecallF1-scoreAccuracyCNN without preprocessing94.3394.6294.6993.25CNN with preprocessing95.6794.0094.9995.50PSO-CNN96.195.5693.6196.88Proposed98.597.2598.9999.32


### 4.1.2. Comparison of an Existing Model

Table6 and Figure 5 represent the comparison of accuracy performance of existing work with the proposed work. It has been observed that the proposed work shows higher accuracy (99.32%) as compared to existing algorithm. Previous studies show less accuracy in which Cheng et al.’s [18] work shows 93.40%, Oppenheim and Shani [19] found least accuracy (80.75%), and Rangarajan et al. [20] and Nandhini and Ashokkumar [21] observed 95.48% and 93.40% of accuracy, respectively. In work presented by [33], four cucumber infections termed anthracnose, downy mildew, target leaf spots, and powdery mildew are classified from the leaves. All of the photographs were captured in real time and classified using the DCNN.Table 6
Comparison of performance analysis of proposed with the existing method.
ReferenceClassifier modelPlant nameDiseasesDatasetAccuracy (%)[28]CNNMultipleMultipleSelf93.4[29]GoogLeNetMultipleMultipleDigipathos80.75[30]DCNNMultipleMultipleSelf95.48[31]CNNFirecracker and pomegranateMultipleSelf93.4ProposedCNNGloriosa superbaBinarySelf99.32Figure 5
Comparison of accuracy performance.The research [34] offered a study of plant pathology by using deep learning. In this paper, the author discusses numerous difficulties and parameters that affect network efficiency. Finally, the results validated the convolutional neural network's performance on photographs from the Digipathos repository.The study [35] suggested a DCNN for categorizing 10 diverse types of rice leaf disease from a collection of roughly 500 photographs encompassing both healthy and sick images in their study. The authors used a 10-fold cross-validation technique to achieve better classification results. The author [36] experimented with real-time illness classification from plant leaf photographs. For this job, the proposed method is developed in a cloud-based environment. Real-time images of plant leaves are collected for the category. However, the proposed model attained an accuracy of 99.32%.


### 4.1.3. Receiver Operating Characteristic (ROC)

ROC is an analytical method that is commonly used to evaluate the presence of a system. In the true and false categories, ROC analysis overlaps the binormal distribution. The ROC of the suggested model is depicted in the image below. The cutoff can be made at any position inside the overlapped distribution area when the two distributions overlap. A y-3 coordinate indicates the corresponding TPR vs. FPR for each cutoff. These points can be connected to form a ROC curve. Figure6 shows the ROC for the proposed scheme.Figure 6
ROC for the proposed scheme.


## 4.1.1. Confusion Matrix

The following metrics were used to evaluate classifier accuracy: positive predictive value (PPV), true positive rate (TPR), true negative rate (TNR), and negative predictive value (NPV). The confusion matrix is shown in Table3, and it is commonly used to evaluate the presence of a classification ideal on a test set by mapping expected outputs over actual outputs.Table 3
Confusion matrix performance measure.
Confusion matrixBioactivity class classifiersTrue positive (TP)True negative (TN)False positive (FP)False negative (FN)Fungal98.897.42.61.2Nonfungal9898.121.9Accuracy is the fraction of valid forecasts out of all predictions made, commonly expressed as a percentage, and determined using an equation (3).(3)Accuracy=Number of correct predictionTotal number of prediction.Precision, calculated as an equation (4), assesses a model’s ability to forecast values for a specific category correctly.(4)Precision=particular category predicted correctlyall category predictions.The recall is calculated as the fraction of correctly categorized positive patterns divided by the number of positive ways (5).(5)Recall=correctlypredictedcategoryallrealcategories.The F1-score is calculated as the weighted regular of precision and recall. The macro and micro averages were used to assess the overall performance of all assessment approaches except the confusion matrix.(6)F1−score=Average precisionAverage Recall.The comparison study of presenting measure after and before data augmentation method is shown in Tables4 and Table 5. The accuracy of the PSO-CNN model of the prior data augmentation process is 94.64 percent. PSO-CNN, on the other hand, achieved an accuracy of 96.88 following the data augmentation procedure. However, the proposed model (the full proposed scheme) had a higher accuracy result of 99.32 percent.Table 4
A comparative analysis of proposed method before data augmentation process.
MethodologyPrecisionRecallF1-scoreAccuracyCNN without preprocessing93.6693.5894.5691.00CNN with preprocessing93.9694.0193.5693.12PSO-CNN94.2894.1194.2194.64Table 5
Comparative analysis of proposed method after data augmentation process.
MethodologyPrecisionRecallF1-scoreAccuracyCNN without preprocessing94.3394.6294.6993.25CNN with preprocessing95.6794.0094.9995.50PSO-CNN96.195.5693.6196.88Proposed98.597.2598.9999.32


## 4.1.2. Comparison of an Existing Model

Table6 and Figure 5 represent the comparison of accuracy performance of existing work with the proposed work. It has been observed that the proposed work shows higher accuracy (99.32%) as compared to existing algorithm. Previous studies show less accuracy in which Cheng et al.’s [18] work shows 93.40%, Oppenheim and Shani [19] found least accuracy (80.75%), and Rangarajan et al. [20] and Nandhini and Ashokkumar [21] observed 95.48% and 93.40% of accuracy, respectively. In work presented by [33], four cucumber infections termed anthracnose, downy mildew, target leaf spots, and powdery mildew are classified from the leaves. All of the photographs were captured in real time and classified using the DCNN.Table 6
Comparison of performance analysis of proposed with the existing method.
ReferenceClassifier modelPlant nameDiseasesDatasetAccuracy (%)[28]CNNMultipleMultipleSelf93.4[29]GoogLeNetMultipleMultipleDigipathos80.75[30]DCNNMultipleMultipleSelf95.48[31]CNNFirecracker and pomegranateMultipleSelf93.4ProposedCNNGloriosa superbaBinarySelf99.32Figure 5
Comparison of accuracy performance.The research [34] offered a study of plant pathology by using deep learning. In this paper, the author discusses numerous difficulties and parameters that affect network efficiency. Finally, the results validated the convolutional neural network's performance on photographs from the Digipathos repository.The study [35] suggested a DCNN for categorizing 10 diverse types of rice leaf disease from a collection of roughly 500 photographs encompassing both healthy and sick images in their study. The authors used a 10-fold cross-validation technique to achieve better classification results. The author [36] experimented with real-time illness classification from plant leaf photographs. For this job, the proposed method is developed in a cloud-based environment. Real-time images of plant leaves are collected for the category. However, the proposed model attained an accuracy of 99.32%.


## 4.1.3. Receiver Operating Characteristic (ROC)

ROC is an analytical method that is commonly used to evaluate the presence of a system. In the true and false categories, ROC analysis overlaps the binormal distribution. The ROC of the suggested model is depicted in the image below. The cutoff can be made at any position inside the overlapped distribution area when the two distributions overlap. A y-3 coordinate indicates the corresponding TPR vs. FPR for each cutoff. These points can be connected to form a ROC curve. Figure6 shows the ROC for the proposed scheme.Figure 6
ROC for the proposed scheme.


## 5. Conclusion

Agricultural plant diseases should not be disregarded since, in their advanced stages, they can be lethal. The model, which is a paradigm for effectively handling deep learning issues, employs a hyperparameter and data augmentation technique. This model may also forecast the incidence of illness, which can help with important plant health choices. The CNN classifier's hyperparameters are modified using the particle swarm optimization (PSO) algorithm, which optimizes a number of these HPs by identifying optimal values for these HPs rather than utilizing traditional approaches such as manual trial and error. With adequate hyperparameter tuning and the right choice of optimizers, overfitting may be avoided, resulting in an effective classifier. We used the normalization and standardization approach to normalize and standardize the dataset pictures during the preprocessing step. Furthermore, in order to avoid the problem of dataset imbalance, they are using the data augmentation methodology to enlarge the dataset size using various approaches. Finally, with a decreased error rate, our suggested model attained a 99.32 percent accuracy. We planned to collect further images to categorize distinct illnesses assaults such as to attain optimum accuracy (fungal, bacteria, virus, and insect holes).



---

*Source: 7413983-2022-07-11.xml*