---
title: "Pull-Up Counter With Computer Vision: Landmarks, Camera, Rep Logic"
canonical: "https://aifitnessapi.com/motion/pull-up-counter-computer-vision"
cluster: "AI Motion"
primary_query: "pull up counter computer vision"
last_reviewed: "2026-10-18"
description: "Counting pull-ups from a camera, per the studies: finding the bar from the hands, mouth or chin over the bar, elbow thresholds, rep logic and accuracy."
publisher: "AIFitnessAPI — independent, not sponsored"
cite_as: "\"Pull-Up Counter With Computer Vision: Landmarks, Camera, Rep Logic\", AIFitnessAPI, https://aifitnessapi.com/motion/pull-up-counter-computer-vision"
---

# Pull-Up Counter With Computer Vision: Landmarks, Camera, Rep Logic

> A camera pull-up counter has to find the bar as well as the body: in a 2025 study, the system estimated the bar's height from the hands, which hold still once they grip it, and counted a repetition when the mouth rose above that height after a low position with the elbows extended past a 150-degree threshold. That system counted 96.6% of pull-ups correctly against human assessors, and a 2026 rule-based study counted every pull-up in its test set. Treat both studies' thresholds as starting points to calibrate for your camera, model and users.

- Canonical: https://aifitnessapi.com/motion/pull-up-counter-computer-vision
- Last reviewed: 2026-10-18
- Publisher: AIFitnessAPI (https://aifitnessapi.com) — independent, not sponsored
- Cite as: "Pull-Up Counter With Computer Vision: Landmarks, Camera, Rep Logic", AIFitnessAPI, https://aifitnessapi.com/motion/pull-up-counter-computer-vision

---

This page is the pull-up layer under [how rep counting works](/motion/how-rep-counting-works) and [how form feedback works](/motion/how-form-feedback-works): landmarks, camera placement, rep logic and what the two studies we read on October 18, 2026 measured. Each number is one study's result under that study's conditions, so use it as a starting point to calibrate for your camera, model and users. This is engineering guidance for building a tracker, not exercise or medical advice.

## The studies behind this page

- **Lei and colleagues** (Sensors, 2025) built a fixed-camera assessment system on [MediaPipe](/motion/mediapipe-pose-landmarker-models)'s BlazePose landmarks with state machines for pull-ups, push-ups and sit-ups, and compared its pull-up counts with repetitions recorded by experienced human assessors.
- **Sousa and colleagues** (Journal of Functional Morphology and Kinesiology, 2026) counted pull-ups among 12 exercises with angle-threshold state machines on MediaPipe landmarks. Their pull-up videos were 4 they recorded and 26 from public pose datasets.

## Landmarks and angles

Lei and colleagues judge the pull-up from heights as well as an angle: the mouth against the height of the bar for the top, and the eyes plus the elbow angle for the bottom. Sousa and colleagues use the elbow and torso angles and require the chin to move above the bar, and they also check that the body moves up and down along a consistent vertical axis.

Every keypoint scheme on this site has shoulders, elbows and wrists. The face is where they differ: [BlazePose 33](/pose-keypoints/blazepose-33) has mouth corners and eyes, while [COCO 17](/pose-keypoints/coco-17) has the nose, eyes and ears but no mouth, and neither has a chin point. In our reading, a chin-over-bar test therefore needs a proxy, such as the mouth points Lei and colleagues used or the nose on a COCO 17 model, and a threshold re-tuned for it.

## Where to put the camera

No study we read specifies a camera position for pull-ups. Lei and colleagues dedicate one camera to each person and recommend one camera per person when several people are tested at once, and their calibration-free system estimates the bar's height from the video rather than from a measured set-up. They add that the design is potentially vulnerable to large changes in viewing perspective or camera position. In our reading, the frame has to hold the hands on the bar at the top and the fully extended arms at the bottom, so frame the person's full reach before anything else.

## A rep state machine for pull-ups

Lei and colleagues find the bar first. Once the test-taker grips it, the height of the hands stays constant, so they compute the variance of hand height in sliding windows, keep the windows below a variance threshold, and take the one with the highest average height as the bar. They derive the eye-height threshold the same way, from the stable height after the test-taker mounts the bar.

Their state machine has a high state, a low state and two transition states. The judgment function returns up when the mouth is above the bar height, and down when the eyes are low enough, below the elbows in their pseudocode and below the eye-height threshold in their figures, and the elbow angle is above its threshold, set at 150 degrees as an empirical value to encourage fully extended elbows at the bottom. Each counted repetition is one pass from State4 through State3 to State1, so a pull that never brings the mouth over the bar, or a descent that stops short, does not count. Before any of this, they correct keypoints that jump between frames and smooth them over a 10-frame window.

Sousa and colleagues' pull-up has three phases: a start with the arms fully extended, the elbow angle above a threshold and the torso upright; pulling, with the elbows flexed below a lower threshold, the chin above the bar and the torso allowed to lean slightly; and lowering, with the elbows re-extended and the torso upright again. The gap between the extension and flexion thresholds is the hysteresis described in [how rep counting works](/motion/how-rep-counting-works), and their phase persistence keeps the last valid phase for typically 3 to 5 frames when no phase matches.

## Failure modes the studies report

- **Different people.** Lei and colleagues found accuracy relatively high among test-takers with high physical fitness levels and slightly lower among ordinary college students and teachers.
- **Incomplete repetitions.** In a non-standard pull-up test, their system scored 4 because the mouth did not exceed the bar on the way up and the eyes did not drop below the threshold on the way down.
- **Flying points.** Keypoints jumped when occlusion occurred or lighting was poor, which their correction step targets.
- **A moved camera.** Their calibration-free design is potentially vulnerable to large changes in viewing perspective or camera position.

The general causes are in [pose estimation accuracy](/motion/pose-estimation-accuracy).

## What was measured, and why it will not transfer

- Lei and colleagues report an overall pull-up counting accuracy of 96.6%, defined as correctly recognised repetitions over the actual repetitions recorded by human assessors.
- Sousa and colleagues report perfect detection (100%) for pull-ups on their 30 pull-up videos.

Both results come from small test sets, and each depends on its own thresholds and camera. Neither predicts your app's accuracy; [testing a rep counting algorithm](/test/rep-counting) covers how to measure it.

## Sources

- [pmc.ncbi.nlm.nih.gov/articles/PMC12610833/](https://pmc.ncbi.nlm.nih.gov/articles/PMC12610833/) — Lei et al., Sensors 2025: bar-height estimation, pull-up states and thresholds, keypoint correction and pull-up accuracy (read as Europe PMC's XML). (checked 2026-10-18)
- [pmc.ncbi.nlm.nih.gov/articles/PMC13204307/](https://pmc.ncbi.nlm.nih.gov/articles/PMC13204307/) — Sousa et al., J Funct Morphol Kinesiol 2026: pull-up phases, vertical-axis check, phase persistence and pull-up results (read as Europe PMC's XML). (checked 2026-10-18)

## FAQ

### How does a pull-up counter know where the bar is?

In Lei and colleagues' 2025 system, it does not need to be told. Once the hands grip the bar, their height stays constant, so the system looks for sliding windows with low variance in hand height and takes the stable window with the highest average height as the bar.

[Permalink](https://aifitnessapi.com/motion/pull-up-counter-computer-vision#faq-1)

### What counts as the top of a pull-up for a camera counter?

Lei and colleagues count the top when the mouth rises above the estimated bar height, and Sousa and colleagues require the elbows to flex below a threshold with the chin above the bar. Neither BlazePose 33 nor COCO 17 has a chin point, so a chin test needs a proxy such as the mouth or nose.

[Permalink](https://aifitnessapi.com/motion/pull-up-counter-computer-vision#faq-2)

### How accurate is camera-based pull-up counting?

Lei and colleagues counted 96.6% of pull-ups correctly against human assessors, with lower accuracy for ordinary students and teachers than for very fit test-takers, and Sousa and colleagues counted every pull-up in 30 videos. Both are small samples, so measure your own counter.

[Permalink](https://aifitnessapi.com/motion/pull-up-counter-computer-vision#faq-3)
