Blog

    Human Pose Estimation: Keypoints, Repetition Counting for Remote Exercise and Why It Is Not a Diagnosis

    By GauravSeptember 9, 20269 mins read
    On this page

    Human pose estimation turns a phone or laptop camera into a way to follow body movement: a model finds points such as shoulders, hips and knees in each frame, and the app measures angles and counts repetitions from them. For remote exercise programs, that means a patient's home session can be counted and summarized.

    Founders and product leaders building exercise and rehabilitation apps will find what a pose model returns, how keypoints become joint angles and repetition counts, what breaks tracking at home, and why the output is never a diagnosis.

    What is human pose estimation?

    Human pose estimation is a computer vision technique that locates body landmarks, such as shoulders, elbows, hips, knees and ankles, in each image or video frame. Exercise apps use those landmarks to measure joint angles and count repetitions. Agnotic Technologies builds the pipeline from camera to session summary, with the clinician reviewing the results.

    Adding pose tracking to an exercise app?

    We build the landmark pipeline, rep counting and the session record a therapist can review.

    What does a pose model return for each frame?

    A pose model returns a list of landmarks for each person it finds, each with a position and a confidence score. The app works only with those numbers; the video does not need to leave the device.

    Google's MediaPipe Pose Landmarker outputs 33 three-dimensional landmarks per detected pose. Each has x and y normalized to the image width and height, a z depth relative to the hip midpoint, and visibility and presence scores from 0.0 to 1.0, while world landmarks are given in meters with the hip midpoint as origin.

    • Image landmarks: positions relative to the frame, useful for drawing a skeleton over the video.
    • World landmarks: positions in meters around the hips, more useful for angles that should not change with distance from the camera.
    • Visibility: how likely the point is visible rather than hidden behind the body or out of frame.

    How do keypoints become a joint angle?

    Keypoints become a joint angle by taking three landmarks, such as hip, knee and ankle, and measuring the angle at the middle one between the two lines that meet there. The app repeats that calculation on every frame.

    • Pick the landmarks for each joint the exercise cares about, per side.
    • Skip frames where any of the three landmarks has low visibility, rather than guessing.
    • Smooth the angle over a few frames to remove jitter, and keep the raw values for review.
    • Prefer world landmarks for angles when the camera is not square to the body.

    In the same task, the minPoseDetectionConfidence, minPosePresenceConfidence and minTrackingConfidence options each default to 0.5, and num_poses, the maximum number of poses detected, defaults to 1.

    Those defaults are a starting point. Tune them on recordings from real users at home, and record the values used with each session.

    How does repetition counting work?

    Repetition counting works as a small state machine on the joint angle: a repetition starts when the angle passes one threshold, reaches the other end of the movement, and returns past the first threshold. Two thresholds, not one, stop jitter from counting as extra reps.

    Pose estimation pipeline in four stages: the camera frame on the device goes to the pose model, which outputs landmarks with visibility, then joint angles are calculated and smoothed, then a repetition state machine counts reps into a session summary that the therapist reviews.
    Repetition states for a squat, as an example
    StateEnters whenLeaves when
    StandingKnee angle above the upper thresholdKnee angle drops below the upper threshold
    LoweringBelow the upper threshold, moving downKnee angle drops below the lower threshold
    BottomBelow the lower thresholdKnee angle rises above the lower threshold
    RisingAbove the lower threshold, moving upAbove the upper threshold: one repetition counted

    The thresholds come from the exercise definition the therapist or program sets, not from the model. Partial repetitions that never reach the lower threshold can be counted separately so the therapist sees them.

    What breaks pose tracking at home?

    Pose tracking at home breaks most often because of the camera position and the room, not the model. A short setup check before each session prevents most bad data.

    • Camera angle: a side view suits knee and hip movements, while a front view suits arm raises; the app should ask for the right one.
    • Framing: the whole body, or at least every landmark the exercise uses, must stay in frame throughout.
    • Lighting and clothing: dim rooms and loose clothing lower visibility scores for hips and knees.
    • Other people: a second person in frame can take over the tracked pose, so limit tracking to one.

    Why is pose data not a diagnosis?

    Pose data is not a diagnosis because it measures where landmarks appeared in a video, with errors that depend on the camera, the room and the person. It can show that a patient did 12 squats with a given range of movement; it cannot say why movement is limited.

    FDA's software function decision steps treat a function meant for keeping up or encouraging a healthy lifestyle as outside the device definition only when it is unrelated to diagnosing, curing, mitigating, preventing or treating a disease or condition.

    Describe outputs as counts, angles and completion, not as findings about a condition. If the product is meant to assess or treat a condition, its regulatory position needs review before launch.

    What should the session record keep?

    The session record should keep what the therapist needs to review adherence and progress, with enough detail to check a surprising result, and nothing more.

    • Exercise, side, prescribed and completed repetitions, and partial repetitions.
    • Range of each repetition as minimum and maximum angle, with the landmarks used.
    • Tracking quality: share of frames with low visibility, so poor tracking is visible.
    • Patient-reported pain or effort after the set, if the program asks.
    • Model and configuration version, so results can be compared across app releases.

    What should the patient see during a set?

    During a set, the patient should see the count, a simple cue when a repetition is partial, and a prompt if tracking is lost. Too much on screen pulls attention from the movement itself.

    • A large repetition counter and the target for the set.
    • A short cue, such as go a little lower, when a repetition does not reach the lower threshold.
    • A pause and a setup prompt when landmarks the exercise needs fall out of view.
    • An end-of-set screen asking for effort or pain, if the program uses it.

    A worked example: a home knee program

    A worked example: after a knee procedure, a patient is given a home program of sit-to-stand and heel slides. The therapist sets the target repetitions and the angle thresholds for each exercise in the program.

    Each day the patient props the phone against a chair for a side view. The setup check confirms hips, knees and ankles are visible, and the app counts repetitions on the device, sending only the session summary.

    At the weekly review, the therapist sees that sessions were completed most days, that partial repetitions are falling and that one session had poor tracking quality. The therapist calls the patient about that session and adjusts the program. The app never states why the knee moves as it does.

    Privacy: process on the device

    Run the pose model on the device where possible, and send only the landmarks or the summary to the server. Video of a person in their home is sensitive, and most programs do not need it.

    If the therapist needs video, make it an explicit choice by the patient for that session, stored separately with its own retention period.

    Landmarks are less revealing than video but are still personal data linked to a patient's health program. Encrypt them in transit and at rest, limit who can see session details, and apply the same access rules as the rest of the patient's record. If a healthcare provider runs the program, its privacy obligations, HIPAA among them where it applies, cover these records too.

    What are the common mistakes with pose estimation in exercise apps?

    The common mistakes with pose estimation in exercise apps come from trusting every frame and over-claiming what the numbers mean.

    • Counting reps with a single threshold, so jitter adds extra counts.
    • Using low-visibility landmarks, which produces impossible angles.
    • Comparing angles across sessions recorded from different camera positions.
    • Showing patients a form score that sounds clinical without validation.
    • Uploading full video by default when landmarks would do.

    How do you test pose features before launch?

    Test pose features with recorded sessions from people of different heights, builds and clothing in real home settings, with repetitions counted by a person for comparison.

    • Count accuracy: app counts compared with human counts for each exercise.
    • Angle checks: a sample of frames compared with a measured reference.
    • Setup failures: sessions with poor framing or light must trigger the setup prompt, not silent bad data.
    • Device range: run on the slowest phones the program supports.

    What does pose estimation mean for your build plan?

    Pose estimation adds an on-device model, an angle and repetition engine per exercise, a setup check and a review screen for the therapist. The exercise definitions are the real work, since each needs landmarks, thresholds and camera guidance.

    • Start with a small set of exercises and define each with the therapists.
    • Collect home recordings for tuning and testing, with consent, before launch.
    • Decide what the patient sees during a set and what the therapist sees after.
    • Agree the wording of results so nothing reads as a diagnosis.

    How Agnotic builds pose estimation features

    Agnotic builds the on-device pose pipeline, the joint angle and repetition engines, the setup checks, the session record and the therapist's review screen, and connects them to the program's existing app and records. Therapists define the exercises and judge the results.

    Counts and angles a therapist can check

    On-device landmarks, two-threshold rep counting and a session record with tracking quality.

    Sources

    Frequently Asked Questions

    Remote physical therapy and rehabilitation programs, fitness and wellness apps, and occupational health services that want to count and summarize exercise done at home.

    Talk to an engineer about your project

    Share the exercises you want to track and the devices your patients use. We will define the landmarks, thresholds and session record with your therapists.