Pushup Form Tracker
Phone or laptop on the floor, side-on (facing either way), whole body in frame, one person.
Controls
Nothing loads until you press a button.
Your camera (mirrored) or the demo clip appears here with the skeleton, the rep count and the form verdict drawn on top.
- 0good reps
- —
How it decides
Do pushups and the page counts every rep and tells you why a rep was bad (hips sagging, hips too high, knees down, dropped to the floor, too shallow). Everything runs on your device: the pose model is downloaded once (about 20 MB) and no frame is ever uploaded. Ported from the Python original.
What it watches
MediaPipe PoseLandmarker (full) finds 33 body points on every frame, on your GPU when available.
What counts as a rep
Shoulder height tracks the movement. A rep is top → bottom → top; the dip must be at least a quarter of your torso length (shallower dips say "go lower" and do not count). Standing up, walking into the frame or dropping from a plank onto your knees to rest never count; a knee pushup (knees on the floor from the start) counts as an attempt and is graded "knees down".
How form is judged
Form is judged by geometry, in units of your own torso length so the camera distance and the way you face do not matter. Just before the descent and at the bottom: hips more than a fifth of a torso below the shoulder–ankle line is "hips sagging", above it is "hips too high", a knee angle under 130° is "knees down". At the bottom, averaged over the frames spent there: elbows still level with the shoulders (the body came down without the arms bending back) is "dropped to the floor", and a chest kept half a torso above the hands while the hips hang a fifth below the shoulders is "hips sagging" too.
When counting pauses
While a placement hint is on screen (head or feet cut off, two people, frontal view, too dark) counting is paused and the skeleton turns grey, so a half-visible body cannot produce a silent wrong count.
| Measure | Threshold | Then |
|---|---|---|
| Dip depth | ≥ 0.25 T | counts as a rep; below that, "go lower" |
| Hip below the shoulder–ankle line | > +0.18 T | hips sagging |
| Hip above that line | < −0.26 T | hips too high |
| Knee angle | < 130° | knees down |
| Body angle to the horizontal | ≤ 30° | counts as a plank |
| Elbow still level with the shoulder at the bottom | > −0.09 T | dropped to the floor |
| Chest above the hands at the bottom | > 0.50 T, hips > 0.20 T below | hips sagging |
| Guessed head cluster | < 0.13 T | head out of frame |
| Frame brightness | < 0.12 | too dark |
Tips
- Camera at roughly floor level, whole body in frame, side view, one person. The overlay tells you when the head or feet are cut off, when two people are in the frame, when you face the camera instead of side-on, and when it is too dark.
- The first rep counts: there is no calibration, the range is measured against your own body.
- Limits: a frontal view is not graded (you get a "turn side-on" hint instead). A sag, a pike, kneeling and a body dropped onto the floor with the arms straight are caught; a rep that rests on the floor and pushes the chest up first with the arms properly bent looks like a clean rep to 2D landmarks and is counted as one.
- No camera? The demo clip runs the exact same pipeline on a short recording: 4 attempts, of which 2–3 are clean by a coach's eye; the last one (chest up before the hips) is a mild "worm" that the geometry lets through.