Git Product home page Git Product logo

chaithanya21 / dog-breed-classification-tf Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 5.49 MB

This Project is all about building a Deep Learning Pipe Line to process the real world , user supplied Images. Given an Image of a dog the algorithm will identify an estimate of the canine’s breed. If supplied an image of a human, the code will identify the resembling dog breed.(TensorFlow Version)

License: MIT License

Jupyter Notebook 44.09% Python 0.03% HTML 55.88%

dog-breed-classification-tf's Introduction

Dog-Breed-Classification-TF

This Project is all about building a Deep Learning Pipe Line to process the real world , user supplied Images. Given an Image of a dog the algorithm will identify an estimate of the canine’s breed. If supplied an image of a human, the code will identify the resembling dog breed.(TensorFlow Version)

Project Overview

Welcome to the Convolutional Neural Networks (CNN) project. The project focuses on building a dog breed identification pipeline that can be used within a web or mobile app to process real-world, user-supplied images.Given an image of a dog, your algorithm will identify an estimate of the canine’s breed. If supplied an image of a human, the code will identify the resembling dog breed.

Sample Output

Project Instructions

Instructions

  1. Clone the repository and navigate to the downloaded folder.
git clone https://github.com/chaithanya21/Dog-Breed-Classification-TF.git
cd Dog-Breed-Classification-TF
  1. Download the dog dataset. Unzip the folder and place it in the repo, at location path/to/Dog-Breed-Classification-TF/dogImages.

  2. Download the human dataset. Unzip the folder and place it in the repo, at location path/to/Dog-Breed-Classification-TF/lfw.If you are using a Windows machine, you are encouraged to use 7zip to extract the folder.

  3. Donwload the VGG-16 bottleneck features for the dog dataset. Place it in the repo, at location path/to/Dog-Breed-Classification-TF/bottleneck_features.

  4. If you plan to install TensorFlow with GPU support on your local machine, follow the guide to install the necessary NVIDIA software on your system. If you are using an EC2 GPU instance, you can skip this step.

  5. If you are running the project on your local machine (and not using AWS), create (and activate) a new environment.

    • Linux (to install with GPU support, change requirements/dog-linux.yml to requirements/dog-linux-gpu.yml):
    conda env create -f requirements/dog-linux.yml
    source activate Dog-Breed-Classification-TF
    
    • Mac (to install with GPU support, change requirements/dog-mac.yml to requirements/dog-mac-gpu.yml):
    conda env create -f requirements/dog-mac.yml
    source activate Dog-Breed-Classification-TF
    

    NOTE: Some Mac users may need to install a different version of OpenCV

    conda install --channel https://conda.anaconda.org/menpo opencv3
    
    • Windows (to install with GPU support, change requirements/dog-windows.yml to requirements/dog-windows-gpu.yml):
    conda env create -f requirements/dog-windows.yml
    activate Dog-Breed-Classification-TF
    

7.If you are running the project on your local machine (and not using AWS) and Step 6 throws errors, try this alternative step to create your environment.

- __Linux__ or __Mac__ (to install with __GPU support__, change `requirements/requirements.txt` to `requirements/requirements-gpu.txt`): 
```
conda create --name Dog-Breed-Classification-TF python=3.5
source activate Dog-Breed-Classification-TF
pip install -r requirements/requirements.txt
```
**NOTE:** Some Mac users may need to install a different version of OpenCV
```
conda install --channel https://conda.anaconda.org/menpo opencv3
```
- __Windows__ (to install with __GPU support__, change `requirements/requirements.txt` to `requirements/requirements-gpu.txt`):  
```
conda create --name Dog-Breed-Classification-TF python=3.5
activate Dog-Breed-Classification-TF
pip install -r requirements/requirements.txt
```
  1. (Optional) If you are using AWS, install Tensorflow.
sudo python3 -m pip install -r requirements/requirements-gpu.txt
  1. Switch Keras backend to TensorFlow.
    • Linux or Mac:
       KERAS_BACKEND=tensorflow python -c "from keras import backend"
      
    • Windows:
       set KERAS_BACKEND=tensorflow
       python -c "from keras import backend"
      
  2. (Optional) If you are running the project on your local machine (and not using AWS), create an IPython kernel for the dog-project environment.
python -m ipykernel install --user --name Dog-Breed-Classification-TF --display-name "Dog-Breed-Classification-TF"
  1. Open the notebook.
jupyter notebook dog_app.ipynb
  1. (Optional) If you are running the project on your local machine (and not using AWS), before running code, change the kernel to match the dog-project environment by using the drop-down menu (Kernel > Change kernel > dog-project). Then, follow the instructions in the notebook.

Results

The Model acheived a Test accuracy of 1.3% when Trained Using a Convolutional Neural Network From Scratch , Using Data Augmentation and Batch Normalization Techniques with Much Deeper Architrecture Can help to improve the model performance.

The Model acheived a Test Accuracy of 83% when Trained using a Pre-Trained Resnet50 Model for 25 epochs, The Performance of the model can be improved using othet pre-trained models such as Xception and Inception Networks.

Some of the Results obtained After Testing on Real world Images

Blog Post

How Deep Learning Helps Identify Dog Breeds

dog-breed-classification-tf's People

Contributors

chaithanya21 avatar dependabot[bot] avatar

Stargazers

Mohan Raj avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.