0% found this document useful (0 votes)
53 views5 pages

Tomato Plant Diseases Classification Using Deep Learning Based Classifier From Leaves Images

The document discusses classifying tomato plant diseases from leaf images using a deep learning classifier. A VGG16 CNN model is trained on a dataset containing images of healthy and diseased tomato plants across 10 classes. The model achieves 95.5% classification accuracy and nearly 100% accuracy at differentiating healthy from unhealthy plants without preprocessing.

Uploaded by

shadow.aronno
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views5 pages

Tomato Plant Diseases Classification Using Deep Learning Based Classifier From Leaves Images

The document discusses classifying tomato plant diseases from leaf images using a deep learning classifier. A VGG16 CNN model is trained on a dataset containing images of healthy and diseased tomato plants across 10 classes. The model achieves 95.5% classification accuracy and nearly 100% accuracy at differentiating healthy from unhealthy plants without preprocessing.

Uploaded by

shadow.aronno
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

2021 International Conference on Information and Communication Technology

for Sustainable Development (ICICT4SD), , Dhaka

Tomato Plant Diseases Classification Using Deep


Learning Based Classifier From Leaves Images
2021 International Conference on Information and Communication Technology for Sustainable Development (ICICT4SD) | 978-1-6654-1460-9/21/$31.00 ©2021 IEEE | DOI: 10.1109/ICICT4SD50815.2021.9396883

Abstract In most agricultural countries, farmers face a An automatic machine based on computer vision and
great loss every year due to diseases in crops. So, early image processing techniques which can detect unhealthy
detection of tomato plant diseases has achieved a great concern plants and classify the tomato diseases will be a great help to
of the researchers. In this paper a deep convolutional neural this extent. Visual examination of plants may lead to
network model is used to recognize unhealthy plants from the inaccurate prediction of diseases due to the lack of prior
healthy plants and to classify the tomato plant diseases. We knowledge. This misleads to apply inappropriate preventive
have used VGG16 deep cnn classifier to recognize unhealthy measures also. So if a machine can identify the unhealthy
plants and their diseases from the images of tomato plants. We tomato plants and detect which category of disease is that,
have used Plant Village dataset which contains ten different this paves the way to successfully nurture the remaining
classes of tomato leaf images including healthy plants. Using
crops with necessary measures to reduce the amount of loss.
transfer learning method in a pre-trained VGG16 model, this
dataset shows a satisfying classification performance which Recent researchers focus on texture features of defected
about 95.5%. Top 2 accuracy of this model reaches to 99% to tomato leaves. Since attack of diseases causes change to
recognize tomato plant diseases. Without using any color, shape, smoothness of the leaves, identifying unhealthy
segmentation or preprocessing of leaves images our trained tomato plants will be more successful using leaves. Vetal [1]
model shows a performance of approximately 100% to et al. proposed a multi class Support Vector Machine (SVM)
differentiate unhealthy plants from healthy plants. to recognize tomato plant diseases. They classified four
different tomato plant diseases where each class contained
Keywords Deep Convolutional Neural Network, Transfer
80 images to extract features and trained in multi class SVM
Learning, Tomato Disease.
classifier. They applied various pre-processing steps to
I. INTRODUCTION achieve better classification performance. Images were
converted from grayscale to HSI form to extract texture
In Bangladesh most of the people depends on farming, features well. They applied median filters to reduce noise
agricultural products for livelihood. Due to atmospheric and kurtosis filter to smoothen the images. Segmentation of
condition in this area tomato has become an important crop the defected parts of leaf images were done on the basis of
and part of our economy. Early detection of these diseases color. All these pre-processing steps prepared the dataset to
may help them to take preventive measures and reduce their extract features to be trained in SVM. They compared their
loss. Tomato crop is important for its high market demand classification performance with Artificial Neural Network,
and nutritious value. Tomato has gained concern because of K Nearest Neighbor and Probabilistic Neural Network etc.
its taste and nutritious values. Tomato is rich in Vitamin E, and achieved classification accuracy of 93% to recognize
Vitamin C and Beta Carotene. These antioxidants are very four different tomato plant diseases.
essential
susceptible to pests and insects which causes different Budihal [2] et al. proposed two different techniques to detect
diseases in tomato plants. Manual identification of tomato spot disease and fungus detection in tomato plants. To detect
plant diseases requires prior knowledge about that diseases. spots in binary images, leaf veins degraded the performance.
The limitation behind this identification is that all symptoms For this reason they transformed RGB images into HSI images
of tomato plant diseases may not be known to all. Every which minimized the noise due to the existence of leaf veins.
year farmers have to struggle with much difficulties to They applied otsu threshold to detect spots effectively from
produce healthy crops. Due to attack of pests and insects, the damaged area of leaves. They focused on I value (intensity of
production line falls below their determination which causes light amplitude) of HSI form to apply threshold value. To
a great threat to our economy and especially to our farmers. detect fungus attack in tomato leaves, some parameters were
Though farmers use many insecticides and pesticides to measured to check the intensity of the fungus attack. Total area
prevent tomato plant diseases, most often they become fail
to protect because of their ignorance about the disease and diseased area of leaf were measured. Fungus position was also
preventive measures. Again excessive use of insecticides detected using segmentation approach. The main limitation to
and pesticides is harmful to our life and existence. this work was this technique could determine only spot or
Misinterpretation of diseases and applying over dosages or fungus attack. This technique classified other leaves beyond
under dosages of insecticides also is also liable for crop spot and fungus attack as healthy leaves whether they had any
damage. So it is very important and mandatory to recognize other diseases or not.
Prajwala [3] et al. proposed to use a deep convolutional neural
But farmers lack in experts who will monitor the plants,
network as a classifier to recognize tomato plant diseases. They
recognize diseases and take preventive measures like putting
used LeNet model consisted of simple convolution layers,
a specific dosages of insecticides etc. Rather monitoring the
pooling layers and fully connected layers. In pre-processing
plants frequently and manual identification of tomato
step, they resized the training images for next training process.
diseases is very time consuming and tiring task. Again
iques on train and
sometimes farmers find it hard to go to experts in distant
test dataset. They showed 94% classification accuracy in
places and taking measures against uncommon diseases.
classifying tomato plant diseases.

82
Authorized licensed use limited to: Charles Darwin University. Downloaded on October 05,2023 at 12:25:39 UTC from IEEE Xplore. Restrictions apply.
Alvaro [4] et al. proposed a three unit tomato disease B. VGG16 Architecture
recognition process for false positive samples and class VGG16 is a deep learning algorithm based classifier
unbalanced data. They mentioned a Refinement Filter Bank which has 16 convolutional layers in its network. Simonyan
Framework where Faster RCNN was used to detect affected [5] et al. proposed this deep CNN model which made the
area with bounding box prediction. Each bounding box improvement over AlexNet model. The improvement was
contained a prediction about the location of infected area and done on the basis of changing type of convolution filters.
confidence score to which class the disease belonged to. The Instead of using kernel size convolution filters like 11×11 or
second unit was CNN filter bank which was used to verify the 5×5, VGG16 uses multiple numbers smaller convolution
classification task where the samples were truly classified or
filter like 3×3. Using smaller kernel stack filters increases
not. And finally the last integration unit separated the false
the capability to learn complex feature from training data.
positive samples. This algorithm achieved a good classification
VGG16 receives fixed size 224×224 images for training the
performance but the complexity of CNN Filter Bank slowed
down the recognition process. network. The model performs convolution using multiple 3×3
filters which is followed by a convolution of 1×1 filters to
We have proposed to use a deep CNN pre-trained model make the input feature linear. The model fixes the stride value
to classify tomato plant diseases where no noise reduction to 1 and add spatial padding to the intermediate output to keep
technique or noise filtering process is required and the the spatial resolution same as input data. Max pooling layers
classification performance is almost 100% to detect work with a stride of 2. All these output features are mapped to
unhealthy plants. fully connected layers. Since we have proposed to follow a
II. METHODOLGY transfer learning approach, our tomato disease recognition task
relevant data are used to train a pre-trained VGG16 model. As
A. Deep Convolutional Neural Network we want to classify 10 different classes, the output of the fully
Deep Convolutional Neural Network (DCNN) is a connected layers are mapped to these 10 different classes. This
classifier based on deep learning. A deep CNN takes images as is called fine tuning the model. The lower layers in a deep CNN
input and fixes weights and biases depending on various objects model learns low level features which are not specific and
so that the model can recognize those classes. This classifier problem dependent. Rather we train the deeper layers with our
shows difference on that point that it quires very less pre- work dataset as higher layers learns more specific and problem
processing of images than other classifiers. A deep CNN dependent features. We freeze the initial layers so that these
usually has the ability to learn and train features in the model. layers initializes weights from the previous pre-trained
A convolutional neural network extracts both spatial and knowledge. Freezing the initial layers also reduces the chance
temporal details of images. CNN performs linear calculation to of overfitting the model. Initializing improper weights during
multiply the input image values with bias and weights. A CNN training time leads the model to perform poor or lacks in
applies a number of filters on the input images and the filtered showing a generalized model on unseen data. Using a pre-
values are passed into an activation function. After applying trained model, this problem can be solved by initializing
multiple convolution filters at a fixed number of epochs during weights from the pre-trained model. Finally the augmented data
training the model, all results create a map of activation. This is is prepared to train the tuned model and the trained model will
called feature map which actually differentiate among various recognize different tomato plant diseases.
classes to be recognized. All these extracted features are passed
through a nonlinear activation function Relu in the fully
connected layer. A fully connected layer converts the output in
a one dimensional vector which is mapped to the number of
classes to be classified. Another part of convolutional neural
network is a pooling layer. Pooling layer reduces the size of
convolved features which minimizes the computational costs.
Since convolution into deeper layers produces more parameters
to be trained, a reduction in learnable features helps the network
to extract dominant features from the feature map. A CNN C. Dataset

Multiple convolution filters of multiple dimension like 3×3 or


5×5 etc. are applied on the input images. Besides convolution
filters are applied on multiple channels of given images (RGB
images have three color channels). Convolution filters are not
only applied on input image or raw pixels. These filters works
on the internal (a) Target Spot (b) Yellow leaf (c) Mosaic Virus (d) Bacterial Spot
layers, convolution filters extract more specific features to
learn. In the initial layers, convolution filters may recognize
line, edges, color, gradient values etc. low level features.
During the training process the model learns complex features

convolutional neural network work as a good classifier


differentiating the complex features and inter class similarities
(e) Early Blight (f) Leaf Mold (g) Late Blight
of data.

83
Authorized licensed use limited to: Charles Darwin University. Downloaded on October 05,2023 at 12:25:39 UTC from IEEE Xplore. Restrictions apply.
(h) Septoria Leaf spot (i) Spider Mites (j) Healthy Leaf
Fig. 1. Different types of Tomate diseased leaf and healthy leaf

We have used the ten different classes tomato leaf images


from Plant Village dataset. Each class contains various number
of images from 1500 to 3000. To make this imbalanced dataset
balanced we have used data augmentation technique. We have
augmented and increased required number of sample data per Fig. 3. Training VS Validation Loss of VGG16
class as required to make this dataset balanced. Contrast increases the ability to classify unseen samples. Dropout
changing of the sample data is used to augment data. The ten
classes to be recognized through our work are: a) Target Spot some important features are trained. Dropout layer prevents
,b) Yellow leaf, c) Mosaic Virus , d) Bacterial Spot, e) Early the model from overfitting. Validation accuracy and training
Blight, f) Leaf Mold, g) Late Blight, h) Septoria Leaf spot, i) accuracy determine whether the model is getting generalized
Spider Mites and j) Healthy Leaf. or not. In fig.2 validation accuracy is higher than training
accuracy for the model. Training accuracy determines how
III. EXPERIMENTAL RESULT well the model can recognize the training samples after
We have used a pre-trained VGG16 model to classify current epoch of training. After that the model classifies the
different diseases of tomato leaves. To achieve a generalized validation set based on the training step. Higher validation
model we have used hold out cross validation to create a accuracy than training accuracy notifies the model not to get
partition among training, validation and test data. 60% of the overfited. From fig.3 it is determined that with the
total data is used for training, 20% data is used for checking increasing number epochs of training, both training and
validation accuracy and the remaining 20% belongs to the validation loss decreases. Validation loss is always less than
test set. Since we have used transfer learning approach, the training loss for this model. From fig.4 we can see how the
model gets initialized with the previous training weights, model performs to do this classification task. This trained
and during the training process these weights get updated classifier shows classification performance on the test set
with the learnt features depending on the specific task. approximately 95.5
shows an accuracy below 90%. Most of the test samples are
Model : VGG16 in diagonal position which indicates that the model predicts
the same class on which they belongs to actually. Due to
Input Image Size: 224×224
having both yellow shades like yellow leaf and brown spots
Optimizer: Adam like bacterial spot, septoria leaf spot disease conflicts more
Learning rate: 0.0001 with other class and causes a degradation to classification
Dropout: 0.05 accuracy. Mosaic virus is recognized with 100% recognition
No of Classes: 10 accuracy. This model can successfully differentiate healthy
During training time, learning rate indicates how quickly the leaves among the other leaves with an accuracy upto 98%.
model will converge to a fixed training and validation accuracy. So the model performs well on unseen samples to detect
If the value of learning rate is so high, the model gets saturated unhealthy plants and recognize the disease as well.
at early stage of training. Dropout causes to reduce number of
parameters to be trained. To achieve a generalized model, we
need to classify tomato diseases correctly on unseen samples
beyond the training set. Dropout layer deducts some percentage
of learnable features which will increase the capability to learn
complex features well and

Fig. 2. Training VS Validation Accuracy of VGG16 Fig. 4. Confusion Matrix for Classification Task

84
Authorized licensed use limited to: Charles Darwin University. Downloaded on October 05,2023 at 12:25:39 UTC from IEEE Xplore. Restrictions apply.
model can successfully distinguish between healthy and
unhealthy plants with an accuracy 100% (approximately).

(a) Yellow leaf (b) Target Spot (c) Misclassified


Fig. 5. Precision And Recall for Tomato disease classification

(e) Early Blight (f) Late Blight (g) Misclassified


Fig. 7. Some examples of misclassified test data.

In fig.7 (c) is misclassified by the model predicting it as yellow


leaf for curl virus. This sample is actually Septorial leaf spot
affected leaf. In another sample a septoria leaf spot is also
misclassified by predicting it as a target spot affected leaf.
Since yellow leaf is dominant with yellow shade within the leaf
and target spot having brown dark spots at particular affected
area, both these two symptoms are seen in septoria leaf spot.
This increases the misclassification rate for Septoria leaf spot.
Besides (g) is a sample of leaf mold disease which is errorly
predicted as early blight or late blight in some test data. In early
blight, late blight and leaf mold classes, reshaping or
deformation of leaf shape occurs. This also causes to some
misclassification. Our trained VGG16 model performs much
better than other classifiers without any preprocessing steps.
This model successfully recognize tomato plant diseases
instead of having many noisy data and inter class similarities
among different classes.
Fig. 6. Comparison Among the related works with VGG16
IV. CONCLUSION
In fig.5 precision and recall per class are measured on the test In most agricultural countries farmers face difficulties to
data. The model shows a good classification result with an provide preventive measures in case of fungus or bacterial
average precision value 95.6% and average recall value 95%. attack on crops or other diseases. If they are provided with
In table I, from top-1 to top-5 accuracy is given for the model. required diagnosis system, a large amount of yearly loss in
Top-n accuracy means the actual class label has a confidence agriculture will be reduced. We have trained a deep CNN
score which is included in top nth accuracy in a sorted model to recognize unhealthy tomato plants and to classify
confidence score. Depending on the test accuracy of this the specific disease. Visual observation to recognize
model over plant village dataset, Top-2 accuracy reaches to diseases may mislead due to lacking in prior knowledge. A
99% which is very promising in detection of tomato diseases. trained classifier will help the farmers to solve this. Having
Since this recognition task will privilege the farmers to so much inter class similarities leads the classification task a
determine correct insecticide or pesticide for the crop, an difficult one. Using transfer learning technique in VGG16,
estimation of correct disease will be also helpful to them. In we have found a trained model to classify tomato plant
case of error prediction of any disease, a farmer will be helpful diseases with a satisfactory performance.
if he is informed about the nearest (depending on confidence
Acknowledgement
score) predicted disease. In table I, Top-2 accuracy has
This paper is partially funded by Green University of
achieved an accuracy nearly 100% in case of binary
Bangladesh.
classification whether the plant is healthy or not. In Fig. 6. We
have compared our model with the other works. VGG 16
performs better than all these previous works. Our trained

85
Authorized licensed use limited to: Charles Darwin University. Downloaded on October 05,2023 at 12:25:39 UTC from IEEE Xplore. Restrictions apply.
REFERENCES
S.
Processing
Communication Engineering, Vol. 6, Issue 6, June 2017.
S. Budihal, Sandhya, S. D Hajawagol, S. R.

Computer Engineering and Communication Technology (IJACECT),


ISSN (Print): 2278-5140, Volume-4, Issue-1, 2015.

P. TM, A. Pranathi, K. S. Ashritha, N. B. Chittaragi, S. G.


Using Convolutional

Conference on Contemporary Computing (IC3), 2-4 August, 2018,


Noida, India.
A. F. Fuentes , S. Yoon, J. Lee and D. S.
Deep Neural Network Based Tomato Plant
Diseases And Pest
Science, Volume 9, Article 1162, August
2018 .
K. Simonyan, A. Zisserman Very deep convolutional networks for
ational Conference on Learning
Representations (ICLR), 2015.
K.

Recognition, 2016.

inception
Vision and Pattern Recognition (CVPR), 2016.
-v4, Inception-
ResNet and the
Computer Vision and Pattern Recognition (CVPR),
2016.

Pattern Recognition (CVPR), 2017.


neural network
for
Conference on Computer and Information Technology, 2015.

gic and Intelligent


Systems Vol. 17, No. 1, 2017.
J. Amara, B. Bouaziz, A. -
based
BTW (Workshops). 2017, pp. 79 88.
U. -based detection of tomato
. Springer, 2015, pp. 641 652.
C.

S. P Mohanty, D. P Hughes, and M.


for image-based plant disease
(2016), p. 1419

86
Authorized licensed use limited to: Charles Darwin University. Downloaded on October 05,2023 at 12:25:39 UTC from IEEE Xplore. Restrictions apply.

You might also like