Coder Social home page Coder Social logo

vertexclique / evren Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 17 KB

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

License: MIT License

Python 100.00%
machine-learning core-ml mlkit ios android model-export android-ndk

evren's Introduction

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.

evren's People

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.