Skip to content

Jaromc/esp32_movement_tflite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESP32 Axis Prediction Using TFLite

This example shows a working example of the ESP32 using tensorflow lite to predict yaw, pitch and roll movements.

Hardware Used

  • FireBeetle 2 ESP32-E
  • HMC5883L Compass

picture

Instructions

  • Gather your IMU training data and save to a csv file. imu.csv contains data formatted from a previous project.
  • I prefer to load my environment using docker: docker run --gpus all -it --rm -v <this folder>:/tmp tensorflow/tensorflow:latest-gpu bash
  • Run the training script: python3 train.py
  • Convert the model to a byte array with:
    echo "const unsigned char model[] = {" > model.h
    cat movement_model.tflite | xxd -i >> model.h
    echo "};" >> model.h
  • Include the generated model.h in to the sketch folder then compile and upload.

Result

Output confusion matrix showing actual vs predicted test picture

References

About

ESP32 using tensorflow lite to predict yaw, pitch and roll movements

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published