This example demonstrates how to use ESP-IDF to collect channel state information data from microcontroller and run machine learning models. The device has to collect data and run models in order to predict if person in room is sitting near desk, lying on bed or staying.
Currently only Xiao ESP32-S3 Sense module tested.
- Collecting data is done by using app that reads json data from serial port. It will be published in future.
- Collected data is in the format of array that consists of 112 bytes (int8_t).
- Tensorflow (MLP-NN, CNN)
- Models were trained using Tensorflow, saved to
.tfliteformat. - Then translated to C++ using
xxdcommandxxd -i .\model.tflite > model.cc.
- Models were trained using Tensorflow, saved to
- Alglib (Forest)
- Model was trained and saved to
.binformat.
- Model was trained and saved to
- Features - 21 statistical features from amplitude and phase, used only in NN and forest.
| Arguments | Alias | Options | Description |
|---|---|---|---|
| --mode | -m | collect forest nn cnn |
You can choose mode |
| --amount | -a | <amount> |
Amount of packets to be sent |
| --benchmark | -b | none |
Shows memory usage |
Usage
csi -m collect -a 20- Setup your wifi connection by copying
secrets.h.templateassecrets.hto main folder. - Edit
secrets.hfile and set your wifi credentials. - Run
idf.py build
idf.py flash
idf.py monitor