Potato Disease Classi Fication Using Convolution Neural Networks
Potato Disease Classi Fication Using Convolution Neural Networks
Potato Disease Classi Fication Using Convolution Neural Networks
Advances in Animal Biosciences: Precision Agriculture (ECPA) 2017, (2017), 8:2, pp 244–249 © The Animal Consortium 2017 animal
doi:10.1017/S2040470017001376 biosciences
Many plant diseases have distinct visual symptoms which can be used to identify and classify them correctly. This paper presents a
potato disease classification algorithm which leverages these distinct appearances and the recent advances in computer vision
made possible by deep learning. The algorithm uses a deep convolutional neural network training it to classify the tubers into five
classes, four diseases classes and a healthy potato class. The database of images used in this study, containing potatoes of
different shapes, sizes and diseases, was acquired, classified, and labelled manually by experts. The models were trained over
different train-test splits to better understand the amount of image data needed to apply deep learning for such
classification tasks.
Keywords: Plant disease detection and classification, Computer vision, Convolutional neural network, Potato diseases
244
Downloaded from https:/www.cambridge.org/core. Ben Gurion University of the Negev Library, on 12 Jul 2017 at 19:42:12, subject to the Cambridge Core terms of use, available at
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/S2040470017001376
Potato Disease Classification Using Convolution Neural Networks
Figure 1 Examples of visual symptoms on potato diseases: (a) Black Scurf disease - irregular, black, scab-like marks on the skin of the tuber. (b) Silver Scurf
disease - circular or irregular, tan to silvery gray lesions on the tuber’s skin. (c) Common Scab disease - circular brown rough areas, with irregular margins which
can coalesce into larger areas. (d) Black Dot disease - tiny black dots on the skin of the tuber (magnified in top left corner). (5) Uninfected tuber.
four different diseases, all with significant visual symptoms on and uninfected potatoes. As manually labelling diseased
the tuber’s skin (see Figure 1). The images were acquired using patches of potatoes is a tedious and time costly task,
multiple types of standard cameras, captured from one an important task was to determine the minimal amount of
viewpoint only. The cameras used were Sony DSC-T200, the training data that provides sufficient classification accuracy.
Apple iPhone 4 camera, and the Samsung Galaxy S3 camera. The CNN was trained with different sizes of training sets. The
smallest training set used for training was 10% of the 2,465
Data preparation images, incrementally increasing by 10% to 90% of the
The images acquired were used to create the training and tests whole dataset as detailed in Table 1. In each increment the
sets for the CNN. Every visual symptom of a disease was images were selected uniformly from the whole dataset.
marked and labelled using the image labeler application in Testing of the algorithm was done on the remaining data. In
MatLab 2014b. The labelling was done with rectangular total the training and testing phases was repeated 9 times
bounding boxes encompassing the visual symptom but also over different training set sizes.
much regular potato skin, as seen in Figure 2. The marked Each training set was trained for 90 epochs, where one epoch
areas were cropped from the original image, transformed into is defined as a one full training cycle on every sample in
grayscale, and resized to a standard 224 × 224 pixel square. the training set. The choice of limiting to 90 epochs was made
After preprocessing, a total of 2,465 patches of diseased based on empirical observations that revealed that the learning
potatoes was gathered including: 265 Black Dot patches, 469 converged well within 90 epochs (as can be seen in Figure 4).
Black Scurf patches, 686 Common Scab patches, 738 Silver In order to compare between the different results over the
Scurf patches and 307 uninfected patches. 9 training sets, the error rate of the best scoring guess was
calculated as the number of errors divided by the total number
Performance Measurement of test images in every epoch. The error was calculated both for
The experiment was designed to evaluate the performance of test and train sets, in order to understand the over\under fitting
the CNN’s learning algorithm in classifying four diseases of the procedure.
245
Downloaded from https:/www.cambridge.org/core. Ben Gurion University of the Negev Library, on 12 Jul 2017 at 19:42:12, subject to the Cambridge Core terms of use, available at
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/S2040470017001376
Oppenheim and Shani
Figure 2 Examples of diseased potato patches before and after the transformation to grayscale. (a)–(c), (g) and (h) are the original RGB images from each
class. (d)-(f), (i) and (j) are the same images after the conversion to grayscale, using Matlab’s rgb2gray function.
246
Downloaded from https:/www.cambridge.org/core. Ben Gurion University of the Negev Library, on 12 Jul 2017 at 19:42:12, subject to the Cambridge Core terms of use, available at
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/S2040470017001376
Potato Disease Classification Using Convolution Neural Networks
97
67
37
277
247
217
187
157
127 randomly to different sizes, while keeping the cropped image
minimum size to 190 × 190, can achieve data diversity. The use
of each data augmentation method was done randomly. Before
each image was inserted into the net for training it was mirrored,
# Black Dot
tested
73
146
219
292
365
438
511
584
657
81
665
592
519
446
373
300
227
154
68
136
204
272
340
408
476
544
612
307
74
46
92
138
184
230
276
322
368
414
265
55
423
377
331
285
239
193
147
101
738
10
20
30
40
50
60
70
80
90
686
%
90
80
70
60
50
40
30
20
10
469
%
247
Downloaded from https:/www.cambridge.org/core. Ben Gurion University of the Negev Library, on 12 Jul 2017 at 19:42:12, subject to the Cambridge Core terms of use, available at
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/S2040470017001376
Oppenheim and Shani
Figure 4 Results of the experiment. Top plot shows the accuracy of each training set (colored and dotted graphs) according to the epoch number. The
bottom plot show the smoothed results.
Table 2 Best performing model accuracy results for each train-test set
Train- Test Set Division 90%–10% 80%–20% 70%–30% 60%–40% 50%–50% 40%–60% 30%–70% 20%–80% 10%–90%
Accuracy 0.9585 0.9567 0.9465 0.9454 0.9069 0.9183 0.9041 0.9012 0.8321
class, for practical use these mistakes have less affect since from 83% for the model trained on the least amount of data,
planting infected tubers can spread the disease and cause to 96%, when the model was trained on 90% of the data.
considerable damage while misclassifying uninfected tubers To obtain classification rates higher than 90% it is sufficient
can be solved. In this experiment only 307 images of to use 20% of the images (i.e., 493 images).
uninfected tubers were used, increasing the amount of data These results further show that combining the CNN intro-
of uninfected tubers can increase classification accuracy. duced here with a sliding window algorithm could be utilized
for classifying full images of potatoes to different diseases
with little labelling work beforehand. Ongoing research is
Conclusions and future work aimed to develop a classification algorithm with an expanded
number of disease classes. Acquiring data can be done
The applicability of a convolution neural network in easily since there are no constraints on the data acquisition.
classifying image patches of diseased potatoes into four
disease classes and a uninfected class was examined.
The 2,465 images classified by the trained CNN model varied Acknowledgements
in the acquisition device and conditions. Results indicate This work is supported by the Ministry of Agriculture and
the robustness of the classification algorithm allowing partially supported by the Helmsley Charitable Trust through the
for uncontrolled acquisition conditions. Results reveal that Agricultural, Biological and Cognitive Robotics Initiative and the
the correct classification of fully trained CNN models ranges Rabbi W. Gunther Plaut Chair in Manufacturing Engineering,
248
Downloaded from https:/www.cambridge.org/core. Ben Gurion University of the Negev Library, on 12 Jul 2017 at 19:42:12, subject to the Cambridge Core terms of use, available at
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/S2040470017001376
Potato Disease Classification Using Convolution Neural Networks
249
Downloaded from https:/www.cambridge.org/core. Ben Gurion University of the Negev Library, on 12 Jul 2017 at 19:42:12, subject to the Cambridge Core terms of use, available at
https:/www.cambridge.org/core/terms. https://doi.org/10.1017/S2040470017001376