0% found this document useful (0 votes)
44 views8 pages

External Quality Grading of Apple Using Deep Learning: Nitika - Cse@cumail - in

This document summarizes research on classifying apples into grades using deep learning. The researchers used a dataset of apple images divided into 3 classes/grades and trained a DenseNet169 model. The model achieved 97% accuracy in classifying apples by grade based on color and shape features extracted from the images. Performance metrics like log loss, AUC, and Cohen's kappa score indicated high model performance. Future work could involve implementing the model for real-time apple grading using camera vision systems.

Uploaded by

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

External Quality Grading of Apple Using Deep Learning: Nitika - Cse@cumail - in

This document summarizes research on classifying apples into grades using deep learning. The researchers used a dataset of apple images divided into 3 classes/grades and trained a DenseNet169 model. The model achieved 97% accuracy in classifying apples by grade based on color and shape features extracted from the images. Performance metrics like log loss, AUC, and Cohen's kappa score indicated high model performance. Future work could involve implementing the model for real-time apple grading using camera vision systems.

Uploaded by

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

External Quality Grading of Apple using

Deep learning
Mukul Bedwa1
Research Scholar
Er. Nitika kapoor2
Assistant professor
Department of Computer Engineering
Chandigarh University
Gharuan, Mohali, India
[email protected]
[email protected]

Abstract
Apple grading is a very essential process in market right now. So in order to accelerate the process
we need to have automation. In this paper classification of apple is done on the basis of color and
shape. Firstly the images of apple are used with 3 grades. These images are then feeded into CNN
where the classification is done in the basis of color and shape. The results in this paper shows
classification accuracy rate of 97%.

Keywords: Gaussian noise, Data augmentation, CNN

1. Introduction
In 2019, India's total apple output production of 1915.3 thousand metric tons from an area of
311.4 thousand hectares was ranked as the fifth largest producer of apple in the world and produced
2.51 percent of the total apple produced in the world. India has very low advantage in the high-end or
advanced apple market. Taking this into consideration this topic is
Considered by many scholars. As we don’t have proper apple grading systems we are lacking in
export. Now with the improvement in computer performance and image processing techniques there
are many ways through which we can better the process of apple grading.
Now many agriculture products are automated with these techniques. These image classification
through computer have many advantages like flexibility, Reliability and Precision. It gives advantages
in the research of apple classification.
Apple grading is mainly done considering qualities like external and internal testing. External
parameters includes certain measures like external shape, color and signs of defects and in internal
quality testing some more parameters like hardness of apple, acidity and internal defects are analyzed.
Surface color and shape these are most considered basis for grading. Better appearance more likely
lead to sell at higher prices and attract more consumers.

2. Methodology and Implementation

2.1. Image processing: Image procession is very important step if we want to get optimal results. In
image processing we will do use Gaussian noise and data augmentation. This will make the feature
extraction task a lot easier. Gaussian noise is used as a regularization layer. Data augmentation is used
to increase the data by using functions like cropping, flipping etc.

2.2. Densenet Model Here Densenet169 is used. Densenet have several advantages over its siblings.
Reduced parameters and feature reuse are one the advantages. Apart from densenet169 several other
models are used like resnet and xception but only Densenet is able to produce promising results.

2.3. Activation functions Activation functions are required to determine the output of a Convolutional
neural network. It is used to map values between 0-1.
Various activation functions are tried but as it is a multiclass classification softmax is most
appropriate.

Total params: 66,631,235


Trainable params: 66,398,339
Non-trainable params: 232,896

2.4. Training Model Model is trained in this step by providing dataset. This model is trained to
provide 3 outputs in the last layer. Dataset is divide in 3 classes and two folders. Testing and training.
Now in input layer data is feeded into CNN model and then model is trained on the basis of data.

Parameters used for data training are ;-

Table 1. Training Parameters


Parameters value

Input shape 224


Batch size 11
Learning rate 11

Model is trained with a validation accuracy of 98%.

2.5. Predictions Now predictions are made on or trained model and various parameter are recorded to
validate our model.
We calculated log loss score, Accuracy, Cohen kappa score, Roc Auc score as mentioned below in the
table.

True Positive
Precision =
True posotive+ False poistive

True Positive
Recall =
True posotive+ False Negative
Figure 1. Performance Metrics

Support = this shows the number of images present in the class.

m
Log Loss = − ∑ y 0 ,C log ( p0 , C )
C=1
p0 − p e 1− p 0
Cohen_kappa = k ≡ =1−
1− pe 1−p e

Table 2. Performance Metrics


Performance Metrics Values

logloss_score 0.6779283836801001
roc_auc_score 0.9860680321713957
cohen_kappa_score 0.9616722844405785
Accuracy score 0.9744680851063829
Figure 2. Classification of BP Neural Network

This provide the accuracy of 94%. Below is the testing and training accuracy graph of our Densenet
model.

Figure 3. Model Accuracy

This graph shows the accuracy of 97% as overall accuracy and a validation accuracy of 98%.
This is a graph plot on model accuracy. As we can see the test accuracy is higher than training
accuracy is because of dropout. These dropouts leads to the creation of weak neurons.
These neurons show less accuracy while training but when they are used collectively in testing part
they work stronger this is called ensemble.
Figure 4. Accuracy Comparison

In predictions we can clearly see our model is performing better as accuracy of the model is at 97%
which is good and ROC_AUC score is also 0.98. This is improved score form the base paper with
accuracy of 94%.

Below is the flowchart is used to define the whole process.

Figure 3. Model Flow Chart

3. Dataset
Dataset used in this work is taken from Kaggle. Fruits-360 which contains pictures of different fruits
and their varieties and grades. We chose to work on the Apple fruit and extracted the Red apple data from
the dataset. Dataset is divides into three classes apple 1, apple 2, apple3.It contains two folders of training
and Testing. Each of these folder consist of 3 folders called grades. So we have dataset with more than
one class. So we performed multiclass classification on this dataset and trained or model to give results as
better as possible.

Number of Training examples: 1471


Number of Validation examples: 470

Figure 6. Dataset Images

4. Related work

Maoyong Nie [1] et al suggested a machine vision method for the purpose of grading with features
shape defect and color using BP neural network. By suing image processing features are extracted and
BP neural network is optimized by using Genetic algorithm.

Horea Muresan [2] et al classified fruits by preparing their own high quality dataset using
convolutional neural network. They used Convolutional neural network to classify fruits as this paper
suggest deep learning algorithm are always superior than machine learning algorithm

Dongmei Zhu et [3] all proposed a method for classification of different fruits using 10 layer neural
network IANet. Data augmentation is used for better classification.

Rashmi , Mukesh Kumar, and Rohini Saxena [4] studies various edge detection techniques. In this
paper Author compared different techniques used in the process of edge detection.

Mr. Sumit S. Telang, Prof. S.M.Shirsath [6] proposed method to manage quality of fruits using various
image processing techniques, paper proposes algorithm for evaluating different parameters used for
the sprting and grading of fruits.

Miss.Anuradha Gawande et al [7] in this paper author used machine learning and PC vision techniques
to evaluate quality of fruit.This paper focuses on the indetification of infected region and classify the
infected pattern.

Aifeng Ren et al [8] in this paper SVM classifier, decision tree and KNN algorithm is used for the
gauging of moisture content. The accuracy achieved is 95%.This paper proposed a way to use ML and
THz sensing for quality assessment of fruits.
Harpreet singh et al [9] in this paper author focuses on Machine learning and image processing
techniques for food analysis. Limitations and advantages are also discussed.

5. Conclusion and Future work

Apple grading is still a very challenging task while preparing apple boxes for selling. These techniques
are very import as these will help small scare farmers in grading their apples better and with less
time.in future these models can be used to get real-time image from camera vision and perform the
work with increased accuracy. In this paper we worked in the apple grading and we got the accuracy
of 97%. We used a densenet169 model as this model is dense and known to provide better results as
we compare with other models of deep learning. Multiclass classification is performed on the dataset
of apple images. In future this algorithm can be used in real-time to improve the efficiency of apple
grading work.

Refrences

[1] M. Nie, Q. Zhao, S. Bi, Y. Xu and T. Shen, "Apple External Quality Analysis Based on BP Neural
Network," 2019 1st International Conference on Industrial Artificial Intelligence (IAI), Shenyang,
China, 2019, pp. 1-5.

[2] H. Muresan, and M. Oltean. “Fruit recognition from images using deep learning”, Acta Univ.
Sapientiae, Informatica, vol. 10, no. 1, pp. 26-42, June, 2018.

[3] D. Zhu, M. Wang, Q. Zou, D. Shen and J. Luo, "Research on Fruit Category Classification Based
on Convolution Neural Network and Data Augmentation," 2019 IEEE 13th International Conference
on Anti-counterfeiting, Security, and Identification (ASID), Xiamen, China, 2019, pp. 46-50.

[4] Rashmi , Mukesh Kumar, and Rohini Saxena , Department of Electronics and Communication
Engineering Signal & Image Processing : An International Journal (SIPIJ) Vol.4, No.3, June 2013

[5] Abdalla Mohamed Hambal1, Dr. Zhijun Pei2, Faustini Libent Ishabailu3 Image Noise Reduction
and Filtering Techniques , International Journal of Science and Research (IJSR) ISSN (Online): 2319-
7064

[6] Mr. Sumit S. Telang1, Prof. S.M.Shirsath 2 Fruit Quality Management using Image Processing,
International Conference on Ideas, Impact and Innovation in Mechanical Engineering (ICIIIME 2017)

[7] Miss.Anuradha Gawande, Prof.S.S.Dhande, "Implementation of Fruits Grading and Sorting


System by Using Image Processing and Data Classifier" SSRG International Journal of Computer
Science and Engineering 2.6 (2015): 22-27.

[8] A. Ren et al., "Machine Learning Driven Approach Towards the Quality Assessment of Fresh
Fruits Using Non-Invasive Sensing," in IEEE Sensors Journal, vol. 20, no. 4, pp. 2075-2083, 15
Feb.15, 2020.
[9] H. Singh, C. Singh Rawat and D. Verma, "Image Processing Techniques for Analysing Food
Grains," 2019 3rd International Conference on Computing Methodologies and Communication
(ICCMC), Erode, India, 2019, pp. 1-4.

[10] Q. X. Lv, and J. H. Zhang. “Design of a fruit automatic classifification system based on neural
network”, Journal of Anhui Agri. Sci, vol. 35, no. 37, pp. 17392-17394, 2009.

[11] L. Wu, “Classifification of fruits using computer vision and a multiclass support vector machine”,
Sensors, vol. 12, no. 9, pp. 1248912505, December, 2012.

[12] A. Krizhevsky, I. Sutskever, and G. Hinton, “ImageNet classififica-tion with deep convolutional
neural networks”, International Conerence on Neural Inoration Processing Systens, vol. 25, no. 2, pp.
1097-1105, December, 2012.

[13] Sun J, Pang J, Zhang Z. Recognition of vehicle license plate locating based on color feature and
improved canny operator[J]. Journal of Jilin University, 2015, 53(4):693-697.

[14] Y. D. Zhang, Z. Dong, X. Chen, W. Jia, S. Du, and K. Muhammad, et al.“Image based fruit
category classifification by 13-layer deep convolutional neural network”, Multimedia Tools and
Applications,vol.78,no. 3, Feb, pp. 3613-3632, September, 2019

[15] T. Noi, Phan, and M. Kappas, “Comparison of random forest, knearest neighbor, and support
vector machine classifiers for land cover classification using Sentinel-2 imagery,” Sensors, vol. 18, no.
1, pp. 18, 2018.

[16] Suganya1, Vinodha2, Thilagavathi3, Pavithra4 A FRUIT QUALITY INSPECTION SYTEM


USING FASTER REGION CONVOLUTIONAL NEURAL NETWORK International Research
Journal of Engineering and Technology (IRJET) Volume: 06 Issue: 03 | Mar 2019.

You might also like