This is a Convolutional Neural Network (CNN) which is written in python language. This CNN model is trained on few thousand images of cats and dogs, and later be able to predict if the given image is of a cat or a dog. This model achieves over 80% accuracy.
The process of building a Convolutional Neural Network always involves four major steps.
Step 1: Convolution
Step 2: Pooling
Step 3: Flattening
Step 4: Full connection
Cat Classifier was build using 2 layers Deep Neural Network. It was trained on 209 images and tested on 50 images.
Each image was a 64*64 RGB image. Input image was flattened to a vector. Correspnding vector was multiplied with weight matrix.
Weight matrix were randomly initalized and then added with the bias term. The result called linear unit. Then Relu of the linear unit was taken.
Same process was repeated one more time, but this time instead of Relu, we used sigmoid activation function.
If the output was greater than 0.5 it was predicted as cat and if the output was less than 0.5 it was predicted as non-cat.
Here Gradient Descent ws used to update the weights and biased terms.
Using these, Finally I have obtained traning accuracy of 98% and test accuracy of 80%.
Data set can be downloaded from here