A trainer that counts your curls from the angle of your elbow
- Python
- Flask
- OpenCV
- MediaPipe
- Chart.js
- Role
- Solo, end to end
- The dashboard, the Flask backend and the tracking
- Stage
- Exploration, personal
- A working prototype on my own webcam
- Counts
- Bicep curls
- From the elbow's angle, with MediaPipe
- Stack
- Flask + MediaPipe
- OpenCV for the camera, Chart.js for the charts
The idea
FitPro is a fitness dashboard with a trainer built in: your webcam watches your arm and counts your bicep curls as you do them. I designed and built it on my own in April 2025, with Flask streaming the tracked camera feed straight into the page.
How it works
MediaPipe finds the shoulder, the elbow and the wrist in each frame. The app takes the angle at the elbow, between the line up to the shoulder and the line out to the wrist, and reads it against two thresholds instead of one.
- DownOver 160°, the angle is obtuse and the arm is straight, so the stage resets to down
- UpUnder 30°, the angle is acute and the arm is curled; if the stage was down, it turns up and counts one rep
- Why twoA curl only counts after the arm has straightened again, so a half rep, or a wobble around one threshold, never counts twice
Around it
Around the camera is a dashboard: a workout calendar, and charts for calories, training and sleep. The charts are still on sample data; the counting is the part that's real.
What's real
It counts one exercise, bicep curls, on one arm. The angle comes from each point's position in the picture, not in depth, so it's the angle the camera sees rather than the arm's true one.