Welcome to MLAPI’s documentation!

It is a simple API Framework for serving your Machine Learning model.

Don’t write glue code for API and Keras model! We did it for You!

Getting started

We will show by example how to run Your own project.

Suppose our project is “Cats recognition” - does the picture contain a cat or not?

1. Save model

If you use Keras library, the first step is to save model as below:

# import necessary package
import h5py

# Define simple example Keras model
model = Sequential()
(...)
model.save('catsRecognition.h5')

After this process you will receive in the main project directory file: catsRecognition.h5.

2. Insert Your model into MLAPI

  1. Go to mlapi main directory
  2. /API/models/computed
  3. Create Your own directory name for example “cats”
  4. Insert your model file into folder /cats

3. Write config for Your model

[CATS]
modelName: cats
modelFullName: Cats Recognition
modelFile: catsRecognition.h5
outputValueType: class_probability
contentType: image

modelControllerClassOverrideFile: cats
modelControllerClassName: CatsClass

Save above lines in your /cats folder as config.ini

4. Write Class for Your model


TODO

Models which we plan to do. If you need model, just write to us office@ermlab.com or edit this document and create pull request :)

Contributors

Ermlab Software:

  • Marcel Odya (@marcel-odya)
  • Szymon Płotka (@simongeek)
  • Krzysztof Sopyła (@ksopyla)