Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tszydlo/FogML-Zephyr
https://github.com/tszydlo/FogML-Zephyr
tinyml zephyr-rtos
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/tszydlo/FogML-Zephyr
- Owner: tszydlo
- License: apache-2.0
- Created: 2022-06-23T11:41:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T15:03:37.000Z (11 months ago)
- Last Synced: 2024-07-30T21:08:19.083Z (3 months ago)
- Topics: tinyml, zephyr-rtos
- Language: C
- Homepage:
- Size: 85 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FogML-Zephyr
The application recognizes gestures an IoT device performs based on the built-in accelerometer. It uses the classification algorithms and programming tools provided by FogML:
* FogML-SDK [https://github.com/tszydlo/fogml_sdk]
* FogML tools [https://github.com/tszydlo/FogML]The application is implemented for the Zephyr-OS operating system. The tests were carried out on a Thingy:91 device containing nrf9160 and manufactured by Nordic Semiconductor.
## Classification
The accelerometer data processing pipeline is presented in the figure.![Classification pipeline](./doc/classification.png)
In the example, gestures are classified using the random forest algorithm. The generated classifier source code is in the `src/fogml_generated/random_forest_model.c` file.
For the device to recognize other gestures, it is necessary to collect training data, assign labels, and train the model. The entire process is described in Jupyter Notebook, along with training data in the `tools` directory. Notepad can be run in eg Google Colab or Anaconda.
## Anomaly detection
The example uses the modification of the K-Means algorithm and z-score to detect anomalies - deviations from training data. Model generation for this purpose is described in Jupyter Notebook located in the `tools` directory.## Building
The application is implemented for the Zephyr OS operating system. Since the application is for Thingy:91 device, we use NRF Connect SDK 2.0.0 and VSCode plugin, which simplifies the process of building, flashing and debugging applications for Zephyr. The application can also be built directly using the `west` tool and the base Zephyr.The application uses the basic drivers available in the operating system, and porting to another device should be relatively easy.
## Bibliography
Please mention us and cite our papers if you use this work and find it useful.```
@inproceedings{FogMLSzydlo2018,
author = {Tomasz Szydlo and
Joanna Sendorek and
Robert Brzoza{-}Woch},
editor = {Yong Shi and
Haohuan Fu and
Yingjie Tian and
Valeria V. Krzhizhanovskaya and
Michael Harold Lees and
Jack J. Dongarra and
Peter M. A. Sloot},
title = {Enabling Machine Learning on Resource Constrained Devices by Source
Code Generation of the Learned Models},
booktitle = {Computational Science - {ICCS} 2018 - 18th International Conference,
Wuxi, China, June 11-13, 2018, Proceedings, Part {II}},
series = {Lecture Notes in Computer Science},
volume = {10861},
pages = {682--694},
publisher = {Springer},
year = {2018},
}
```