Skip to content
AF
AI Motion

Lunge Detection With Pose Estimation: Landmarks, Camera, Rep Logic

Last verified October 18, 2026 · 5 min read

Sources checked (2) · October 18, 2026
A camera lunge counter follows both knee angles, front and rear, from the hip, knee and ankle landmarks. In one study's design, a repetition starts upright with both knee angles above a threshold, both drop below a second threshold as the person steps into the lunge, and the cycle closes when they extend again. The camera view moves the numbers a lot: in a 2025 study that filmed lunges from four cameras 45 degrees apart, OpenPose's knee-angle error against marker-based capture ranged from 15.50 to 29.44 degrees RMSE by view, and one participant's knee angle at the same instant read anywhere from 51.5 to 99.3 degrees depending on the camera.

Covered here:MediaPipe

This page is the lunge layer under how rep counting works and 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#

  • Baldinger and colleagues (Sensors, 2025) had 20 healthy adults perform six front lunges each while four iPads, placed at 45° intervals around them, filmed them and a laboratory with 12 Vicon cameras measured them. Data from 16 participants were analysed, comparing knee, hip, elbow and shoulder angles from OpenPose's 25-keypoint model with the marker-based angles.
  • Sousa and colleagues (Journal of Functional Morphology and Kinesiology, 2026) counted lunges among 12 exercises with angle-threshold state machines on MediaPipe landmarks.

Landmarks and angles#

Sousa and colleagues' lunge module reads the front and the rear knee angle together. Baldinger and colleagues computed the knee angle from OpenPose's RHip, RKnee and RAnkle keypoints, and the hip angle between the line from RHip to RKnee and the line from MHip to Neck.

Every keypoint scheme on this site has hips, knees and ankles, so the knee angles are available from any model. The hip definition above needs a mid-hip and a neck point: OpenPose BODY_25 has MidHip and Neck, while COCO 17 and BlazePose 33 have neither, so in our reading you would average the two hips and the two shoulders instead and re-tune any threshold.

Where to put the camera#

Baldinger and colleagues put their cameras between the frontal and sagittal views on purpose, to represent people training at home or in rehabilitation who may have only one smartphone camera. Agreement (ICC) for the knee angle was excellent from all but the front-left camera, which reached only good agreement, and the authors' overall reading is that back-viewing cameras performed best and gave the lowest percentage deviations. Where a sagittal or frontal view will not capture the full range of motion, they suggest a back-viewing camera rather than a front-viewing one, and they conclude that each movement needs a detailed examination before anyone recommends a camera angle for it.

The view changed the measurement itself. For one participant at the same instant, the turning point of the lunge, the knee angle read 56.9° from the front right, 51.5° from the front left, 99.3° from the back left and 68.2° from the back right. The authors found no keypoint estimation errors behind this, only the perspective of 2D joint angles. They also note that occlusions of the lower body are rare in perfect sagittal or frontal views, and that the front-left camera had the worst view of the right leg.

Sousa and colleagues, counting rather than measuring, note that their pose model's performance can degrade when camera angles deviate from frontal or lateral views.

A rep state machine for lunges#

Sousa and colleagues' lunge has three phases: standing upright with the front and rear knee angles above one threshold, stepping into the lunge as both knee angles drop below a second, and returning as they extend again. Requiring both knees is, in our reading, what stops one bent knee during a step or a stumble from completing a cycle, and the gap between the two thresholds is the hysteresis from how rep counting works.

Baldinger and colleagues' protocol alternates legs: the front leg pushes back to the start, then the exercise resumes with the contralateral movement. Decide whether your product counts one lunge per leg or per pair before you write the state machine. They smoothed their joint angles with a Savitzky–Golay filter, third order with a window length of 15, chosen because it removes keypoint noise while preserving the peaks and valleys of the signal; their video ran at a mean of 43 fps. They also propose biomechanical constraints, restricting joint angles to anatomical limits and penalising unrealistic angles or large jumps between consecutive frames.

When no phase matches, Sousa and colleagues keep the last valid phase for a short window, typically 3 to 5 frames, instead of immediately falling back to no phase.

Failure modes the studies report#

  • Perspective at full depth. Baldinger and colleagues' largest deviations came at the peaks of the movement, when the joints are at their full range of motion, which is exactly where a bottom threshold sits.
  • The wrong view. The front-left view gave the weakest agreement, and the shoulder angle agreed only poorly to moderately with the marker-based system from almost every view.
  • Views off the frontal or lateral axis. Sousa and colleagues note that small landmark errors there lead to incorrect or delayed state transitions.

Pose estimation accuracy covers the general causes and 2D vs 3D pose estimation what estimated depth can add.

What was measured, and why it will not transfer#

  • Baldinger and colleagues' OpenPose knee-angle RMSE ranged from 15.50° to 29.44° by camera view and the hip angle from 15.20° to 25.25°, while knee-angle agreement (ICC) stayed good to excellent, at 0.86 to 0.96. The authors read high correlation as similar waveforms and trends, so in our reading the shape of the knee-angle curve survives a change of view better than its absolute values do.
  • Across all joints and views, the average deviation from the marker-based angles ranged from 15.2° to 36.48°.
  • They recorded in a laboratory with constant artificial light and the blinds closed, at 1194 × 834 pixels, with participants in close-fitting clothes.
  • Sousa and colleagues' counter detected every lunge repetition in their test set, which held 21 lunge videos: 3 they recorded and 18 from competition and online footage. Perfect scores on a set that small say little about a new population.

None of this transfers on its own to another model, camera position or group of users. Testing a rep counting algorithm covers building your own test set.

Frequently asked questions

Which camera angle works best for tracking lunges?
In Baldinger and colleagues' 2025 study with four cameras between the frontal and sagittal views, back-viewing cameras performed best and the front-left view was weakest, and the authors advise examining each movement before recommending a camera angle. Sousa and colleagues note that their pose model can degrade when the camera deviates from frontal or lateral views, so test the placement you plan to ship.
Should a lunge counter track one knee or both?
Both. Sousa and colleagues' lunge module requires both the front and rear knee angles to drop below a threshold to enter the lunge and to extend above one again on the return, which in our reading keeps a single bent knee from completing a cycle. Your counter also has to decide whether one rep is one leg or a left-right pair, because a protocol like Baldinger and colleagues' alternates legs.
How accurate are 2D knee angles during a lunge?
Not very, unless the view is controlled. Baldinger and colleagues measured OpenPose knee-angle RMSE of 15.50 to 29.44 degrees against marker-based capture depending on the camera, with the largest deviations at the bottom of the lunge. That is enough to move a bottom threshold, so calibrate thresholds per camera placement.

All 121 questions in AI Motion →

Keep reading

Elsewhere on the site

Pages that share this one’s concepts and sources, from other sections.

Next steps

Was this page useful?

Independent comparison, last reviewed October 18, 2026. Pricing, rate limits, and feature availability change often — confirm current details in each provider’s official documentation before you commit. Product and company names are trademarks of their respective owners; AIFitnessAPI is not affiliated with, endorsed by, or sponsored by any product listed here.

← All ai motion · by AIFitnessAPI