Coder Social home page Coder Social logo

shyamstarwalt / dog-breed-classifier Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 28.15 MB

Given an image of a dog, 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.

License: MIT License

Jupyter Notebook 100.00%

dog-breed-classifier's Introduction

Dog-Breed-Classifier

Given an image of a dog, 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.

As part of my deep learning nanodegree (Convolutional Neural Networks (CNN)), I created a cnn (from scratch) and (transfer learning) to classify images as containing humans, dogs, or neither, and in the first two cases predict the best resembling dog breed of the images subject.

The breed classifier model was trained on a dataset of 13000+ dog images labeled by breed and ran for 100 epochs with a 0.0001 learning rate. The model used a pretrained resnet50 model as it's base, with one fully connected layer as final linear layer to handle the classification of 133 different dog breeds.

Getting Started

Download

Download dog image file from https://s3-us-west-1.amazonaws.com/udacity-aind/dog-project/dogImages.zip

Download dog image file from https://s3-us-west-1.amazonaws.com/udacity-aind/dog-project/lfw.zip

Prerequisites

  • Python 3.
  • Numpy
  • Pandas
  • MatPlotLib
  • OpenCv
  • Pytorch.

Project Instruction

Instructions

  1. Clone the repository and navigate to the downloaded folder.

    git clone https://github.com/shyamStarwalt/Dog-Breed-Classifier.git
    
  2. Download and Install Anaconda from here

  3. Install the above packages mentioned in the Prerequisites (Anaconda Prompt)

  4. Open the cloned repository and navigate to

    cd Dog-Breed-Classifier
    
  5. Open the Dog-breed_classifier.ipynb

    jupyter notebook Dog-breed_classifier.ipynb	
    
  6. Read and follow the instructions! This repository doesn't include any dataset you need. You can check out the getting started to download them.

Project Information

Contents

  • Intro
  • Step 0: Import Datasets
  • Step 1: Detect Humans
  • Step 2: Detect Dog
  • Step 3: Create a CNN to Classify Dog Breeds (from Scratch)
  • Step 4: Create a CNN to Classify Dog Breeds (using Transfer Learning)
  • Step 5: Write Your Algorithm
  • Step 6: Test Your Algorithm

Losses

Model scratch:

Training loss: 3.508 ... Validation loss: 0.127

Transfer model:

Training loss: 1.141 ... Validation loss: 0.021

Accuracy:

Model scratch:

Accuracy : 14%

Transfer model:

Accuracy : 76%

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments

  • The data comes from Udacity.

dog-breed-classifier's People

Contributors

shyamstarwalt avatar

Watchers

James Cloos 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.