1. Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
Date Fruit Classificationfor Robotic Harvesting inaNatural Environment
Using DeepLearning
In this paper author is describing concept to classify date fruit by modifying pre
classifier such as ‘VGG16 and Alexnet’, VGG16 and Alexnet are the already
developed model by using images from imagenet and we can customised this
pre classifier with our own images by using concept called Transfer Learning.
While using Transfer Learning we can make pre classifier to forget its last
prediction layer and then we can add our own images in that last layer. We are
building 3 different classifier to classify date fruit as type of fruit, fruit maturity
and fruit harvesting.
To classify date fruit we need to modify convolution neural network layer of
VGG16 and Alexnet and then we will add our own train images in that modified
CNN layer. After building model whenever we give new test image then
application will classify name or type of test image fruit, harvesting and
maturity of that fruit. We don’t have any camera so directly we will upload test
image to get its type, maturity and harvesting.
To build training model we downloaded date fruit dataset from below website
http://dx.doi.org/10.21227/x46j-sk98 and this dataset contains nearly 8000
images and author used high Configuration GPU and 28 GB RAM computer to
train all those images but our computers don’t support that much
configuration so I train VGG16 and Alexnet with few images and this train
model also giving satisfied classification results.
Convolution Neural Network Working Procedure
To demonstrate how to build a convolutional neural network based image
classifier, we shall build a 7 layer neural network that will identify and separate
one image from other. This network that we shall build is a very small network
that we can run on a CPU as well. Traditional neural networks that are very
good at doing image classification have many more parameters and take a lot of
time if trained on normal CPU. However, our objective is to show how to build
a real-world convolutional neural network using TENSORFLOW.
Neural Networks are essentially mathematical models to solve an optimization
problem. They are made of neurons, the basic computation unit of neural
networks. A neuron takes an input (say x), do some computation on it (say:
multiply it with a variable w and adds another variable b) to produce a value
(say; z= wx+b). This value is passed to a non-linear function called activation
function (f) to produce the final output(activation) of a neuron. There are many
2. Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
kinds of activation functions. One of the popular activation function is Sigmoid.
The neuron which uses sigmoid function as an activation function will be called
sigmoid neuron. Depending on the activation functions, neurons are named and
there are many kinds of them like RELU, TanH.
If you stack neurons in a single line, it’s called a layer; which is the next
building block of neural networks. See below image with layers
To predict image class multiple layers operate on each other to get best match
layer and this process continues till no more improvement left.
Alexnet and VGG16 both models are generated using above concept only.
Screen shots
To run project double click on ‘run.bat’ file to get below screen
3. Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
In above screen click on ‘Upload date Fruit Dataset’ button to upload all images
of Date Fruit Type.
In above screen uploading ‘type’ folder which contains all Date Fruit images,
now click on ‘Select Folder’ to load dataset
4. Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
After uploading dataset click on ‘Fine Tune & Transfer Learning with VGG16’
to modify VGG16 Model with our Date Fruit Images.
In above screen we can see VGG16 Model Generated and if you want you can
see all CNN details at black console like how many train images and layers it
has used
5. Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
In above screen we can see it used nearly 12,279,429 images to train VGG16
model and 3 models are generated for Date Type, maturity and harvesting.
Similarly click on ‘Fine Tune & Transfer Learning with Alexnet’ button to
generate Alexnet model.
In above screen we can see Alexnet model also generated and you can see all
details in black console. Now click on ‘Date Fruit Classification with 3
Classifiers’ button to upload test image and to classify Fruit details.
6. Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
In above screen I am uploading ‘4.jpg’ image and below are the classification
results.
In above screen we can see uploaded test image classified with date type as
‘Khalas’ and Maturity as ‘Pre-Tamar’ and Harvest as ‘KhalasasTamar’.
Similarly u can upload any test image and get classification details. All this test
images are inside ‘test’ folder. Now click on ‘VGG16 and Alexnet Accuracy
Graph’ button to get accuracy of both models.
7. Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
In above graph x-axis represents algorithm name and y-axis represents
accuracy. VGG16 give better accuracy compare to Alexnet