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.
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
Use the jibjib-api deployment instructions to deploy the whole microservices stack to AWS.
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