https://github.com/gurkengewuerz/microcontroller-tensorflow
Tensorflow lite used on a SAMD21 microcontroller in the arduino framework for activity recognition
https://github.com/gurkengewuerz/microcontroller-tensorflow
arduino microcontroller platformio samd21 tensorflow tensorflow-lite tensorflow-lite-micro
Last synced: about 1 month ago
JSON representation
Tensorflow lite used on a SAMD21 microcontroller in the arduino framework for activity recognition
- Host: GitHub
- URL: https://github.com/gurkengewuerz/microcontroller-tensorflow
- Owner: Gurkengewuerz
- License: agpl-3.0
- Created: 2021-07-01T11:58:12.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-02T00:08:55.000Z (almost 4 years ago)
- Last Synced: 2025-02-03T17:47:59.021Z (3 months ago)
- Topics: arduino, microcontroller, platformio, samd21, tensorflow, tensorflow-lite, tensorflow-lite-micro
- Language: C++
- Homepage:
- Size: 1.42 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tensorflow Lite Micro examples
This repository is an example how to use tensorflow with a microcontroller.
The example is using a `GY521` sensor to detect and recognise *standing*, *walking* and *running*.
The code can recognise and also collect new data to a SD card. Everything is visible on a simple SSD1306 OLED display.## ⚠ **Warnings** ⚠
### ModelThe current model is currently not correctly trained. Because this is just an example i haven't collected enough data.
### On update
Please check on every update if the output by train.py equals the array `ACTIVITIES` in `main.cpp`. The indexes must match! Also check if the features are in the correct order.
## Repo structure
- `data` - this directory is for the data processing
- `processed` - output directory for `train.py`
- `model_data.cpp` - tensorflow lite model **auto generated** by `train.py`
- `raw_data` - this directory holds all raw data collected by the microcontroller
- `*.csv`
- `requirements.txt` - python module requirements
- `train.py` - python code to generate a tensorflow model
- `src` - microcontroller code
- `NeuralNetwork.cpp` - Tensorflow lite Wrapper by [@atomic14](https://github.com/atomic14/tensorflow-lite-esp32/blob/master/firmware/src/NeuralNetwork.cpp)
- `main.cpp` - main arduino framework code## The Arduino_TensorFlowLite library
To get the newest tensor flow lite library for the Arduino framework just visit [this repository](https://github.com/antmicro/tensorflow-arduino-examples) and download the newest `tflite-micro` folder.