HIIT PI is a Dash app that uses machine learning (specifically pose estimation) on edge devices to help track your HIIT workout progress in real time (~30fps). The backend runs everything locally on a Raspberry Pi while you interact with the app wherever there is a web browser connecting to the same local network as the Pi does.
- Raspberry Pi (Pi 4 recommended)
- Raspberry Pi Camera Module v2
- Google's Coral USB Accelerator (Edge TPU)
- Raspbian 10 Buster
- Python 3.7+
- TensorFlow Lite
- Edge TPU runtime
- Dash, Flask, Plotly
- Redis
- PiCamera, OpenCV, ...(more in
requirements.txt
)
- SSH into your Raspberry Pi and clone the repository.
- Set up a working environment with dependencies listed above before running the app by
$ python app.py
- Go to
<your_pis_ip_address>:8050
on a device in the same LAN as the Pi's, and then enter a player name in the welcome page to get started. - The live-updating line graphs show the model inferencing time (~50fps) and pose score frame by frame, which indicates how likely the camera senses a person in front.
- Selecting a workout from the dropdown menu starts a training session, where your training session stats (
reps
&pace
) are updating in the widgets below as the workout progresses. Tap theDONE!
button to complete the session, orEXIT?
to switch a player. ClickLEADERBOARD
to view total reps accomplished by top players.
- This project currently has implemented a couple of workouts to play with, and we're planning to add more later.