CAT VS DOG CLASSIFIER 🐱🐶

This is a flask app which predicts whether the given image belongs to cat category or dog category. I have used the concept of transfer learning in this project. I used the pre-trained VGG-16 model architecture which was trained with ImageNet dataset. I trained this model (by freezing the in-between convolutional layers having previously trained weights) on Cat-vs-Dog dataset from Kaggle competition. I am able to achieve around 92% accuracy on the validation dataset.


A Glimpse of the app 😎

Homepage home

Upload page upload

Prediction Page prediction


Steps to clone this repo on local machine 🥳

This repository contains an LFS file (VGG_model.h5) as this weights file is of 156 mb and github only allows to upload files which are less than 100 mb. So follow the steps below to clone it -

  1. Download and install Git LFS on your machine.
  2. Then after configuring Git LFS, open Bash console and type the usual git clone command.
    git clone https://github.com/sudeeep885/Cat-vs-Dog-Flask-web-app.git

Steps to run the cat vs dog classifier app on your machine 🎉

  1. Fire up the terminal in the cloned repository directory.

  2. First create a virtual environment.

    virtualenv .env
  3. Activate the virtual environment.

    . ./.env/Scripts/activate
  4. Install the packages from requirements.txt file

    pip install -r requirements.txt
  5. Then finally start the flask app by typing

    python main.py

Other contributors 🙌