Under the hood

How an AI Push-up Counter Works (and Why Most Get It Wrong)

Pose detection, joint angles and a rep cycle: a plain-English look inside an AI push-up and squat counter, from 33 landmarks to a Perfect grade.

In one paragraph: the camera feeds frames to an on-device pose model that finds 33 body landmarks. The app measures the angles that define the exercise (elbow for push-ups, knee and hip drop for squats), smooths them, and runs them through a rep cycle with three thresholds: an attempt, a counted rep and a good rep. Each finished rep gets a grade and, if it failed, a reason.

“AI push-up counter” covers a wide range of apps, from ones that genuinely understand your body position to ones that count anything that moves up and down. Here is how ours works, step by step, and the design choices that separate an honest counter from a generous one.

Step 1: Find the body

Each camera frame goes through a pose-detection model running on the phone. It outputs 33 landmarks: points for the nose, eyes and ears, shoulders, elbows, wrists, hands, hips, knees, ankles, heels and toes, each with a confidence score.

When the phone supports it, the model also returns 3D world coordinates, an estimate of where each joint is in space rather than just on the screen. That matters, because angles measured on a flat image change with camera angle. 3D angles hold up whether the phone sees you from the front, the side or a diagonal.

Points with low confidence (for example a wrist hidden behind your body) are ignored rather than guessed.

Step 2: Check the posture

Before counting anything, the judge asks a simpler question: is this person actually in a push-up position? It uses several signals so that it is robust to camera angle:

  • Body shape: the box around shoulders, hips and ankles should be wider than it is tall. In a plank you are horizontal; standing, you are tall and narrow.
  • Body line: the shoulder-hip-ankle angle should be close to straight, which rules out kneeling and sitting.
  • Hand support: the wrists should be at or below shoulder level, hands on the ground.

That posture gate is fixed. It is not a difficulty setting and it never adapts, because “are you doing a push-up at all” should not depend on who you are.

Step 3: Measure the angle that matters

For a push-up that angle is the elbow, shoulder to elbow to wrist, on both arms. For a squat it is the knee, hip to knee to ankle, plus how far the hips drop relative to your own standing height.

Raw angles jitter from frame to frame, so they are smoothed with an exponential moving average: each new reading is blended with the previous smoothed value. Too little smoothing and noise looks like reps; too much and fast reps blur together. The push-up and squat each have their own setting.

Step 4: Run the rep cycle

The smoothed angle is converted into a depth between 0 (arms straight) and 1 (full depth, elbows at about 100 degrees). A rep is a full cycle through three thresholds:

ThresholdPush-up depthElbow angleWhat happens
Attempt0.4about 130°Below this the dip is ignored: not a rep, not a fail
Counted0.7about 115°The rep counts
Good0.97about 101°Eligible for Perfect and combos

Then you have to come back up past the lockout angle (about 135° for push-ups, 145° for squats) before the next rep can start. That rule is what stops bottom-half pulsing from scoring. The judge also learns your personal resting angle and can relax lockout slightly for people whose joints do not fully straighten.

Squats add a hip drop rule: the hips have to fall at least 10% of your standing hip-to-ankle height. It is measured relative to you, so it works at any distance from the camera, and it stops a knee wobble from counting.

Step 5: Grade it

Every completed rep gets a quality score from 0 to 100 and one of three grades:

  • Perfect: counted, good depth, quality 90 or above. Earns the most XP and, in a duel, deals double damage.
  • Valid: counted.
  • Invalid: attempted but failed, with a reason such as “go lower”, “lock out” or “hips shifted to one side”.

From a front view the judge also compares left and right. If one elbow or knee bends more than about 20 degrees more than the other, the rep fails as one-sided.

Why most counters get this wrong

The easiest way to build a rep counter is to track one point (the nose or the shoulders) and count every time it goes down and up. It works in a demo. In real life it counts head nods, half reps and bounces, and it breaks as soon as the camera angle changes.

The second easiest way is to use angles but set the thresholds loose, so nobody gets frustrated. That feels great for a week. Then you notice your “100 push-ups” were really 60, and any leaderboard built on it is meaningless.

We chose to be strict and transparent instead: publish the thresholds, show the reason for every failed rep, and tune the numbers against labelled recordings of real sets.

What happens after the rep

On-device counting means your video never leaves the phone. What gets saved is the result: reps, grades, form score, XP. For duels, the match server plays by the same scoring constants as the app, and submitted sessions are re-checked server-side. Sessions that fail those checks are voided and removed from every board, which is what keeps the world push-up leaderboard meaningful.

Try it

The best way to understand a camera judge is to argue with one. Do a set, look at which reps it refused and why, and compare with the checklist in proper push-up form. Then take it into a push-up duel.

FAQ

How does an AI push-up counter work?

It runs a pose-detection model on each camera frame to find body landmarks such as shoulders, elbows and wrists, measures the joint angles between them, and follows the angle through a rep cycle: down past a depth threshold, then back up past a lockout threshold. Only a full cycle counts as a rep.

Does an AI rep counter need the internet?

Not for counting. In League of Pumps pose detection runs on the phone, so reps are counted on-device. The internet is only needed to save results, play duels and update leaderboards.

Can an AI push-up counter be fooled?

A motion-based counter can be fooled by bobbing your head or shoulders. An angle-based one is much harder to fool because it checks posture and joint angles, and League of Pumps also re-checks sessions on the server and voids suspicious ones.