Giter Club home page Giter Club logo

bird_watch's Introduction

Bird Watch

A Deep Learning based Bird Image Identification System, using Keras, TensorFlow, OpenCV, and Flask.

Introduction

The 'Bird Watch' project, created by an amateur photographer and a machine learning enthusiast, is a solution to a simple problem faced by fellow wildlife photographers: a way to identify birds in photographs. The application is developed using Keras and TensorFlow, with Flask for the web application. InceptionV3 was used as the base model and was trained using transfer learning and fine-tuning techniques.

The live application can be found at https://www.birdwatch.photo/

Usage

Setup

The libraries required to run the Flask app can be installed via the following commands.

Using PIP:

pip install -r requirements.txt

Using Conda:

conda install numpy scipy h5py Pillow Click Flask itsdangerous Jinja2 MarkupSafe Werkzeug tensorflow
pip install keras

Note: You can install tensorflow-gpu (instead of tensorflow) if you have a CUDA capable GPU.

Running the App

First, head over to the Releases page and grab the latest final_model_*.h5 and class_indices_*.npy files, and place them in the models directory.

You can then start the Flask app can be run by running,

python application.py

The app would by default run on http://127.0.0.1:5000/

Training with your own data

In order to train with you own images, create a data/train directory and place your images within sub-directories for each class within the train directory (as required by the flow_from_directory function of Keras: https://keras.io/preprocessing/image/ ). Create a data/models directory for the bottleneck features and the trained models to be saved. You can also create a data/eval directory and place few sample images there to evaluate the model after training.

Once you have the data ready, you can run,

python bird_watch_train.py

This will run the combined training and fine-tuning script which will generate the final model files.

Note: The training may take 10+ hours to run, even on a GPU such as a RTX 2070.

Once the training is over, you will have final_model_*.h5 and class_indices_*.npy in your data/models directory. Copy them over to your top level models directory and you'll be good to go.

Dependencies

Runtime

The main requirements to run the Flask application are:

  • TensorFlow
  • Keras
  • Flask

The full set of runtime dependencies are in the requirements.txt

Training

In order to re-train the model, the following additional libs are needed:

  • OpenCV
  • Matplotlib
  • Pillow

Author

bird_watch's People

Contributors

dependabot[bot] avatar thimira 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.