2019-08-17 16:00:16 +03:00
|
|
|
## The Edge Machine Learning library
|
2017-08-23 19:13:49 +03:00
|
|
|
|
2018-10-08 12:19:22 +03:00
|
|
|
This repository provides code for machine learning algorithms for edge devices
|
|
|
|
developed at [Microsoft Research
|
|
|
|
India](https://www.microsoft.com/en-us/research/project/resource-efficient-ml-for-the-edge-and-endpoint-iot-devices/).
|
2017-08-31 21:30:18 +03:00
|
|
|
|
2018-10-08 12:19:22 +03:00
|
|
|
Machine learning models for edge devices need to have a small footprint in
|
2019-08-17 15:59:00 +03:00
|
|
|
terms of storage, prediction latency, and energy. One instance of where such
|
|
|
|
models are desirable is resource-scarce devices and sensors in the Internet
|
|
|
|
of Things (IoT) setting. Making real-time predictions locally on IoT devices
|
|
|
|
without connecting to the cloud requires models that fit in a few kilobytes.
|
2017-08-31 21:30:18 +03:00
|
|
|
|
2019-08-17 16:00:16 +03:00
|
|
|
### Contents
|
2019-08-17 15:59:00 +03:00
|
|
|
Algorithms that shine in this setting in terms of both model size and compute, namely:
|
2018-09-05 12:11:13 +03:00
|
|
|
- **Bonsai**: Strong and shallow non-linear tree based classifier.
|
|
|
|
- **ProtoNN**: **Proto**type based k-nearest neighbors (k**NN**) classifier.
|
|
|
|
- **EMI-RNN**: Training routine to recover the critical signature from time series data for faster and accurate RNN predictions.
|
2019-12-24 03:28:37 +03:00
|
|
|
- **Shallow RNN**: A meta-architecture for training RNNs that can be applied to streaming data.
|
2018-11-13 19:34:02 +03:00
|
|
|
- **FastRNN & FastGRNN - FastCells**: **F**ast, **A**ccurate, **S**table and **T**iny (**G**ated) RNN cells.
|
2020-07-29 19:22:21 +03:00
|
|
|
- **DROCC**: **D**eep **R**obust **O**ne-**C**lass **C**lassfiication for training robust anomaly detectors.
|
2020-10-26 06:25:51 +03:00
|
|
|
- **RNNPool**: An efficient non-linear pooling operator for RAM constrained inference.
|
2020-03-03 06:54:36 +03:00
|
|
|
|
2018-10-08 12:19:22 +03:00
|
|
|
These algorithms can train models for classical supervised learning problems
|
|
|
|
with memory requirements that are orders of magnitude lower than other modern
|
|
|
|
ML algorithms. The trained models can be loaded onto edge devices such as IoT
|
|
|
|
devices/sensors, and used to make fast and accurate predictions completely
|
|
|
|
offline.
|
|
|
|
|
2019-08-17 15:59:00 +03:00
|
|
|
A tool that adapts models trained by above algorithms to be inferred by fixed point arithmetic.
|
|
|
|
- **SeeDot**: Floating-point to fixed-point quantization tool.
|
2018-10-08 12:19:22 +03:00
|
|
|
|
2019-12-11 21:12:40 +03:00
|
|
|
Applications demonstrating usecases of these algorithms:
|
|
|
|
- **GesturePod**: Gesture recognition pipeline for microcontrollers.
|
|
|
|
- **MSC-RNN**: Multi-scale cascaded RNN for analyzing Radar data.
|
2017-08-30 09:56:09 +03:00
|
|
|
|
2019-08-17 16:00:16 +03:00
|
|
|
### Organization
|
2019-08-21 22:20:56 +03:00
|
|
|
- The `tf` directory contains the `edgeml_tf` package which specifies these architectures in TensorFlow,
|
2019-08-18 12:33:19 +03:00
|
|
|
and `examples/tf` contains sample training routines for these algorithms.
|
2019-08-21 22:20:56 +03:00
|
|
|
- The `pytorch` directory contains the `edgeml_pytorch` package which specifies these architectures in PyTorch,
|
2019-08-18 12:33:19 +03:00
|
|
|
and `examples/pytorch` contains sample training routines for these algorithms.
|
2020-10-26 06:25:51 +03:00
|
|
|
- The `cpp` directory has training and inference code for `Bonsai` and `ProtoNN` algorithms in C++.
|
2019-08-17 15:59:00 +03:00
|
|
|
- The `applications` directory has code/demonstrations of applications of the EdgeML algorithms.
|
2019-08-18 12:33:19 +03:00
|
|
|
- The `tools/SeeDot` directory has the quantization tool to generate fixed-point inference code.
|
2020-10-26 06:25:51 +03:00
|
|
|
- The `c_reference` directory contains the inference code (floating-point or quantized) for various algorithms in C.
|
2019-08-18 12:33:19 +03:00
|
|
|
|
|
|
|
Please see install/run instructions in the README pages within these directories.
|
2017-12-01 12:04:01 +03:00
|
|
|
|
2019-08-17 16:00:16 +03:00
|
|
|
### Details and project pages
|
2019-08-17 16:07:33 +03:00
|
|
|
For details, please see our
|
2019-10-20 07:13:03 +03:00
|
|
|
[project page](https://microsoft.github.io/EdgeML/),
|
|
|
|
[Microsoft Research page](https://www.microsoft.com/en-us/research/project/resource-efficient-ml-for-the-edge-and-endpoint-iot-devices/),
|
2019-11-16 03:52:19 +03:00
|
|
|
the ICML '17 publications on [Bonsai](/docs/publications/Bonsai.pdf) and
|
2019-10-20 07:13:03 +03:00
|
|
|
[ProtoNN](/docs/publications/ProtoNN.pdf) algorithms,
|
2019-11-16 03:52:19 +03:00
|
|
|
the NeurIPS '18 publications on [EMI-RNN](/docs/publications/emi-rnn-nips18.pdf) and
|
2019-10-20 07:13:03 +03:00
|
|
|
[FastGRNN](/docs/publications/FastGRNN.pdf),
|
2019-11-16 03:52:19 +03:00
|
|
|
the PLDI '19 publication on [SeeDot compiler](/docs/publications/SeeDot.pdf),
|
2020-09-15 03:53:04 +03:00
|
|
|
the UIST '19 publication on [Gesturepod](/docs/publications/GesturePod-UIST19.pdf),
|
2019-11-16 03:52:19 +03:00
|
|
|
the BuildSys '19 publication on [MSC-RNN](/docs/publications/MSCRNN.pdf),
|
2020-09-15 03:53:04 +03:00
|
|
|
the NeurIPS '19 publication on [Shallow RNNs](/docs/publications/Sha-RNN.pdf),
|
2020-10-26 06:25:51 +03:00
|
|
|
the ICML '20 publication on [DROCC](/docs/publications/drocc.pdf),
|
|
|
|
and the NeurIPS '20 publication on [RNNPool](/docs/publications/RNNPool.pdf).
|
2019-10-20 07:13:03 +03:00
|
|
|
|
|
|
|
|
|
|
|
Also checkout the [ELL](https://github.com/Microsoft/ELL) project which can
|
2019-08-17 16:12:54 +03:00
|
|
|
provide optimized binaries for some of the ONNX models trained by this library.
|
2019-08-17 15:59:00 +03:00
|
|
|
|
2019-08-17 16:00:16 +03:00
|
|
|
### Contributors:
|
2019-08-17 20:23:03 +03:00
|
|
|
Code for algorithms, applications and tools contributed by:
|
2018-09-05 12:11:13 +03:00
|
|
|
- [Don Dennis](https://dkdennis.xyz)
|
2019-10-04 22:14:39 +03:00
|
|
|
- [Yash Gaurkar](https://github.com/mr-yamraj/)
|
2019-05-29 17:15:22 +03:00
|
|
|
- [Sridhar Gopinath](http://www.sridhargopinath.in/)
|
2020-08-11 05:20:40 +03:00
|
|
|
- [Sachin Goyal](https://saching007.github.io/)
|
2019-08-17 15:59:00 +03:00
|
|
|
- [Chirag Gupta](https://aigen.github.io/)
|
2019-10-04 22:14:39 +03:00
|
|
|
- [Moksh Jain](https://github.com/MJ10)
|
2020-10-26 06:25:51 +03:00
|
|
|
- [Shikhar Jaiswal](https://shikharj.github.io/)
|
2019-08-17 15:59:00 +03:00
|
|
|
- [Ashish Kumar](https://ashishkumar1993.github.io/)
|
|
|
|
- [Aditya Kusupati](https://adityakusupati.github.io/)
|
2019-10-04 22:14:39 +03:00
|
|
|
- [Chris Lovett](https://github.com/lovettchris)
|
2019-08-17 15:59:00 +03:00
|
|
|
- [Shishir Patil](https://shishirpatil.github.io/)
|
2020-08-11 05:20:40 +03:00
|
|
|
- [Oindrila Saha](https://github.com/oindrilasaha)
|
2019-08-17 15:59:00 +03:00
|
|
|
- [Harsha Vardhan Simhadri](http://harsha-simhadri.org)
|
2017-12-01 12:04:01 +03:00
|
|
|
|
2019-08-18 12:33:19 +03:00
|
|
|
[Contributors](https://microsoft.github.io/EdgeML/People) to this project. New contributors welcome.
|
2017-12-01 12:04:01 +03:00
|
|
|
|
2019-08-17 16:07:33 +03:00
|
|
|
Please [email us](mailto:edgeml@microsoft.com) your comments, criticism, and questions.
|
2017-09-01 21:19:52 +03:00
|
|
|
|
2019-08-17 20:23:03 +03:00
|
|
|
If you use software from this library in your work, please use the BibTex entry below for citation.
|
2019-06-30 14:12:55 +03:00
|
|
|
|
|
|
|
```
|
2020-10-26 06:25:51 +03:00
|
|
|
@misc{edgeml04,
|
2020-08-11 05:20:40 +03:00
|
|
|
author = {{Dennis, Don Kurian and Gaurkar, Yash and Gopinath, Sridhar and Goyal, Sachin
|
2020-10-26 06:25:51 +03:00
|
|
|
and Gupta, Chirag and Jain, Moksh and Jaiswal, Shikhar and Kumar, Ashish and
|
|
|
|
Kusupati, Aditya and Lovett, Chris and Patil, Shishir G and Saha, Oindrila and
|
|
|
|
Simhadri, Harsha Vardhan}},
|
2019-07-14 15:56:09 +03:00
|
|
|
title = {{EdgeML: Machine Learning for resource-constrained edge devices}},
|
|
|
|
url = {https://github.com/Microsoft/EdgeML},
|
2020-10-26 06:25:51 +03:00
|
|
|
version = {0.4},
|
2019-06-30 14:12:55 +03:00
|
|
|
}
|
2019-06-30 14:00:01 +03:00
|
|
|
```
|
|
|
|
|
2018-10-08 12:19:22 +03:00
|
|
|
### Microsoft Open Source Code of Conduct This project has adopted the
|
|
|
|
[Microsoft Open Source Code of
|
|
|
|
Conduct](https://opensource.microsoft.com/codeofconduct/). For more information
|
|
|
|
see the [Code of Conduct
|
|
|
|
FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact
|
|
|
|
[opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional
|
|
|
|
questions or comments.
|