You are on page 1of 5

Proceedings of the Third International Conference on Electronics Communication and Aerospace Technology [ICECA 2019]

IEEE Conference Record # 45616; IEEE Xplore ISBN: 978-1-7281-0167-5

Fruit Recognition and Grade of Disease Detection


using Inception V3 Model
Nikhitha M, Roopa Sri S, Uma Maheswari B
Department of Computer Science and Engineering
Amrita School of Engineering, Bengaluru,
Amrita Vishwa Vidyapeetham, India
nikhithareddymaveli1998@gmail.com, roopasingam1997@gmail.com, b_uma@blr.amrita.edu
are very popular and useful for image classification and
identification of fruits respectively. This work is done based on
the color, size, and shape of the fruit. To detect the infections in
Abstract— In India, crop yield is declined due to the post fruits, convolutional neural networks techniques are used as
recognition of diseases in fruits/vegetables by the farmers. per size and color. For computer technology, this model is
Farmers face great economic loss worldwide. Diseases in fruits
using a convolutional neural network used for classify the
and plants are the main reasons for the agricultural loss.
Knowing the health status of fruits/vegetables helps farmers to images and object recognition. A convolutional neural
improve their productivity. This motivates us to design and network works on image, sound and text analytics.
develop a tool to help farmers detect the diseases in the early TensorFlow is an open source artificial intelligence developed
stage itself. This work focuses on developing a user-friendly tool by Google. It helps the developers to create a neural network
which recognizes the level of the disease and grades them which can have many layers in it. TensorFlow is mostly used
accordingly. Inception model uses convolutional neural networks for classification, predication and so on.
for the classification, which is again retrained using transfer
learning technique. The proposed system also grades the fruit Section II describes the related work section III explains
based on the percentage of infection. The system is developed in the classification of fruits, section IV describes the experiment
Tensor flow platform. For the proposed work banana, apple and and the results obtained and section V concludes the paper
cherry fruits have been considered.
with possible future research directions.
Keywords—Fruit disease; image processing; TensorFlow;
disease detection. II. RELATED WORK
This section describes the work carried out by the
I. INTRODUCTION researchers in the classification of objects and defect detection
arena.
There are around 2000 types of fruits present in the world
Chandini et al. [17] propose hardware to detect the quality
and each species of fruits will be around 3 to 4 lakhs. Apple,
of the fruits. In this paper, they have classified the fruits in low
mango and orange are more likely consumed by Indians. India
and high based on the quality of fruits. The hardware it uses is
is the second largest country in the production of fruits in the
raspberry pi on the MATLAB software.
world. According to the National Horticulture Board. India
Xiaolong Xia et al. [1] propose a technique for classifying
produced 90.2 million metric tons of fruits in 2015-2016. The
the flowers by considering their color, contour, and texture.
fruits should be inedible stage and it requires proper
Inception model and transfer learning are applied for the
maintenance. Care should be taken that the diseased fruits
flower classification and retraining their image datasets. Jhuria
should be recognized in earlier stages rather than detecting
et al. [13] using image processing techniques. In this color and
them later in the final stage to avoid the infections spreading to
texture are used for disease detection. They have used two
other fruits that are positioned nearby in the cold storage. As
types of datasets one is the training of images and another one
fruits are purchased by the sellers from the farmers in bulk
is testing images. For the adjustment of the weight in training
amount it is difficult for them to check each fruit manually
images, they used the back propagation.
whether it is in good quality or not.
The authors Barbedo et al. [6] proposed a model for
This work focuses on fruit identification and after detecting, qualifying and classifying the plant diseases using
identifying the fruit the proposed tool also grades the fruit image processing technique. However, the drawback of the
depending on the level of infection. Our proposed system model is the object should be displayed only in either black or
helps the buyers to pick the good quality fruits from assorted white background. A technique for apple fruit identification is
fruits. Thus the objective of the proposed work is to help the suggested by Dubey et al. [7] using local binary patterns and
buyers to select the best fruits from the farmers without multiclass Support Machine Vector(SVM) Disease detection
wasting their time. and fruit. Kim DaeGwan et al. [5] worked on the classification
of grape peel fruit diseases. The authors primarily focus on the
Digital image processing and Neural Network techniques
978-1-7281-0167-5/19/$31.00 ©2019 IEEE 1040
Proceedings of the Third International Conference on Electronics Communication and Aerospace Technology [ICECA 2019]
IEEE Conference Record # 45616; IEEE Xplore ISBN: 978-1-7281-0167-5

detection of citrus peel diseases by using color texture features The Inception display is very equipped for extricating
such as Hue, Saturation, and Intensity and obtained 96.7 helpful data from an image. So, we can rather prepare the
percentage accuracy. Inception model utilizing another informational collection. It
takes half a month for a costly PC to completely prepare the
III. CONSTRUCTION OF FRUIT CLASSIFICATION MODEL Inception so that it can demonstrate another informational
This model is working in many stages and consists of collection. We can rather re-utilize the pre-prepared Inception
Inception v3 model, Image preprocessing and Transfer model and only displace the layer that does the last grouping.
Learning techniques. Fig. 1 shows the high-level architecture This is called Transfer Learning. In Transfer learning, there is
and the flow of the working model. no need for removing or changing the lower layers of the
inception model only outer layers is sufficient.

IV. IMPLEMANTATION AND RESULTS


The proposed system consists of three steps such as
∙ Dataset collection
∙ Training the model
∙ Results
Fig. 1.
Proposed model Inception v3 model is mostly used in image A. Data Collection
recognition and it is a predefined convolutional neural In this model, images are required for the training of the
network. It contains totally 28 layers. Inception already has a model. For better accuracy, it requires a large data set. For this
dataset called model, the dataset is taken from the fruits classification dataset
ImageNet which contains the 1000 different object categories from the GitHub. This dataset contains the following:
and it gives an accuracy of 78.1 percent. So the Inception v3 ∙ The training set of 522262 images
model is used in this architecture. Inception v3 model is ∙ Testing set of 17540 images
downloaded and used in the architecture. Fig. 2 shows the The total no. of types of fruits considered are 101
working flow of an Inception model.
Fig. 3 shows some of the training data images
The proposed work captures the fruit’s image and resizes
the images into 299x299x3 which is a feed into the inception
v3 model as an input. it is using the Inception model which has
the flexibility of preprocessing. The image can be
preprocessed in a range of moderate to complex. The complex
preprocessing it requires a large set of expensive hardware
which is a not required for this model so moderate
preprocessing is used. In this moderate preprocessing it does
the cropping and the resizing of an image. It resizes to the
299x299x3 which the standard image size in inception v3
model.

Fig. 3. Sample training images.


Fig.
2. the working flow of an Inception v3 model (Source: B. Training the Inception Model
https://cloud.google.com/tpu/docs/inception-v3-advanced) In this stage loading of the data set is done. As the
experiment is done on the inception model there is a need to
change the outer two layers. In this experiment, the changes Takes a sample of fruits like apple, banana, and cherry which
are done on the bottleneck layer. On the bottleneck layer, it are found in nearby stores. It shows the percent of confidence
stores the cache values of each training images, so that the saying that it belongs to a particular fruit. In this classification,
time of validation stage it would show the output fast. it not only classifies a single fruit but can also classify multiple
fruits. For calculating the percent of disease identification in
C. Results this model fruit has been classified into four grades they are A,
In this experiment, the results are shown in the two ways 1. B, C and D. The grade A says the given
Classification of fruits 2. Percent of disease identification.

978-1-7281-0167-5/19/$31.00 ©2019 IEEE 1041


Proceedings of the Third International Conference on Electronics Communication and Aerospace Technology [ICECA 2019]
IEEE Conference Record # 45616; IEEE Xplore ISBN: 978-1-7281-0167-5

image is generally excellent for eating, grade B says that a


little piece of the fruit is ruined, grade C says the half of the
fruit is ruined and D indicates that the fruit is totally spoiled
and isn't consumable. Grade A varies from 0 to 25 percent, the
grade B varies from25 to 50 percent, the grade C varies from Fig. 8. Result of the fruit classification for the input image shown in
Fig. 7
the 50 to 75 percent and the grade D varies from the 75 to 100
Fig. 9 shows the given input image of the cherry and Fig. 10
percent.
result of the given image it shows that the model is 90 percent
In this experiment validation steps are done in 500 times
confident that it is cherry.
which gives an accuracy of 100% which is shown in Fig. 4.

Fig. 4.
Validation and accuracy.
Fig. 9. Input Image of the model-cherry
Fig. 5 is the given input image and Fig. 6 result of the given
image it shows that the model is 90 percent confident that it is
apple.

Fig. 10 .Result of the fruit classification for the input image shown in
Fig. 9

For the multiple fruits present in an image, it recognizes


each fruit present in the image. Fig. 11 shows the multiple
Fig. 5. Input image for the model
fruits in an image. Fig. 12 says the Result of multiple fruits
image and it shows the confidence of 51 percent that image
contains banana.

Fig. 6. Result of the fruit classification for the input image shown in
Fig. 5

Fig. 7 is the given input image of the banana and Fig. 8 result Fig. 11. Input Image of the multiple fruits
of the given image it shows that the model is 99 percent
confident that it is banana

Fig 12. Result of the multiple fruit classification

Fig. 13 and Fig. 15 are the images that are taken from the
phone for testing it works in any camera. Fig. 14 shows that
Fig. 7. Input Image of the model-Banana.
Fig. 13 is 81 percent apple. Fig. 16 shows that Fig. 15 is 95
percent confident that it belongs to banana.

Fig. 14. Result of the Fig. 13

Fig. 13. Input Image taken from Phone

978-1-7281-0167-5/19/$31.00 ©2019 IEEE 1042


Proceedings of the Third International Conference on Electronics Communication and Aerospace Technology [ICECA 2019]
IEEE Conference Record # 45616; IEEE Xplore ISBN: 978-1-7281-0167-5

REFERENCES

[1] Xiaoling Xia, Cui Xu, and Bing Nan, "Inception-v3 for flower
classification," 2017 2nd International Conference on Image, Vision,
Fig 15. Input image taken from the phone. fruit is affected and recognize the fruit in the given image. This
feature is very useful for the farmers and useful for different
purposes. To get better results in the classification and
identification of fruit diseases Inception v3 model and Transfer
Learning are used. We can also add some more features to
model so that the fusion of image processing and deep neural
Fig 16: Result of the fruit classification for Fig. 15
network not only useful for the fruit disease detection but also
Fig. 17 shows the input image that is considered for useful detecting diseases in vegetables and plants and
calculating the percent of disease identification in the image completely helpful for the agricultural industry.
and Fig. 18 shows the result of Fig. 16 and it shows that it and Computing (ICIVC), Chengdu, pp. 783-787, 2017.
belongs to grade A and the 9.8 percentage of the fruit is [2] Krizhevsky, Alex, Ilya Sutskever, and Geoffrey E. Hinton, "Imagenet
classification with deep convolutional neural networks," Advances in
affected states that the fruit is excellent for eating. neural information processing systems, pp. 1097-1105, 2012.
[3] Szegedy, Christian, et al. "Rethinking the inception architecture for
computer vision." Proceedings of the IEEE conference on computer
vision and pattern recognition, pp. 2818-2826, 2016.
[4] Zhu, Yin, et al. "Heterogeneous transfer learning for image classification,"
Twenty-Fifth AAAI Conference on Artificial Intelligence, 2011.
[5] Kim, DaeGwan, et al. "Classification of grapefruit peel diseases using
color texture feature analysis." International journal of agricultural and
biological engineering, vol. 2, no. 3, pp. 41-50, 2009.
Fig 17. Input image of the Grade of disease identification [6] Barbedo and Jayme Garcia Arnal, "Digital image processing techniques
for detecting, quantifying and classifying plant diseases." SpringerPlus,
vol. 2, pp.660, 2013.
[7] Dubey, Shiv Ram, and Anand Singh Jalal, "Detection and classification of
apple fruit diseases using complete local binary patterns." 2012 Third
International Conference on Computer and Communication Technology,
pp. 346-351, 2012.
[8] Dubey, Shiv Ram, and Anand Singh Jalal, "Apple disease classification
using color, texture and shape features from images," Signal, Image and
Video Processing. vol. 10, no. 5, pp. 819-826, 2016.
[9] Egmont-Petersen, Michael, Dick de Ridder, and Heinz Handels, "Image
processing with neural networks—a review," Pattern Recognition,
vol.35, no. 10, pp. 2279-2301, 2002.
[10] Lee, Chen-Yu, et al. "Deeply-supervised nets" Artificial Intelligence and
Statistics, pp.562-570, 2015.
[11] Long, Jonathan, Evan Shelhamer, and Trevor Darrell, "Fully
convolutional networks for semantic segmentation," Proceedings of the
Fig 18. Result of the Percent of the disease identification IEEE conference on computer vision and pattern recognition, pp.3431-
3440, 2015.
V. CONCLUSION [12] Shahin, M. A., et al. "Apple classification based on surface bruises using
image processing and neural networks." Transactions of the ASAE, vol
In this paper, it is proposed to find how much percent the 45, no. 5, pp.1619, 2002.
[13] Jhuria, Monika, Ashwani Kumar, and RushikeshBorse, "Image TensorFlow," XRDS: Crossroads, The ACM Magazine for Studen, vol.
processing for smart farming: Detection of disease and fruit grading." 22, no. 4, pp. 56-58, 2016.
2013 IEEE Second International Conference on Image Information [17] A. A. Chandini and Uma Maheswari B, "Improved Quality Detection
Processing (ICIIP-2013), pp. 521-526, 2013. Technique for Fruits Using GLCM and MultiClass SVM," 2018
[14] Psichogios, Dimitris C., and Lyle H. Ungar, "SVD-NET: An algorithm International Conference on Advances in Computing, Communications
that automatically selects network structure." IEEE Transactions on and Informatics (ICACCI), Bangalore, pp. 150-155, 2018.
Neural Networks, vol. 5, no. 3, pp. 513-515, 1994. [18] S. Krishnan and S. Padmavathi, "Feature ranking procedure for automatic
[15] Sutskever, Ilya, et al. "On the importance of initialization and momentum feature extraction," 2016 International Conference on Signal Processing,
in deep learning," International conference on machine learning, Communication, Power and Embedded System (SCOPES),
pp.1139-1147, 2013. Paralakhemundi, 2016, pp. 1613-1617..
[16] A. Saxena, "Convolutional neural networks: an illustration in

978-1-7281-0167-5/19/$31.00 ©2019 IEEE 1043

You might also like