Neural Network Project Report.
Neural Network Project Report.
Neural Network Project Report.
Matlab
Group Members:
Ashutosh Lembhe(18BEE1025),
Mayank Raje(18BEE1082), Siva Kumar(18BEE1019),
Adarsh Menon(18BEE1041)
1. Objective.
4. Applications.
5.Summary.
Objective:
The aim of the project is to:
1. Image classification based on input.
2. To implement a Neural network in Matlab and train it for
maximum accuracy.
3. To compare the Neural network accuracy with a pre-
trained neural network.
Code/Block Diagram:
Part 1 (Building and training a CNN)
a. Code Explanation.
i. We build an ImageDatastore consisting of 12 folders (corresponding to the 12
categories of different flower dataset) with images of each flower. We have
taken the flowers dataset because it has a good amount of photos on each
flower to train the neural network.
ii. Case 1: Splitting dataset into training (70%) and testing (30%).
iii. We create an augmentedImageDatastore to handle image resizing, specifying
the training images and the size of output images, which must be compatible
with the size expected by the input layer of the neural network..
Final Matlab Code.
b. Block Diagram.
Training of neural network after 80% training data set and testing only 20%.
See the 12th line of the Matlab code the training dataset has been changed to 80%
After training the accuracy has increased to 60% which is a significant change.
Part-2 Result:
Epoch and accuracy for different batches with 0.001 learning rate.
We have got an accuracy of 85% for the Alexnet model with a 60% training dataset.
Confusion Matrix.
We then train the network and evaluate the classification accuracy on the
validation set. The resulting confusion matrix gives us additional insights on
which categories are misclassified more frequently by the model. So out of 80
total images for each class, 60%=48 images for training, 40%=32 images for
testing and verifying.
Importing the same flower BLUEBELLS to check the accuracy on this pre-trained network.
Summary:
1. We saw that when we built our own neural network the accuracy we got is less.
2. But we can increase the accuracy by increasing the training dataset.
3. We also trained the pre-trained network by modifying its layers according to us.
4. The Custom-made Neural Network obtained an accuracy of 47-60% depending on the
training percent.
5. The Alexnet obtained an accuracy of 85%. Here the difference between Alexnet using
more layers than our network requires less training data then our neural network
which is 60%-Alexnet and 70-80%-Custom Neural network.
6. Both neural networks were compared trained, predicted and results were obtained.
7. The custom neural network gave us an insight into how neural networks work for
image classification.