Now, we are 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 if take up dataset from Google, Google is a website 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 built 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 really try 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 coloured images.
That is, we will have three channels are GNB instead of only one channel.
As we have, in fact, 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 grindy eight by 28 pixel images.
But here are dataset 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 gaggle 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 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's, 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 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, green, valid and paste.
The drain folder will further have two folders.
These folders will be cats and dogs.
So class air here is cat and Class B is dogs.
And this folder, we will have thousand images of cats.
And in this world that we will have thousand images of dogs.
Similarly, in validation dataset, there'll be two folders, one containing 500 images of cats, the
other containing 500 images of dogs in the testing dataset.
We'll have our own images.
So in total, there are 4000 images, 2000 will be used for training.
The Model 1000 will be used for validation set.
And the last Aldan 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 convolutional layers.
So it will have four different conversion layers paired with pooling layers.
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'll be able to create multiple images just by transforming the 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 learned architectures to try to classify this as a dog dataset, using that Prytania architecture
will be able to achieve an accuracy over 90 percent.
So after this project, you'll have understanding of how to import images, how to run binary or multiclass
classification using CNN and how to use Prytania architectures to solve the problem that you have with
you.