All Projects → emlearn → Emlearn

emlearn / Emlearn

Licence: mit
Machine Learning inference engine for Microcontrollers and Embedded devices

Programming Languages

python
139335 projects - #7 most used programming language
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Emlearn

Xnnpack
High-efficiency floating-point neural network inference operators for mobile, server, and Web
Stars: ✭ 808 (+424.68%)
Mutual labels:  neural-networks, inference
Ml Workspace
🛠 All-in-one web-based IDE specialized for machine learning and data science.
Stars: ✭ 2,337 (+1417.53%)
Mutual labels:  neural-networks, scikit-learn
Awesome Fraud Detection Papers
A curated list of data mining papers about fraud detection.
Stars: ✭ 843 (+447.4%)
Mutual labels:  random-forest, classifier
Machine Learning With Python
Practice and tutorial-style notebooks covering wide variety of machine learning techniques
Stars: ✭ 2,197 (+1326.62%)
Mutual labels:  scikit-learn, random-forest
Nnpack
Acceleration package for neural networks on multi-core CPUs
Stars: ✭ 1,538 (+898.7%)
Mutual labels:  neural-networks, inference
Onnxruntime
ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator
Stars: ✭ 5,910 (+3737.66%)
Mutual labels:  neural-networks, scikit-learn
Deep learning projects
Stars: ✭ 28 (-81.82%)
Mutual labels:  neural-networks, scikit-learn
Cppflow
Run TensorFlow models in C++ without installation and without Bazel
Stars: ✭ 357 (+131.82%)
Mutual labels:  neural-networks, inference
Dtreeviz
A python library for decision tree visualization and model interpretation.
Stars: ✭ 1,857 (+1105.84%)
Mutual labels:  random-forest, scikit-learn
Tpot
A Python Automated Machine Learning tool that optimizes machine learning pipelines using genetic programming.
Stars: ✭ 8,378 (+5340.26%)
Mutual labels:  scikit-learn, random-forest
Actionai
custom human activity recognition modules by pose estimation and cascaded inference using sklearn API
Stars: ✭ 404 (+162.34%)
Mutual labels:  scikit-learn, classifier
Awesome Decision Tree Papers
A collection of research papers on decision, classification and regression trees with implementations.
Stars: ✭ 1,908 (+1138.96%)
Mutual labels:  random-forest, classifier
Nnom
A higher-level Neural Network library for microcontrollers.
Stars: ✭ 382 (+148.05%)
Mutual labels:  microcontroller, neural-networks
Awesome Gradient Boosting Papers
A curated list of gradient boosting research papers with implementations.
Stars: ✭ 704 (+357.14%)
Mutual labels:  random-forest, classifier
Sktime Dl
sktime companion package for deep learning based on TensorFlow
Stars: ✭ 379 (+146.1%)
Mutual labels:  neural-networks, scikit-learn
Ferret
Ferret is a free software lisp implementation for real time embedded control systems.
Stars: ✭ 878 (+470.13%)
Mutual labels:  microcontroller, embedded-systems
aws-lambda-docker-serverless-inference
Serve scikit-learn, XGBoost, TensorFlow, and PyTorch models with AWS Lambda container images support.
Stars: ✭ 56 (-63.64%)
Mutual labels:  scikit-learn, inference
linear-tree
A python library to build Model Trees with Linear Models at the leaves.
Stars: ✭ 128 (-16.88%)
Mutual labels:  random-forest, scikit-learn
Mljar Supervised
Automated Machine Learning Pipeline with Feature Engineering and Hyper-Parameters Tuning 🚀
Stars: ✭ 961 (+524.03%)
Mutual labels:  scikit-learn, random-forest
Hep ml
Machine Learning for High Energy Physics.
Stars: ✭ 133 (-13.64%)
Mutual labels:  neural-networks, scikit-learn

Travis CI Build Status Appveyor Build status DOI

emlearn

Machine learning for microcontroller and embedded systems. Train in Python, then do inference on any device with a C99 compiler.

Key features

Embedded-friendly Inference

  • Portable C99 code
  • No libc required
  • No dynamic allocations
  • Support integer/fixed-point math
  • Single header file include

Convenient Training

  • Using Python with scikit-learn or Keras
  • The generated C classifier is also accessible in Python

MIT licensed

Can be used as an open source alternative to MATLAB Classification Trees, Decision Trees using MATLAB Coder for C/C++ code generation. fitctree, fitcensemble, TreeBagger, ClassificationEnsemble, CompactTreeBagger

Status

Minimally useful

Classifiers:

  • eml_trees: sklearn.RandomForestClassifier, sklearn.ExtraTreesClassifier, sklearn.DecisionTreeClassifier
  • eml_net: sklearn.MultiLayerPerceptron, Keras.Sequential with fully-connected layers
  • eml_bayes: sklearn.GaussianNaiveBayes

Feature extraction:

  • eml_audio: Melspectrogram

Tested running on AVR Atmega, ESP8266, Linux and Windows. Mac OS should also work fine, please file a bug report if it does not.

Installing

Install from PyPI

pip install --user emlearn

Usage

  1. Train your model in Python
from sklearn.ensemble import RandomForestClassifier
estimator = RandomForestClassifier(n_estimators=10, max_depth=10)
estimator.fit(X_train, Y_train)
...
  1. Convert it to C code
import emlearn
cmodel = emlearn.convert(estimator, method='inline')
cmodel.save(file='sonar.h')
  1. Use the C code
#include "sonar.h"

const int32_t length = 60;
int32_t values[length] = { ... };
const int32_t predicted_class = sonar_predict(values, length):

For full example code, see examples/digits.py

Contributors

Jon Nordby
Mark Cooke

Citations

If you use emlearn in an academic work, please reference it using:

@misc{emlearn,
  author       = {Jon Nordby},
  title        = {{emlearn: Machine Learning inference engine for 
                   Microcontrollers and Embedded Devices}},
  month        = mar,
  year         = 2019,
  doi          = {10.5281/zenodo.2589394},
  url          = {https://doi.org/10.5281/zenodo.2589394}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].