Academia.eduAcademia.edu

Image-Based Plant Disease Detection with Deep Learning

2018, International Journal of Computer Trends and Technology (IJCTT)

https://doi.org/10.14445/22312803/IJCTT-V61P105

Deep Learning becomes the most accurate and precise paradigms for the detection of plant disease. Leaves of Infected crops are collected and labelled according to the disease. Processing of image is performed along with pixel-wise operations to enhance the image information. It is followed with feature extraction, segmentation and the classification of patterns of captured leaves in order to identify plant leaf diseases. Four classifier labels are used as Bacterial Spot, Yellow Leaf Curl Virus, Late Blight and Healthy Leaf. The features extracted are fit into the neural network with 20 epochs. Several artificial neural network architectures are implemented with the best performance of 98.59% accuracy in determining the plant disease. This was a great success, demonstrating the feasibility of this approach in the field of Plant Disease Diagnosis and high crop yielding.

International Journal of Computer Trends and Technology ( IJCTT ) – Volume 61 Number 1 – July 2018 Image-Based Plant Disease Detection with Deep Learning Ashwin Dhakal1, Prof. Dr. Subarna Shakya2 1 Tribhuvan University, Institute of Engineering, Paschimanchal Campus, Department of Electronics and Computer Engineering, Lamachour-16, Pokhara 2 Professor of Computer Engineering,Tribhuvan University,Institute of Engineering, Central Campus, Department of Electronics and Computer Engineering, Pulchowk, Lalitpur Abstract Deep Learning becomes the most accurate and precise paradigms for the detection of plant disease. Leaves of Infected crops are collected and labelled according to the disease. Processing of image is performed along with pixel-wise operations to enhance the image information. It is followed with feature extraction, segmentation and the classification of patterns of captured leaves in order to identify plant leaf diseases. Four classifier labels are used as Bacterial Spot, Yellow Leaf Curl Virus, Late Blight and Healthy Leaf. The features extracted are fit into the neural network with 20 epochs. Several artificial neural network architectures are implemented with the best performance of 98.59% accuracy in determining the plant disease. This was a great success, demonstrating the feasibility of this approach in the field of Plant Disease Diagnosis and high crop yielding. Many of the approaches used the same basic procedure [4,5,6,7,8,9,10], implementing basic supervised classification algorithms previously. In addition to this, artificial neural networks [11] and support vector machine [12] are also used for the image classification. As deep learning avoids the laborintensive feature engineering and threshold-based segmentation [13], it is robust for classification of plant diseases. In this research, four categories of plant leaves are studied which consist of Bacterial Spot, Yellow Leaf Curl Virus, Late Blight and Healthy Leaf. Several artificial neural network architectures are designed from scratch and the best model was implemented for training. Hyper-parameter optimization of the network resulted in the continuous improvement with the best performance of 98.59% accuracy for plant disease detection using leaves image. Keywords: Convolutional neural network, Deep learning, Plant disease detection, Image processing, Machine learning Our research is carried out in following sections. Each steps are implemented precisely with the visualization of its state. I. INTRODUCTION A. Data extraction Images of infected and healthy leaves are collected from PlantVillage dataset [14] and various online sources. The training images dataset consist of leaf samples with following diseases: Bacterial Spot, Yellow Leaf Curl Virus, Late Blight and Healthy Leaf. The United Nations Food and Agricultural Organization (FAO) assumes that food and feed production will need to increase by 70% by 2050 to meet the world’s food needs [1]. There is high chance of food insecurity if the production is not increased through the use of precise and highly adoptable technology. Nevertheless, the major threat to food security is crop disease. Detection and diagnosis of plant disease can be tedious but this certainly helps to reduce yield losses [2]. Traditionally, plant diseases were detected through visual inspection of plant tissue by trained experts [3]. This was costly and inappropriate paradigms as human intelligence is not perfect. This can be best solved using machine learning, where the image of infected plant’s leaf is pre-processed and fit into neural network model for detection of disease. ISSN: 2231 – 2803 II. METHODOLOGY B. Image Preprocessing and Normalization PlantVillage datasets are arbitrarily sized RGB images. As most of the neural network models assume a square shape input image, it is reshaped to 256× 256 pixels maintaining uniform aspect ratio. It is ensured that images contain all the required information for feature extraction. In order to make convergence faster while training the network, dataset are normalized. Data normalization is carried out by subtracting the mean from each pixel, and then dividing the result by the standard deviation. Hence, each input parameter i.e. http://www.ijcttjournal.org Page 26 International Journal of Computer Trends and Technology ( IJCTT ) – Volume 61 Number 1 – July 2018 Pixel in this case, are maintained a similar data distribution. C. Image augmentation Since the neural network tends to over-fit in case of limited number of training data samples trained with higher number of epochs [15], we implement the technique of image augmentation for artificially expanding dataset. Zoom, shear, rotation and preprocessing functions are the Image augmentation parameters used. In addition to this, contrast stretching, histogram equalization and adaptive histogram equalization are used as custom functions to generate augmented images. Usage of these parameters results in generation of images having these attributes during training of artificial neural network model. Fig 2 (a): Image of Bacterial spot infected leaf Fig 1 (a): Image of Late Blight infected leaf Fig 2 (b): Corresponding augmented images using Adaptive Histogram Equalization Similar is the result for yellow leaf curl virus and healthy leaf sample. D. Design of Artificial Neural Network Initially, a network consisting of 4 convolutional and pooling layers [16] is built from scratch. For an input x of the ith convolutional layer, it computes: �� Fig 1 (b): Corresponding augmented images using Adaptive Histogram Equalization Augmented Images using adaptive histogram equalization are shown, which improves the local contrast of image by computing several histograms corresponding to different sections of image and uses them for local contrast adjustment. ISSN: 2231 – 2803 = ���� ��× , (1) Where, x represents the convolution operation and Wi represents the convolution kernels of the layer. Wi = [W i 1, Wi 2,…, Wi K], and K is the number of K convolution kernels of the layer. Each kernel W i is an M × M× N weight matrix with M being the window size and N being the number of input channels. The hyper-parameters are fine-tuned along with the addition of hidden layers. This resulted in gradual increase in precision. Eventually, Neural Network consisting of 7 hidden layers resulted the best http://www.ijcttjournal.org Page 27 International Journal of Computer Trends and Technology ( IJCTT ) – Volume 61 Number 1 – July 2018 performance and highest accuracy. Rectified linear function (ReLU(x) = max(0, x)), is used as activation function and in pooling, we pass convolutional neural network and window size. Loss is reduced using Adam optimizer and the graph is shown as follows: Loss function measures the discrepancy between predicted result and the label of the input and it is defined as the sum of cross entropy: � � � = − ∑�� =� ∑��=�[ �� ��� � � �� ��� � − � � = � ], � = � + �− (2) Where, W indicates the weight matrixes of convolutional and fully connected layers, n indicates the number of training samples, i is the index of training samples, and k is the index of classes. yik = 1 if the ith sample belongs to the kth class; else yik = 0. P(xi = k) is the probability of input xi belonging to the kth class that the model predicts, which is a function of parameters W. Fig 4: loss/validation curve observed The accuracy/validation graph of the trained neural network is plotted and was found to be very impressive. Testing accuracy is measured to be 95.62% and is shown in the graph below: In this network architecture, fully-connected layer is followed by dropout with dropout rate 0.8. Output layer is also a fully connected layer but in this case, softmax function is used as activation function. Finally, we run regression on ConvNet and Adam is used as an optimization algorithm instead of the classical stochastic gradient descent procedure to update network weights with learning rate 0.001. E. Training Neural Network Machine learning models cannot work with images directly. The images and labels are converted to array information that we pass through our network. We build another function to fully process the training as well as testing image data sets and convert it into array of numpy file. Finally, feature engineered parameters are fit into the neural network for 20 epochs. This resulted training accuracy of 98.59% as shown in the following graph: Fig 5: accuracy/validation curve observed III. IMPLEMENTATION This research is performed on Asus GL502VM, Intel i7 7700HQ, Kaby Lake processor with 16GB RAM, accelerated by NVIDIA GTX 1070 (8 GB memory). IV. RESULTS The overall accuracy obtained is 98.59%. Hence plants diseases infected by bacteria, curl virus and late blight can be recognized easily with higher precision and accuracy. V. DISCUSSIONS AND CONCLUSION This research presents the study on plant diseases detection using artificial neural network. The optimum results (as shown in figure 3, 4 and 5) shows the proficiency of deep learning in recognition and Fig 3: accuracy and learning curve of model ISSN: 2231 – 2803 http://www.ijcttjournal.org Page 28 International Journal of Computer Trends and Technology ( IJCTT ) – Volume 61 Number 1 – July 2018 detection of the plant diseases using infected leaf’s image. [8] REFERENCES [1] [2] [3] [4] [5] [6] [7] FAO. (2009, September 23). http://www.fao.org. Retrieved from Food and Agriculture Organization of the Unites States: http://www.fao.org/news/story/en/item/35571/icode Bock C. H., Poole G. H., Parker P. E., Gottwald T. R. Plant disease severity estimated visually, by digital photography and image analysis, and by hyperspectral imaging. Critical Reviews in Plant Sciences. 2010;29(2):59–107. doi: 10.1080/07352681003617285. Mutka A. M., Bart R. S. Image-based phenotyping of plant disease symptoms. Frontiers in Plant Science. 2015;5, article no. 734 doi: 10.3389/fpls.2014.00734. P.Chaudhary, A. K. Chaudhari, A. N. Cheeran, and S. Godara, “Color transform based approach for disease spot detection on plant leaf,” International Journal of Computer Science and Telecommunications, vol. 3, no. 6, pp. 65–69, 2012. Qin F., Liu D., Sun B., Ruan L., Ma Z., Wang H. Identification of alfalfa leaf diseases using image recognition technology. PLoSONE. 2016;11(12) doi: 10.1371/journal.pone.0168274.e0168274. Al Hiary H., Bani Ahmad S., Reyalat M., Braik M., ALRahamneh Z. Fast and Accurate Detection and Classification of Plant Diseases. International Journal of Computer Applications. 2011;17(1):31–38. doi: 10.5120/2183-2754. Omrani E., Khoshnevisan B., Shamshirband S., Saboohi H., Anuar N. B., Nasir M. H. N. M. Potential of radial basis function-based support vector regression for apple disease ISSN: 2231 – 2803 [9] [10] [11] [12] [13] [14] [15] detection. Measurement: Journal of the International Measurement Confederation. 2014;55:512–519. doi: 10.1016/j.measurement.2014.05.033. Hernández-Rabadán D. L., Ramos-Quintana F., Guerrero Juk J. Integrating SOMs and a Bayesian Classifier for Segmenting Diseased Plants in Uncontrolled Environments. Scientific World Journal. 2014;2014 doi: 10.1155/2014/214674.214674. Barbedo J. G. A. A new automatic method for disease symptom segmentation in digital photographs of plant leaves. European Journal of Plant Pathology. 2016;147(2):349–364. doi: 10.1007/s10658-016-1007-6. J.G. ArnalBarbedo, “Digital image processing techniques for detecting, quantifying and classifying plant diseases,” SpringerPlus, vol. 2, article 660, pp. 1–12, 2013. H. Cartwright, Ed., Artificial Neural Networks, Humana Press, 2015. I.Steinwart and A. Christmann, Support Vector Machines, Springer Science & Business Media, New York, NY, USA, 2008. LeCun Y., Bengio Y., Hinton G. Deep learning. Nature. 2015;521(7553):436–444. doi: 10.1038/nature14539. Plant Polyphenols, Prenatal Development and Health Outcomes. Biological Systems: Open Access. 2014;03(01) doi: 10.4172/2329-6577.1000e111. D.M. Hawkins, “The problem of over-fitting,” Journal of Chemical Information and Computer Sciences, vol. 44, no. 1, pp. 1–12, 2004. A.Krizhevsky, I. Sutskever, and G. E. Hinton, Imagenet Classification with Deep Convolutional Neural Networks, Advances in Neural Information Processing Systems, 2012. http://www.ijcttjournal.org Page 29