Skip to content

gojibjib/jibjib-query

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This service utilizes TensorFlow Serving to load a protobuffer-serialized TensorFlow model and make it accessible through a custom, Flask-based REST API.

TensorFlow Serving is an open-source software library for serving machine learning models. It deals with the inference aspect of machine learning, taking models after training and managing their lifetimes, providing clients with versioned access via a high-performance, reference-counted lookup table.

Repo layout

The complete list of JibJib repos is:

  • jibjib: Our Android app. Records sounds and looks fantastic.
  • deploy: Instructions to deploy the JibJib stack.
  • jibjib-model: Code for training the machine learning model for bird classification
  • jibjib-api: Main API to receive database requests & audio files.
  • jibjib-data: A MongoDB instance holding information about detectable birds.
  • jibjib-query: A thin Python Flask API that handles communication with the TensorFlow Serving instance.
  • gopeana: A API client for Europeana, written in Go.
  • voice-grabber: A collection of scripts to construct the dataset required for model training

Installation

Remotely

Use the jibjib-api deployment instructions to deploy the whole microservices stack to AWS.

Locally

Clone the repo:

git clone https://github.com/gojibjib/jibjib-query
cd jibjib-query

Get the model:

curl https://s3-eu-west-1.amazonaws.com/jibjib/model/jibjib_model_serving.tgz | tar -xvz -C app/input/model/

Get the mappings:

curl https://s3-eu-west-1.amazonaws.com/jibjib/pickle/mapping_pickles.tgz | tar -xvz -C app/input/pickle

Make sure to have Docker and Docker Compose installed, then start the stack:

docker-compose up -d

Test it:

curl -H 'Content-Type: application/octet-stream' -X POST --data-binary @bird_voice.mp4 http://localhost:8081/detect/binary