Computer vision · runs on your device
Every rep,
measured at the joint.
Turn on your camera and this page finds 33 landmarks on your body, measures the angle where two limbs meet, and counts a rep when you complete the range. The video is processed in your browser and never leaves your device.
The camera is off
Turn it on to be measured live, or load a video file to watch it work.
How it works
Four steps, in the order they run, about thirty times a second.
-
01
Capture
The browser reads frames from your camera. No frame is uploaded, so the demo works the same on a locked down machine.
-
02
Landmarks
A BlazePose model compiled to WebAssembly places 33 points on your body and reports how confident it is about each one.
-
03
Angle
Three landmarks make a joint. The angle between the two limbs is the measurement, drawn as an arc on the joint itself.
-
04
Rep
When the angle sweeps the full range and comes back, that is one rep. A half range movement counts for nothing.
What it measures
The same joints and the same thresholds as the Python version in the repository.
| Exercise | Joint | Landmarks | Counted range |
|---|---|---|---|
| Bicep curl | Elbow | shoulder 11 → elbow 13 → wrist 15 | 160° down to 50° |
| Squat | Knee | hip 23 → knee 25 → ankle 27 | 165° down to 70° |
Both sides are tried. If your left arm is out of frame the count follows your right, and a landmark the model is unsure about is dropped rather than guessed.
Built with
- MediaPipe Tasks Vision
- WebAssembly
- Canvas 2D
- Python
- OpenCV
- Docker
The desktop version in the repository is Python and OpenCV and counts the same reps from a webcam or a video file. This page is the same pipeline moved into the browser so it costs nothing to host and nothing to run.