Now we're going to start with a complete end to end project in this project.
We will try to classify colored images of cats and dogs.
So we'll take up dataset from Google.
Google is a Web site where a lot of data science competitions are being held.
There was a competition which was held in 2003 in which thousands of images of cats and dogs were given
and a model was to be buried to classify those images into cats and dogs.
The best accuracy achieved in that competition was nearly ninety eight percent.
We are going to use a subset of that data and try to build our model.
And we tried to achieve over 90 percent accuracy with our model.
Here are some of the details of this project.
This is a binary classification problem unlike fashion amnesty in which there were 10 categories to
be predicted.
Here we have only two.
Either that images of a cat or it is of a dog.
So only two glasses.
That is why it is a binary classification problem.
Then this is a data set of colored images.
That is we will have three channels R D and B instead of only one channel.
As we have in fact an amnesty does it.
Then we do not have a standard dimension of all these images as you saw in the previous project.
We were using twenty eight by 28 pixel images but here are data set does not have one standard dimension.
So when we are feeding the data to our model we will have to convert the images to one standard dimension.
So that is one additional step
then we are using a cattle dataset.
If you are interested you can go to The Kaggle website and see this cat versus dog competition.
You can also see the leaderboard there.
How much accuracy people have achieved and you can compare your model with other people's model and
the last point is we are going to use a subset of the total data the total data I had over 50000 images
in our model we are going to use only 4000 images to tell them to train 1000 for validation dataset
and 1000 for testing.
So using only this small part of the data we are still going to achieve accuracy which are comparable
to the other models built by people in the competition.
So here is how we have structured the data these zip file that you will download from the link that
we have provided has 4000 images and those images are structured in this format.
So the first folder will have three folders inside of it these three folders will be tighter train valid
and test the drain for the will further have two folders these folders will be cats and dogs.
So plus a head is cat and Class B is dogs and this border we will have thousand images of cats and in
this world we will have told them images of dogs similarly in validation data set there will be two
folders one containing 500 images of cats the other containing 500 images of dogs in the testing data
set will have thousand images so in total there are photos and images two thousand will be used for
training the model 1000 will be used for validation data set and the last all the images will be used
for testing the accuracy on previously unseen data
so the process we are going to follow while building this project is this first.
We will be creating a CNN model with four convolution layers.
So it will have four different Congressional layers paired with pooling layer.
And this model will be able to achieve accuracy in the range of 70 to 75 percent.
I'm talking about validation accuracy here.
So this model will be able to achieve somewhere between 70 to 75.
Then because we have a small dataset we can improve the performance of our model by doing data augmentation
data augmentation is the process of creating artificial images using these small dataset that you have.
So in the second step we will augment our data and then then our model again.
For example if you have this image of a cat you can create a new image by zooming in a small part of
this image or you can create a new image by rotating this image of a cat.
And there are many more transformations that you can do to this image to create a similar image of a
cat using an existing image.
So using one image you will be able to create multiple images just by transforming that image a little
bit.
Transformations include linear transformations rotations zooming in zooming out etc..
So after you do this and you run the model again you'll be able to achieve an accuracy or 80 percent.
Lastly we'll use one of the architectures that we have discussed previously and we will try to implement
those pre learned architectures to try to classify this cat was a dog dataset.
Using that pretend architecture will be able to achieve an accuracy over 90 percent.
So after this project you have understanding of how to import images how to run binary or multi class
classification using CNN and how to use retained architectures to solve a problem that you have with
you.