Building a simple Keras + deep learning REST API

Click for: original source

Adrian Rosebrock tutorial in which he will present a simple method to take a Keras model and deploy it as a REST API. The examples covered in this post will serve as a template/starting point for building your own deep learning APIs.

The Keras library is an amazing tool that allows us to launch deep learning models with relative ease. This Python’s high-level package can be used on top of a GPU installation of either TensorFlow or Theano.

The post’s focus is on:

  • How to (and how not to) load a Keras model into memory so it can be efficiently used for inference
  • How to use the Flask web framework to create an endpoint for our API
  • How to make predictions using our model, JSON-ify them, and return the results to the client
  • How to call our Keras REST API using both cURL and Python

Detailed code is provided in the repository with explanation and charts. It is meant to be used as a template for your own Keras REST API. ßGood read!

[Read More]

Tags big-data data-science programming