LEAF DISEASE DETECTION OF CUCURBITS USING CNN

Identification of plant disease is tough in agribusiness arena. If it is inaccurate, there occurs a tremendous damage in the production and economical price. Leaf Disease detection requires huge amount of work, knowledge, processing time in plant disease. The most used and edible vegetable all over the world is from cucurbitaceous family. The crops under this family have great economic value in the food industry and its production is done in large scale. This family consists of 965 species. If any of these plants catch disease then there would be a tremendous loss in the production of this field yields. Thus, treating them at early stage is best way to prevent such losses. Hence, Deep Learning Algorithm like CNN can be used to detect the diseases of the plants. The leaves of the plants would be used as primary material for identification of the disease, as they are much more visible on the leaves.


I. INTRODUCTION
Agriculture is an essential factor in the financial development of the nation. Certain factors affect the condition of the crops. Due to varying weather constraints these plants are highly prone to infections. Some of the plant species are huge family , thus if the diseases are undetected then it may lead to huge loss. Thus detecting and classifying each and every plant is mandatory , even a single infected plant can expand the disease. In rural areas, farmers lack certain knowledge about the diseases and better treatments for them. Hence we have developed a Deep Learning based solution to solve all these problems. The proposed system named "Leaf disease detection of cucurbits using CNN" is going to be very helpful for farmers and agriculture practitioners. Using this system one can easily detect diseases occurred to the plants from the Cucurbitaceae family. This system will be created using an algorithm which will benefit the farmhand to discover the disease in the initial stage and can give the required treatment. There are many different systems that detect diseases for tomatoes, cotton, rice, maize, soya bean but there is no such system that detects diseases for Cucurbit family. As agriculture is the most important aspect, using this system will help to reduce the loss in agricultural yields of cucurbit family due to diseased plants. This system can also give the required treatment. Most of the plant leaves are infected due to bacteria, fungi and atmospheric pollutants. For using this system one must use an image of a leaf, of a diseased plant. After uploading the image the disease will be detected and appropriate treatments will be suggested. This project will help farmers to find out about the disease at its primary stage. This project will contain disease detection for some of the species of the family. The system detects the most common diseases The disease will classified based on texture , color and shape.

II. LITERATURE SURVEY
Different methods and classifiers are used by various researches to classify the diseases occurred. This paper is very precise for artificial intelligence and gives remedy for determining and categorizing discrete plant leaf diseases present, and uses convolutional neural network for classification grounds. It has four classifiers such aslogistic regression, KNN, SVM and CNN. [2] K-means clustering is used for segmentation of images, GLCM is also used for texture feature extraction, comprising the mean for color feature extraction and KNN, Neural Network, and lastly SVM is for the final analysis of disease. [1] Paper by Raghottam Kulkarni and Dr. A.V Sutagundar titled Plant Leaf Disease Management System (IEEE 2017). The main aim of the system was to analyze the plant species from its leaf and classify whether the leaf is in good physical condition or not and then if the leaf is detrimental, it warns about the disease the plant has and if it is in a good physical condition then it shows it is normal. Some of the main methods for detection of leaf diseases are: K-Means cluster, GLCM, and Neural Network Classifiers. Such methods successfully detect the healthy and unhealthy plant leaves. Hence, the project beneficial for identifying the plant disease. [3] Disease detection was done on cotton plants using GLCM and SVM. To classify the diseases like Magnesium deficiency and Bacterial blight are differentiated by diverse class SVM classifier. Using SVM the features are pulled from the segmented images by considering the inputs given. [4] The proposed methodology of image processing is achieved using MATLAB. Image processing is carried out on leaf images and features are pulled out from the diseased using k-means clustering algorithm. Variety of characteristics such as contrast, correlation, energy, homogeneity, mean, standard deviation and variance are taken out for tomato and cotton diseases. [5] K-Medoid clustering and Random Forest classification algorithms are used to determine the diseases. The workflow of the project is: It stores an image dataset of unhealthy and healthy stalks. The whole database is separated into training and testing sets. Using this data the entire model is trained to detect the diseases. [6] Based on RGB factors, the filters are put onto three channels. The LVQ are stored combining the resultant feature vector of convolution to train the network. The outputs confirm that the proposed methodology is very effective in recognizing the four varied types of tomato leaf diseases. [7] The given algorithm distinguishes disease in plants and classify them in a very accurate manner as compared to the existing techniques. [8] The system provides an accurate result generated by using various cluster sizes, enhanced the experiment with image segmentation. The system gives viable evaluation and prediction of the disease causing agent with necessary safety measures. [9] Summary of Leaf-based plant disease detection systems: It is a systematic study to find and classify the leaf disease. This paper was written by Ravindra Jogekar , Dr. Nandita Tiwari. [10]

III. PROPOSED METHODOLOGY
The system proposed has the following phases: x Image Collection x Image pre-processing x Segmentation/Feature Extraction x Selection of Classifier x Analyzing Results x Predicting the Disease x Treatment Suggestion In Image Collection, data-sets consist of both healthy and diseased leaves which has disorders like powdery mildew, downy mildew. Anthracnose, angular leaf spot, bacterial leaf spot. The images consist of cucumber, squash, pumpkin and watermelon. The pictures of the leaves were gathered from different online sites and were classified into healthy and diseased leaves.

Image Preprocessing:
In this, the images are resized into the resolution of 256x256 .The pre-processing is used to upgrade the image quality and to obtain the required features of images.

Formula for RGB to Grayscale:
Gray scale to RGB, have equivalent red, green and blue values.

B=G=R (1)
For every image, pixels consisting red, green and blue of (R,G,B)

Segmentation:
Segmentation of the image is carried out to separate the background from the leaves.

Selection of Classifier:
Here, the classification of the type of disease occurring on the leaves is done. There are many Deep Learning Algorithms which can be applied on the database. We have selected CNN as our classifier.

CNN (Convolutional Neural Network)
It is a complicated model that is used to categorize the diseases and is complex, thus it needs a good computational power. It is also a commonly used neural network which is referred to certain image classification problems. This system comprises of "Seven Layers" : The dataset was distributed in training set and validation set. Later the training data was generated by sending certain parameters like target_size, color_mode.
The the model was trained using Convolutional Neural network. There is a input layer with 32 filters and a convolutional network (2D) with 64 filters. Two max pooling layers of strides 2x2 are used, followed by a flattening layer. There are two fully connected dense layers with units 120 and 18.

V. CONCLUSION
In the agriculture industry, there is great risk of the diseases that attacks the plants. Cucurbitaceae being the largest family and the most used vegetable , it is important to treat the plants in this family. This sums up the major image preprocessing and identification of leaf diseases using CNN Algorithm in the backend and UI is designed using Flask. The Training accuracy achieved is 72% and testing accuracy achieved is 12% .This approach can significantly helps in accurate detection of leaf disease. By analyzing the amount of disease present in the leaf, one can use sufficient amount of fertilizers to control and treat the disease. Also the user can understand the affected area of leaf and solve the problem with ease.

VI. FUTURE SCOPE
The accuracy can be improved by trying different algorithms or applying some unsupervised learning technique such as k-means clustering. The quantity of dataset needs to be increased in order to achieve accurate predictions. This system can be improved by converting the proposed web app to android app in order to increase its usability . Additional species can also be added to cover the entire family.