{"id":13343837,"url":"https://github.com/tszydlo/FogML-Zephyr","last_synced_at":"2025-03-12T06:30:33.295Z","repository":{"id":101279217,"uuid":"506616078","full_name":"tszydlo/FogML-Zephyr","owner":"tszydlo","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-15T15:03:37.000Z","size":87,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-24T16:49:28.473Z","etag":null,"topics":["tinyml","zephyr-rtos"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tszydlo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-23T11:41:55.000Z","updated_at":"2024-07-02T16:41:36.000Z","dependencies_parsed_at":"2024-10-24T07:03:25.386Z","dependency_job_id":"a1e5bc37-1cb8-426d-aee2-7e2c79f0fbc7","html_url":"https://github.com/tszydlo/FogML-Zephyr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tszydlo%2FFogML-Zephyr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tszydlo%2FFogML-Zephyr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tszydlo%2FFogML-Zephyr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tszydlo%2FFogML-Zephyr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tszydlo","download_url":"https://codeload.github.com/tszydlo/FogML-Zephyr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243171379,"owners_count":20247876,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["tinyml","zephyr-rtos"],"created_at":"2024-07-29T19:32:01.500Z","updated_at":"2025-03-12T06:30:33.011Z","avatar_url":"https://github.com/tszydlo.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FogML-Zephyr\nThe application recognizes gestures an IoT device performs based on the built-in accelerometer. It uses the classification algorithms and programming tools provided by FogML:\n* FogML-SDK [https://github.com/tszydlo/fogml_sdk]\n* FogML tools [https://github.com/tszydlo/FogML]\n\nThe 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.\n\n## Classification\nThe accelerometer data processing pipeline is presented in the figure.\n\n![Classification pipeline](./doc/classification.png)\n\nIn 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.\n\nFor 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.\n\n## Anomaly detection\nThe 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.\n\n## Building\nThe 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.\n\nThe application uses the basic drivers available in the operating system, and porting to another device should be relatively easy.\n\n## Bibliography\nPlease mention us and cite our papers if you use this work and find it useful.\n\n```\n@inproceedings{FogMLSzydlo2018,\n  author    = {Tomasz Szydlo and\n               Joanna Sendorek and\n               Robert Brzoza{-}Woch},\n  editor    = {Yong Shi and\n               Haohuan Fu and\n               Yingjie Tian and\n               Valeria V. Krzhizhanovskaya and\n               Michael Harold Lees and\n               Jack J. Dongarra and\n               Peter M. A. Sloot},\n  title     = {Enabling Machine Learning on Resource Constrained Devices by Source\n               Code Generation of the Learned Models},\n  booktitle = {Computational Science - {ICCS} 2018 - 18th International Conference,\n               Wuxi, China, June 11-13, 2018, Proceedings, Part {II}},\n  series    = {Lecture Notes in Computer Science},\n  volume    = {10861},\n  pages     = {682--694},\n  publisher = {Springer},\n  year      = {2018},\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftszydlo%2FFogML-Zephyr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftszydlo%2FFogML-Zephyr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftszydlo%2FFogML-Zephyr/lists"}