Giter Site home page Giter Site logo

jacobpolloreno / dog-breed-web-classifier Goto Github PK

View Code? Open in Web Editor NEW
8.0 4.0 6.0 92.04 MB

Simple classifier in your browser to predict dog breeds using Flask and Keras/Tensorflow.

License: GNU General Public License v3.0

Python 61.33% HTML 38.67%
classifier inception deep-learning cnn cnn-keras keras keras-tensorflow flask transfer-learning resnet-50

dog-breed-web-classifier's Introduction

#Simple Dog Breed Classifier with Keras and Transfer Learning

Instructions

  1. Clone repo
    	git clone https://github.com/JacobPolloreno/dog-breed-web-classifier.git
    	cd dog-breed-classifier
    
  2. Download necessary requirements
    	pip install -r requirements.txt
    
  3. Run
    	python app.py
    
  4. Browse to http://localhost:5000
  5. Select Model To Use
  6. Upload Image files

Included Pre-trained Models

Code used to train models can be found here: https://github.com/JacobPolloreno/Artificial-Intelligence-ND/tree/master/CNN

The included Inception and Resnet50 models were trained to predict dog breeds. On a test set, the Inception v3 model returned an accuracy of 74% while the Resnet50 was 84% accurate.

The architecture and weights files for the inception model include a beheaded inception v3 network with a GAP layer and two dense layers appended onto it.

The Resnet model's architecture file and weights are different. Instead, bottleneck features were calculated on the Resnet50 model which were then used as input into a smaller network. The smaller network consist of a flatten layer, dense layer(256 units) with relu activation, dropout(.4), and a dense layer with softmax activation.

Use your own weights and model

You can replace the saved weights and model architecture in the models directory with your own. Note, that if you want to add any other model besides Inceptionv3 or Resnet50 then you'll need to add a preprocess_<network> function to utils.py as well as use it in app.py.

Also if you decide to use the full Resnet50 architecture and weights then you'll need to modify the preprocess_resnet function in utils.py because it extracts bottleneck features.

Screenshots

dog breed predictions

Credits

Some inspiration and code came from:

dog-breed-web-classifier's People

Contributors

jacobpolloreno avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dog-breed-web-classifier's Issues

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.