A small experiment in using computer vision and MediaPipe to count strength training reps from regular videos.
This project was originally built for a live presentation at PyLadies ATX.
As a product designer, this project was also an opportunity to explore interface possibilities, user flows, and vision tools can support better training experiences.
- There is no simple or affordable way to automatically count repetitions from regular workout videos.
- People, trainers, and coaches often rely on manual counting, which is slow and prone to human error.
- When training alone, it is difficult to track proper form or monitor progress consistently.
The solution uses MediaPipe Pose to detect body landmarks frame-by-frame, compute joint angles, and determine when a full repetition has occurred.
The development flow followed three steps:
-
Exploration
Useview_landmarks_video.pyto confirm that MediaPipe Pose is working and that the skeleton appears correctly over each frame. -
Data and Debugging (optional)
Useextract_keypoints.pyto export landmarks and angles to CSV in order to inspect the raw values and understand the movement better. -
Rep Counting
Userep_counter-ml.pyto apply angle thresholds and detect full repetitions in real time based on the video input.
rep_count-ml/ │ ├── data/ │ └── videos/ │ ├── curls_presses_dumbells_....mp4 │ ├── lateral_raise_shoulder_....mp4 │ ├── ... │ └── *_keypoints.csv ├── extract_keypoints.py ├── view_landmarks_video.py ├── rep_counter-ml.py ├── README.md
Slides used during the PyLadies ATX presentation: rep-count.pdf