Skip to content

Machine Learning model optimizer and exporter for embedded systems and mobile platforms

License

Notifications You must be signed in to change notification settings

vertexclique/evren

Repository files navigation

Evren

Evren

Build Status codecov.io

NOTE: Project is in experimental phase.

Evren is pre-optimizer and exporter for machine learning models to embedded systems, android and iOS platforms. Currently Android and iOS supported, for iOS it can export caffe and keras models, for Android it exports keras models. Keras models should use Tensorflow backend.

Installation

After cloning use tox to setup environment.

$ tox

Usage

You can find examples in examples directory. Documentation will be made available soon.

Minimal export code can be:

MODEL_NAME = "dense_android_test"

# Define Keras model
model = Sequential()
model.add(Dense(10, input_shape=(10, 1)))
model.add(Dense(10))
model.add(Dense(10))
model.add(Dense(10))
model.add(Dense(10))
model.add(Dense(10))
model.add(Dense(1, activation='sigmoid'))

# Train it in here, just because it is demonstration we ignore that
# . . . . . . TRAINING . . . . . .

# If you know the output nodes you
# don't need to call underlying output nodes list

output_nodes = get_output_node_names()

# Write Keras model with weights as protobuf file
# for use with Tensorflow Lite and Android NDK
# It will produce `dense_android_test.pb` with weights embedded in.
export_keras_to_file(model_name=MODEL_NAME,
                     input_names=map(str, range(1, 10)),
                     output_names=output_nodes,
                     out_file_name=MODEL_NAME)

TODO

  • Caffee export for Android
  • Extra optimization techniques for Android and iOS.
  • Travis setup with Tox.

Contributing

Read CONTRIBUTING.

About

Machine Learning model optimizer and exporter for embedded systems and mobile platforms

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages