Plant Disease Detection Using Cnn

. Plants and crops that are infected by pests have an impact on the country's agricultural production. Usually, farmers or professionals keep a close eye on the plants in order to discover and identify diseases. However, this procedure is frequently time-consuming, costly, and imprecise. Plant disease detection can be done by looking for a spot on the diseased plant's leaves. The goal of this paper is to create a Disease Recognition Model that is supported by leaf image classification. To detect plant diseases, we are utilizing image processing with a Convolution neural network (CNN). A convolutional neural network (CNN) is a form of artificial neural network that is specifically intended to process pixel input and is used in image recognition.


INTRODUCTION
Agricultural production is a very old means of obtaining food. It is a vital source of income for people all around the world. No one can exist in our world without food. Plants are crucial not only for humans, but also for animals who rely on them for food, oxygen, and other necessities. The government and experts are taking significant initiatives to enhance food production, and they are working successfully in the real world. When a plant becomes afflicted with a disease, all living organisms in the environment are affected in some way. This plant disease can affect anywhere on the plant, including the stem, leaf, and branch. Even the types of illnesses that impact plants, such as bacterial and fungal diseases .etc can differ. The illness that impacts the crops will be determined by factors such as climate. There are a large number of people that are food insecure. This occurs as a result of insufficient food crop output. Even significant climate changes will have an impact on plant development. This type of natural tragedy is unavoidable. Early detection of plant disease aids in the prevention of large-scale crop losses. Farmers must apply the appropriate insecticides for their crops. Too many pesticides are harmful to crops and farmland. Getting expert advice will help you avoid misusing chemicals on plants. Plants have been the focus of many researchers to aid farmers and others involved in agriculture. When a disease is visible to the naked eye, it is straightforward to detect. The illness may be discovered and treated early if the farmer has sufficient information and monitors the crops on a regular basis. However, this phase only exists when the disease is extreme or crop output is low. Then there are the different innovations. Farmers will benefit from the introduction of automated disease detection tools. This approach yields outcomes that are suitable for both little and large-scale agricultural cultivation. Importantly, the results are precise, and the disorders are detected in a very short amount of time. These technologies rely heavily on deep learning and neural networks to function. Deep Convolutional Neural Network is utilized in this study to identify infected and healthy leaves, as well as to detect illness in afflicted plants. The CNN model is designed to suit both healthy and sick leaves; photos are used to train the model, and the output is determined by the input leaf.

LITERATURE REVIEW
K.Muthukannan and colleagues discovered spot infections in leaves and categorized them according to the diseased leaf categories using various machine learning algorithms. LVQ -Learning Vector Quantization, FFNN -Feed Forward Neural Network, and RBFN -Radial Basis Function Networks were utilized to diagnose diseased plant leaves by analyzing the collection of form and texture data from the afflicted leaf picture. The simulation showed that the proposed system is effective. With the support of this work, a machine learning-based system for improving crop quality in the Indian economy can be developed. [1] The study of plant leaf disease detection by Malvika Ranjan and colleagues starts with image capturing. Color data, such as HSV features, are retrieved from the segmentation results, and an artificial neural network (ANN) is then trained by selecting feature values that can effectively discriminate between healthy and sick samples. Using a combination of image data processing methods and ann, the current study suggests a method for identifying cotton leaf illnesses early and reliably. [2] The goal of Syafiqah Ishakais and colleague's study of Leaf Disease Classification using Artificial Neural Network is to acquire and analyze data from leaf photos in order to determine healthy or diseased leaves of medical plants using image processing methods. To extract pictures and get data, an algorithm of adjusted contrast, segmentation, and features extraction is employed from the image processing approach. The Artificial Neural Network was used to analyze the findings of the experiment. The architecture of the network used to classify healthy or unhealthy leaves is multilayer feed-forward Neural Networks, which are multilayer perceptron and radial basis function RBF. The end outcome of the experiment demonstrates that the RBF network outperforms the MLP network. [3] Srdjan Sladojevic and colleagues present Deep Convolutional Neural network Supported Identification of Crop Diseases by Plant Image Classification, a new method for the construction of a crop diseases recognition model based on plant image classification and deep convolutional networks. The methodology employed and the novel technique of training allow for a quick and painless system set up in practice. With the ability to identify crops from their surroundings, the built model can recognize thirteen types of plant illnesses from healthy leaves. All of the necessary processes for applying this diseases recognition model are detailed throughout the study, beginning with the collection of photographs in order to establish a database that is evaluated by agricultural experts. Caffe, a deep learning framework developed by Berkley Vision and Learning Centre, was used to perform the deep CNN training. The experimental results on the developed model achieved precision between 91% and 98%, for separate class tests, on average 96.3%. [4] CNN and Modeling Adversarial Networks were used to classify plant diseases. Others, like Emanuel Cortes A deep neural network and semi-supervised algorithms were trained to distinguish crop species and disease status of 57 different classes using a publicly available dataset of 86,147 photos of ill and healthy plants. rs-net was the unlabeled data experiment that functioned successfully. With a detection rate of 1e-5, it was able to score more than 80% in the training phase in less than 5 epochs. [5] Plant disease identification and treatment using neural network models, Konstantinos P. Ferentinos and colleagues built CNN models to conduct crop disease identification and diagnosis using basic leaf pictures of healthy and sick plants. The  In the study Soybeans, Crop Disease Detection Using Cnns, Serawork Wallelign, and the others The viability of CNN for crop diseases identification in leaves pictures captured in the natural surroundings is presented in this study. To accomplish the soybeans plant disease classification, the model is built using the LeNet architecture. The PlantVillage collection yielded 12,673 samples tested green photos from four types, including healthy leaf images. The photos were taken in an unstructured setting. The built model obtains an accuracy of classification of 99.32 percent, demonstrating it a Convolutional neural network effectively extract significant features and diagnose plant diseases from photos captured in the wild. [7].  -FCN), and the Single Action Multibox Detector (SSD), all of which are referred to as "deep learning meta-architectures" in this paper. We use "deep feature extractors" like VGG net and Residual Network to merge every one of these meta-architectures (ResNet). We show how deep morpho and feature extractors perform, and we also suggest a way for locally and globally category labeling and feature extraction to improve accuracy and reduce false positives throughout training. We train and test our systems end-to-end on our large Tomato Diseases and Pests Dataset, which contains challenging images of diseases and pests, including several inter-and extra-class variations, such as infection status and location in the plant. [8] This paper outlines a method for accurately identifying apple leaf diseases. Building enough unhealthy photos and unique architecture of a deep CNN based on AlexNet are required to identify apple leaf infections. Using a database of 13,689 pictures of sick apple leaves, the suggested deep CNN model is meant to detect four common apple leaf disorders. The total accuracy of the suggested illness detection model is 97.62 percent. When compared to the AlexNet model, the parameters of the suggested model were reduced by 51,206,928 and the model's accuracy was enhanced by 10.83 percent with produced pathological pictures. According to this research, the deep learning model for disease management may be more accurate and have a faster convergence rate, therefore enhancing disease control. [9] Prasanna Mohanty and colleagues developed a deep convolutional neural network using deep learning to detect 14 different crops and 26 illnesses. On a held-out test set, the training set model obtained an accuracy of 99.35 percent, illustrating the practicality of this strategy. The model still obtains a 31.4 percent accuracy when tested on a collection of photographs acquired from reputable web sources -i.e. images shot under settings distinct from those used for training. While this accuracy is substantially greater than the one based on random selection 2.6%, a larger collection of training data is required to increase overall accuracy. [10].
To diagnose plant leaf illnesses, Ashwin Dhakal and colleagues created a model that includes feature extraction, segmentation, and classification of collected leaf patterns. Yellow Leaf Curl Virus, Bacterial Spot, Late Blight, and Healthy Leaf are the four classifier labels employed. With 20 epochs, the retrieved characteristics are fitted into the neural network. Various neural networkbased topologies are used, with the greatest accuracy of 98.59 percent in predicting plant disease. [11] S. Khirade and colleagues used digital image processing algorithms and BPNN -backpropagation neural networks to solve the problems of detection of plant diseases in 2015. Different techniques for identifying plant disease using photographs of leaves have been developed by the authors. To segment the contaminated section of the leaf, they used Otsu's thresholding, followed by border detection and spot detection algorithms. They then extracted properties such as colour, texture, morphology, edges, and so on in order to classify plant diseases. The BPNN algorithm is used to classify or identify plant diseases. [12] In 2017, Peyman Moghadam and colleagues proved the use of hyperspectral imaging in the diagnosis of plant diseases. In this research, the VNIR -visible and nearinfrared and SWIR -short-wave infrared spectrums were employed. For leaf segmentation, the authors employed the k-means clustering approach in the spectral domain. To remove the grid from hyperspectral pictures, they suggested a unique grid removal technique. The accuracy of vegetation indices in the VNIR spectral range was 83 percent, and full-spectrum accuracy was 93 percent. Despite the fact that the suggested technique achieved improved accuracy, it necessitates the use of a hyperspectral camera with 324 spectral bands, making the solution prohibitively expensive. [13] Sharath D. M. and colleagues created a Bacterial Blight detection method for Pomegranate plants in 2019 utilizing variables including colour, mean, homogeneity, SD, variance, correlation, entropy, and edges. Grab cut segmentation was used by the authors to segment the image's region of interest. The edges of the photos were extracted using the Canny edge detector. The authors have succeeded in developing a system that can forecast the degree of infection in the fruit. [14].
The convolutional neural network was used by Garima Shrestha and colleagues to identify plant disease in 2020. With an accuracy of 88.80 percent, the authors were able to classify 12 plant diseases. Experimentation was carried out by using a collection of 3000 high-resolution RGB photographs. The convolutional layer and pooling layer have 3 blocks in this network. Eventually, the network becomes very expensive as a result of this. Additionally, the model's F1 score is 0.12, which is extremely poor due to the significant amount of erroneous negative predictions. [15]

PROPOSED SYSTEM
We are building a neural network model for image classification. this model will be deployed on the android application for live detection of plant leaf disease through an android phone's camera. The recognition and classification procedures are depicted in Fig. 1

Fig. 1. Block Diagram Of Proposed System
(1) The first step is to collect data. We are using the PlantVillage Dataset, which is widely available. This dataset was released by crowdAI.
(2) Pre-processing and Augmentation of the collected dataset is done using pre-processing and Image-data generator API by Keras.
(4) Developed model will be deployed on the Android Application with help of TensorFlow lite.

Fig. 2. CNN Architecture
A Convolutional Neural Network has three layers: a convolutional layer, a pooling layer, and a fully connected layer. Fig 2 shows all layers together.

Convolution Layer
Convolutional layer: produces an activation map by scanning the pictures several pixels at a time using a filter. Fig 3 shows the internal working of the convolution layer.

Pooling Layer
Pooling layer: reduces the amount of data created by the convolutional layer so that it is stored more efficiently.

Fully Connected Layer
Fully connected input layer -The preceding layers' output is "flattened" and turned into a single vector which is used as an input for the next stage. The first fully connected layer -adds weights to the inputs from the feature analysis to anticipate the proper label. Fully connected output layer -offers the probability for each label in the end.  VGG19 is a sophisticated CNN with pre-trained layers and a thorough grasp of how an image is defined in terms of form, color, and structure. VGG19 is a deep neural network that has been trained on millions of photos with challenging classification problems.

RESULT
A 95.6% accuracy rate was achieved using early stopping while Training the model on 50 epochs. Figure 7 depicts the visualization of training and validation accuracy. The result of detecting and recognizing a strawberry plant is shown in Figure 8. On the left, a healthy plant leaf, and on the right, a sick infected plant. The result of detecting and recognizing a potato plant is shown in Figure 9. On the left, a healthy plant leaf, and on the right, a sick infected plant.

CONCLUSION & FUTURE WORK
We are successful in creating disease classification techniques used for plant leaf disease detection. A deep learning model that can be used for automatic detection and classification of plant leaf diseases is created. Tomato, strawberry, soybean, raspberry, potato, corn, Pepper bell, peach, orange, grape, cherry, blueberry, apple are 13 species on which the proposed model is tested. 38 classes of plants were taken for identification through this work. We were successfully able to work with the image data generator API by Keras. Through this, we were able to do image-processing tasks. We were also able to create the vgg-19 model which is an advanced convolution model and train the model with the data for prediction. The prediction is done by our model is almost correct. We have successfully deployed these model on the android app and are trying to increase the accuracy of the android app as well as the model.