The objective of this project is to classify the images of CATS and DOGS using a CNN model
The training and testing dataset that was used for this project consisted of various images of dogs and cats. These images were of size(375,500). for more reference on loading dataset, click here
This is the most important step as we prepare the data for training and testing. First we reshape all the images of training and testing dataset such that all of them are of same shape. The training dataset is then shuffled so as to make the training better. If not shuffled, the machine trains on all the images of cats first and the on the images of dogs which becomes a hinderence to better training. reshaping_data & shuffling_data
After converting the training data into their respective one hot encoded values, we create a sequential model using tensorflow backend and keras. The model consists of 2 Conv2D layers with MaxPool layers and 2 FC layers.
We first compile the model and then fit in onto the training data with suitable number of epochs. We can also give a certain batch size if the dataset is too huge. Here in the fitting of data we use the test data as the validation dataset.evaluation