Using machine learning to analyze sensor data in embedded systems
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
I recently made an automatic toothbrush timer, using an accelerometer and a microcontroller. It is intended to be a fun and practical example for the emlearn-micropython machine learning library.
Below is a quick demo of the gadget in operation:
The project is available at: https://github.com/jonnor/toothbrush/
You will find there the software, firmware, data, ML training pipeline and 3d-printed parts.
There is now an example project in emlearn-micropython for doing (human) activity recognition using accelerometer/IMU. It can be found here: https://github.com/emlearn/emlearn-micropython/tree/master/examples/har_trees
Example applications of human activity detection could be sleep tracking, overall everyday activities' classification (sitting, walking, running, etc), exercise tracking (can be specific exercises like jacks/lunges/pushups/etc). Since machine learning is dependent on datasets, what exactly we will be able to do is of course a bit dependent on what datasets we are able to find and/or gather.
The feature extraction code is in MicroPython, but it could easily be ported to C. The classifier used is Random Forest, and that is implemented in C using the emlearn C library.
emlearn-micropython is a Machine Learning and Digital Signal Processing library for MicroPython. It enables MicroPython applications to run efficient Machine Learning models on microcontroller,
without having to touch any C code. It builds on the emlearn C library and exposes a set of small, independent MicroPython modules. The modules (as .mpy files) can be installed at runtime, using the MicroPython package manager "mip". This aims to enable a user experience that is just as convenient and powerful as we already have on standard (C)Python, for microcontrollers.
Here is the first presentation on this library.
emlearn is an open-source library for implementing. It allows to convert models trained with Python (using scikit-learn or Keras) into portable C99 code.
Here are two presentations that introduce the project. The first is very short and concise, where-as the other is a bit longer and detailed.
Create an account to leave a comment. Already have an account? Log In.
Become a member to follow this project and never miss any updates