Image Augmentation
CNN Model
VGG16 Model
Python
Keras - TensorFlow
matplotlib
Numpy
piexif
shutil
The dataset for this project is hosted by Microsoft.
https://www.microsoft.com/en-us/download/details.aspx?id=54765
- visualize.ipynb:
Cats:
- Image Augmentation:
An example on a random image from the dataset.
- CNN Model:
The Hyper Parameters used:
FILTER_SIZE = 3
NUM_FILTERS = 32
INPUT_SIZE = 32
MAXPOOL_SIZE = 2
BATCH_SIZE = 16
STEPS_PER_EPOCH = 20000//BATCH_SIZE
EPOCHS = 20
The CNN model layer sequence goes like:
Conv2D -> MaxPooling -> Conv2D -> MaxPooling -> Flatten -> Dense -> Dropout -> Output
with sigmoid activation for the output layer and relu activation for the rest of the layers with adam optimizer and accuracy as the evaluation metric.
Output:
loss: 0.7063166499137878
accuracy: 0.778124988079071
- VGG 16:
Taking the input size of 128 with a batch size of 16 examples, I have trained the VGG16 model from keras, by freezing the pretrained layers, for 3 epoches with 200 steps per epoch using imagenet dataset's pretrained weights.
loss: 0.47205138206481934
accuracy: 0.8762500286102295


