3.For every neuron 'i' in every layer, j = 1,2,...,M, from input to output layer, find the output from the neuron:

Size: px
Start display at page:

Download "3.For every neuron 'i' in every layer, j = 1,2,...,M, from input to output layer, find the output from the neuron:"

Transcription

1 Available online at International Journal of Innovative and Emerging Research in Engineering e-issn: p-issn: Learning-Based Fruit Disease Detection Using Image Processing Sherlin Varughese, Nayana Shinde, Swapnali Yadav and Jignesh Sisodia Information Technology Dept., Sardar Patel Institute of Technology, Andheri (W), Mumbai, India. ABSTRACT: Farmers find it difficult to detect and determine fruit disease and its cause. Also, fruits are more prone to infection during cultivation, due to changing environmental conditions and climate. The earlier process of detecting fruit disease was very time consuming and failed to give information about the type of disease. Using the proposed fruit disease detection system, the farmer can determine the type and cause of the disease, and get preventive measures and suggestions from the system. The apple fruit has been taken as a sample. Artificial Neural Network has been used to make the system learn, and classify and categorize the disease. This system will benefit farmers across India. Keywords: fruit, disease, segmentation, k-means, clustering, classification I. INTRODUCTION Fruits are vulnerable to infection during the course of their cultivation. The factors favoring such infection are often unknown to the farmers. This causes a major portion of the produce to be susceptible to infection, and in turn cause economic losses to the farmer. India produces apple fruit in considerable quantity. It is mostly grown in the states of Jammu & Kashmir, Himachal Pradesh, Uttaranchal, Arunachal Pradesh and Nagaland [1]. Out of all the deciduous fruits, apple is the most important in terms of production and extent. Apple scabs are gray or brown corky spots. Apple rot infections produce apparent circular brown or black spots which may often be overshadowed by a red faded ring. Apple blotch is a fungal disease and attacks the surface of the fruit by forming dark and irregular or wattle edges. We intend to develop a system which identifies such diseased fruits, and also determines its cause, effect and remedies for the ignorant farmers. The system can be used in the agricultural industry to identify the factors which favour the disease growth, and to find solutions to curb this growth. [4]The illiterate farmer can approach the agricultural officer, who will test his fruit image in the system and give information to the farmer to improve his produce. This system returns accurate results and lessens the losses incurred by the farmers. For this system we are considering the fruit apple. II. LITERATURE REVIEW Presently, work has been done more in the context of leaf diseases and less work has been done on fruits. In the existing system, input images are classified and mapped to their respective disease categories on the basis of three feature vectors namely, color, texture and morphology.[4] Leaf image is captured and processed to determine the health status of each plant. Then color identification and color image segmentation is done and the results are displayed in the form of histogram.[3] In Gavhale[2], image of citrus leaf is taken and color space conversion from RGB to YCbCr and L*a*b* color space is done. This is followed by k-means clustering to segment the region of interest and determine the defect and severity areas. Then classification is done using SVM.[2] Miller et al [6] compared different neural network models for detection of blemishes of various kinds of apples by their reflectance characteristics and concluded that multi-layer back propagation (MLBP) method gave the best recognition rates. Also they found that increased complexity of the neural network system did not yield to better results.[12] Leemans used a Bayesian classification method for pixel-wise segmentation on chromatic images of Jonagold apples. The method failed in discriminating between pixels of transition area and russet.[15] III. METHODOLOGY After obtaining the image of fruit as input, k-means clustering is performed on the image and it is segmented to obtain the region of interest and determine the extent of disease infection. Further, feed forward back-propagation algorithm is used to train the system for learning. The algorithms used are explained below: A. k-means algorithm (1) Read input image. Randomly select c cluster centers. 96

2 (2) Calculate the Euclidean distance between each data point and cluster centers using the formula: n d = (x i y i ) 2 i=1 (3) Transform image from RGB to L*a*b* color space. (4) Classify colors using K-Means clustering in 'a*b*' space. (5) Label each pixel in the image from the results of K-Means. (6) Generate images that segment the image by color. (7) Select disease containing segment. B. Back-propagation algorithm 1.Initialize connection weights into small random values. 2.Input the p th sample input vector of pattern X p = (X p1, X p2,..., X pn0) and the corresponding output T p = (T p1, T p2,..., T pnm) target to the network. 3.For every neuron 'i' in every layer, j = 1,2,...,M, from input to output layer, find the output from the neuron: N j 1 Y ji = f ( Y (j 1)k W jik ) k=1 where f(x) = 1 1+e x 4. Calculate error value δ ji for every neuron 'i' in every layer in backward order j = M, M-1,..., 2, 1, from output to input layer, followed by weight adjustments. For the output layer, the error value is: and for hidden layers: δ Mi = Y Mi (1 Y Mi )(T Pi Y Mi ) N j 1 δ ji = Y ji (1 Y ji ) δ (j+1)k W (j+1)ki k=1 5. The weight adjustment can be done for every connection from neuron 'k' in (i-1) layer to every neuron 'i' in every layer 'i': W + jik = Y jik + βδ ji Y ji 97

3 whereβ represents weight adjustment factor normalized between 0 and 1. IV. IMPLEMENTATION The proposed system takes into consideration all the limitations of the existing system to produce results which not only speak about the type of disease, but also the environmental factors favouring the infection. The system goes a step further and recommends remedies to lessen the occurrence of the disease. The system uses k-means clustering algorithm for classification of fruit as diseased or non-diseased. In addition, the system uses Artificial Neural Network for learning.[8] Two datasets are used for this purpose; one for training the system, and the other for testing. This enables the system to learn and return more accurate results with each epoch. Back-propagation algorithm is used for making the system learn. The system architecture is as shown below: Workflow: Step1: User will input the image. Step2: K-means based defect segmentation is used to detect the region of interest which is the infected part only in the image. Step3: The system will extract the feature from the segmented portion of the images that are being used for the training and store in a feature database. Step4: Then support vector machine with the features stored in the feature database. Step5: Finally input image will be classified into one of the classes using feature derived from segmented part of the input image and trained support vector machine. V. IMPLEMENTATION Image of diseased part of apple fruit is given as input to the system. Fig 1. Original image of diseased fruit On applying k-means clustering algorithm, the image is divided into 5 clusters as shown in the figure below: 98

4 Fig2. Clusters formed VI. CONCLUSION The problem of identifying the type of fruit disease in order to find ways and means to reduce its inflection has been identified in this paper. The proposed system detects the type of disease with greater accuracy due to the learning involved. After it has identified the type of disease, the system suggests ways and means to prevent the occurrence of the disease by taking into consideration the conducive environmental conditions and other relevant factors. This system helps farmers a lot by identifying the problem in the fruit at an earlier stage in cultivation, thus saving them the cost of wasted fruits. This saves the country from the otherwise huge economic losses incurred during export. ACKNOWLEDGMENT We extend our sincere gratitude to our mentor and project guide, Prof. Jignesh Sisodia, without whom this project would not have been possible. REFERENCES [1] Shiv Ram Dubey and Anand Singh Jalal, Detection and Classification of Apple Fruit Diseases using Complete Local Binary Patterns, Third International Conference on Computer and Communication Technology [2] Kiran R. Gavhale, Ujwalla Gawande and Kamal O. Hajari, Unhealthy Region of Citrus Leaf Detection Using Image Processing Techniques, International Conference for Convergence of Technology, [3] Zulkifli Bin Husin, Abdul Hallis Bin Abdul Aziz, Ali Yeon Bin Md Shakaff and Rohani Binti S Mohamed Farook, Feasibility Study on Plant Chili Disease Detection Using Image Processing Techniques, Third International Conference on Intelligent Systems Modelling and Simulation, [4] Monika Jhuria, Ashwani Kumar and Rushikesh Borse, Image Processing for Smart Farming: Detection of Disease and Fruit Grading, Proceedings of the 2013 IEEE Second International Conference on Image Information Processing (ICIIP-2013). [5] Devrim Unay, Bernard Gosselin, Apple Defect Detection and Quality Classification with MLP-Neural Networks [6] R. Sivamoorthi and Dr. N. Sujatha, A Novel Approach of Detection and Classification of Apple Fruit Based on Complete Local Binary Patterns, International Journal of Advanced Research in Computer Science and Software Engineering, April [7] Yatharth Saraf nd R. R. Mishra, Algorithms for Image Segmentation, thesis submitted at Birla Institute of Technology and Science, Pilani, May 4, [8] O. Kleynen, V. Leemans, and M. F. Destain, Development of a multi-spectral vision system for the detection of defects on apples, Journal of Food Engineering. [9] Vaqarjaved Khan, Nida Khan, Talha Momin and Irshad Chaudhary A Synopsis Report on Image Processing in Precision Agriculture. [10] Anup Vibhute and S K Bodhe, Applications of Image Processing in Agriculture: A Survey, International Journal of Computer Applications, [11] Cooperative Extension: Tree Fruits, The University of Maine [12] Miiler W. M., Pattern recognition models for spectral reflectance evaluation of apple blemishes, Postahrevst Bio.Tech,

5 [13] Tapas Kanungo, David. Mount, Nathan S. Netanyahu, Christine D. Piatko, Ruth Silverman and Angela Y. Wu An Efficient k-means Clustering Algorithm: Analysis and Implementation. [14] Kiyoshi Kawaguchi, Backpropagation Learning Algorithm. [15] Leemans V., Defect segmentation on Jonagold apples using color machine vision and Bayesian classification method,