Cat vs Dog Classifier Deep Learning Project

Cat Dog Classification

Introduction

The Dogs vs Cats dataset is a standard computer vision dataset that involves classifying photos as  either containing a dog or a cat.

Although the problem sounds simple, it was only effectively addressed in the last few years using deep learning convolutional neural networks. While the dataset is effectively solved, it can be used as the basis for learning and practicing how to develop, evaluate, and use convolutional deep learning neural networks for image classification from scratch.

In this tutorial, you will discover how to develop a convolutional neural network to classify photos of dogs and cats.

After completing this tutorial, you will know:

  • How to load and prepare photos of dogs and cats for modeling.
  • How to develop a convolutional neural network for photo classification from scratch and How to improve model performance.
  • How to test a photo classification model.
  • How to deploy a model with the help of python framework (Flask).



About Dataset

The dataset refers from the kaggle website. The training archive contains 25,000 images of dogs and cats. Train  algorithm on these files.

Download dataset and dataset look like the below image.



Working of Cat vs Dog Classifier

You can completely understand the working of the Cat Dog Classifier model with the help of below image. Just look at the Gif.



I have created a Cat vs Dog classifier model with the help of following few steps like :

1. Define project objectives
2. Data Augmentation
3. Define a Convolution Neural Network Architecture
4. Train the model
5. Save the model
6. Load the model
7. Test the model
8. Deploy the model



Deploy model with Flask






Source code and how to use:

1. Download the dataset : Cat Dog Dataset

2. Go to my github  and download code : Cat Dog Classifier

Cat-Dog-Classifier is a Deep Learning model with a good accuracy.

Cat_Dog_classifier.h5 is a trained model but if you want to train it again. So please run Cat_Dog_Classifier.ipynb in jupiter notebook or Google colab with proper training and validation dataset and then save the model. Then after training of the model, open command prompt and run Image_classification.py then you will get a url then copy the url and paste url in your browser. then your program will be run and now you can test the program with different cat or dog images. 

Your model will be train wth the training_set and test_set dataset and you can test model with Test_imgs dataset.


3. After download, Extract the folder.

4. Go into the folder.

5. Open the command prompt and go to the project folder with cd command.

6. Write (python Image_classification.py) in your prompt.

7. You get a link like (http://127.0.0.1:5000/).

8. Paste in the Chrome or any browser.

9. Now you can use the model.


Demo








If you have any doubts, Please let me know

Post a Comment (0)
Previous Post Next Post