Workshop for Cat/Dog Classification using CNN
Prerequisites for the workshop
-
Download the dataset from the
[dogs-vs-cats]
-
Extract the same in the same folder
-
Open and start working on the cnn-cat-dog-dl-ws.ipynb
-
For google colab - run the below command in the cell after creating the shortcut
from google.colab import drive
drive.mount('/content/drive')
!ls "/content/drive/My Drive/cat-dog"
!cp -r "/content/drive/My Drive/cat-dog" "/content/"
-
Add the code from the given reference and run the cell.
-
If the code already exists, please run the code and move to the next cell.
Import all needed packages and declare constants
Create dataframe with the files.
Check the details of the data.
Check the categories of the classification.
Add Convolution details to the model with other hidden layers
Add callbacks for early stopping and learning rate optimization
Create train and test data
Check the validation data
Create dataframe of images with twists and turn for train data.
Create dataframe of images with twists and turn for validation data.
Display all the twists and turned images
Train the model using fit command
Display the accuracy graph
Create dataframe of images with twists and turn for test data.
Prepare the data to display the name in the visualisation
Print the result with prediction and image
Save the prediction result in csv