Professional Documents
Culture Documents
AIP A1 Report
AIP A1 Report
AIP A1 Report
Name: Pagadala Krishna Murthy, SR NO: 19217, MTech AI (Artificial Intelligence), EE.
For all the transformations of image, most of the features detected are repeated in all the
transformations of image. So features detected can be said as invariant features.
First Image size is 500 X 375, Sigma =1.6, No. of images per octave = 5, No. of octaves = 8
Loaded inbuilt VGG16 model and extracted features from FC2 layer for each image, and formed
x_train and x_test
For y_train and y_test used the following numbers to each class of image in the data set
Classified each feature using KNN algorithm, ‘n’ is no. of Neighbours taken
Since I'm not able to replace the layer in the existing VGG16 model, I created a empty new
sequential model
Copied all the layers except the prediction layer into sequential model
Compiled the model using Adam optimizer. Initially I tried to compile the entire model, but its taking
a very long time so I understood that it's trying to train all the layers, so freezed all the layers except
the last layer, so that only final layer is trainable.
Implemented 3-layer CNN from scratch with convolution, flatten and dense layers
Compiled the model with Adam optimizer with learning rate = 0.0001 and loss = crossentropy
When trained model for the first time, I got 94.72% accuracy on training data, when I executed the
cell again, I got 99.72% accuracy. I assume this was due to overfitting tendency of the neural
networks repeating the same training data.
Later I restarted the program and run the model over the training data only once.
In part A we try to use just the features given by fc1/fc2 layer of VGG16 model and use separate
classifier algorithm(KNN) to classify.
In part B we directly use VGG16 to classify, by fine tuning its classification layer to predict only 6
classes
In part C we built a simple CNN model from scratch with 3 layers and process is same as part B,
except that here we can train all layers in less time.