Skip to content

Latest commit

 

History

History
122 lines (83 loc) · 2.43 KB

index.rst

File metadata and controls

122 lines (83 loc) · 2.43 KB

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!

Repository contents

API

.. toctree::
    mlapi/app
    mlapi/helpers
    mlapi/images
    mlapi/api_users_methods
    mlapi/parsers/imageParser

Models handling

.. toctree::
    models/modelsHolder
    models/modelController

Database and project management

.. toctree::
    manage
    db/config
    db/dbConnection
    db/dbModels

Indices

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

.. toctree::
    models/modelController

Check our ready models

TODO

Models which we plan to do. If you need model, just write to us [email protected] or edit this document and create pull request :)

Contributors

Ermlab Software:

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