Skip to content
프로젝트

emlearn/emlearn-micropython

GitHub에서 보기

소개

Machine Learning and Digital Signal Processing for MicroPython

AI 및 머신러닝

이 수치를 측정하는 방법

What you can do

  • Classification with RandomForest/DecisionTree models
  • Classification and on-device learning with K-Nearest Neighbors (KNN)
  • Classification with Convolutional Neural Network (CNN), using TinyMaix library.
  • Regression and on-device learning with Linear Regression

측정된 스타 증가

in 24h
0
in 7 days
기록 수집 중
in 15 days
기록 수집 중
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

DOI

emlearn-micropython

Machine Learning and Digital Signal Processing for MicroPython. Provides convenient and efficient MicroPython modules, and enables MicroPython application developers to run efficient Machine Learning models on microcontroller, without having to touch any C code.

This is a TinyML library, particularly well suited for low-compexity and low-power classification tasks. It can be combined with feature preprocessing, including neural networks to address more complex tasks.

Builds on emlearn, a C99 library for Machine Learning on microcontrollers and embedded system.

scikit-learn for Microcontrollers

Status

Minimally useful

  • Initial set of Machine Learning and Digital Signal Processing modules available, including example projects.
  • Supports most MicroPython ports using runtime installable native modules (.mpy files)
  • Can also be included into a custom MicroPython build using external C modules
  • Primarily tested on x64 (Unix port) and xtensawin (ESP32/ESP32-S3/etc).

Features

  • Classification with RandomForest/DecisionTree models
  • Classification and on-device learning with K-Nearest Neighbors (KNN)
  • Classification with Convolutional Neural Network (CNN), using TinyMaix library.
  • Regression and on-device learning with Linear Regression
  • Fast Fourier Transform (FFT) for feature preprocessing, or general DSP
  • Infinite Impulse Response (IIR) filters for feature preprocessing, or general DSP
  • Clustering using K-means
  • On-device learning for tree-based classification using Extremely Randomized Trees (extratrees)
  • Joint feature reduction and regression using Partial Least Squares Regression (PLSR)
  • Scaling and data type transformations for array, using emlearn_arrayutils.
  • Load/save Numpy .npy files using micropython-npyfile
  • Installable as a MicroPython native module. No rebuild/flashing needed
  • Operates on standard array.array data structures
  • Models can be loaded at runtime from a file in disk/flash
  • Highly efficient. Inference times down to 100 microseconds, RAM usage <2 kB, FLASH usage <2 kB
  • Pre-built native modules available for most common architectures xtensawin.

Examples

  • xor_trees. A "Hello World", using RandomForest.
  • mnist_cnn. Basic image classification, using Convolutional Neural Network.
  • har_trees. Accelerometer-based Human Activity Recognition, using Random Forest
  • soundlevel_iir. Sound Level Meter, using Infinite Impulse Response (IIR) filters.

Documentation

Complete usage documentation on ReadTheDocs. Good starting points:

Citations

If you use emlearn-micropython in an academic work, please reference the paper:

DOI

@article{emlearn_micropython,
    title = {emlearn-micropython: Machine Learning and Digital Signal Processing for MicroPython},
    author = {Nordby, Jon},
    doi = {10.21105/joss.09093},
    url = {https://doi.org/10.21105/joss.09093},
    year = {2025},
    publisher = {The Open Journal},
    journal = {Journal of Open Source Software},
    volume = {10},
    number = {116},
    pages = {9093}
}

If you have a need to reference a particular version, use the DOI shown on the Zenodo page (right hand side).

Developing

For how to hack on emlearn-micropython itself, see docs/developing.md, and for how to contribute see docs/CONTRIBUTING.md.

관련 프로젝트 살펴보기

불러오는 중…