AI & Engineering
8 min read

How AI Rep Counting Works: A Technical Deep Dive

Explore how on-device AI and MediaPipe 33-point pose estimation track body kinematics, joint articulation angles, and rep depth in real time without cloud latency.

TrueRep Engineering Team
Published on 2026-10-01
All Articles

The Evolution of Workout Tracking: From Accelerometers to Computer Vision

For over a decade, fitness wearables relied on three-axis accelerometers and barometric altimeters to estimate exercise volume. While these sensors excel at linear steps and cycling cadence, they are notoriously blind to resistance training mechanics. A smartwatch cannot differentiate between a full parallel back squat and a quarter-depth knee bend. It cannot detect whether your elbows locked out on a military press or whether lumbar hyperextension occurred during a deadlift.

TrueRep was engineered to solve this fundamental telemetry gap through real-time on-device computer vision. By leveraging Google MediaPipe 3D joint landmark kinematics directly inside your phone's neural processing unit (NPU) or GPU, TrueRep measures exact anatomical articulation in three dimensions—without needing wearable straps or cloud servers.


33 3D Anatomical Landmarks: Mapping the Human Kinetic Chain

When you set your phone against a water bottle or gym wall and face the camera, TrueRep captures video frames at 30 to 60 frames per second. The on-device inference pipeline does not store or transmit raw video; instead, each frame passes through a lightweight convolutional neural network that detects **33 three-dimensional landmarks**:

  • **Head & Neck**: Nose, inner/outer eyes, ears, and mouth.
  • **Torso Core**: Left/right shoulders, hips, and cervical spine midline.
  • **Upper Limbs**: Shoulders, elbows, wrists, pinky, index, and thumb tips.
  • **Lower Limbs**: Hips, knees, ankles, heels, and toe indices.

Each landmark is represented as a coordinates vector: `P = (x, y, z, v)`, where: - `x` and `y` denote normalized screen coordinates (0.0 to 1.0). - `z` represents relative depth from the camera focal plane, inferred from perspective and anatomical limb proportions. - `v` represents landmark visibility confidence (0.0 to 1.0). If an arm is obscured or occluded, low-confidence points are filtered out via Kalman smoothing rather than producing false rep triggers.


Kinematic Angle Calculation: The Geometry of a True Rep

To calculate whether an exercise repetition is legitimate, TrueRep evaluates multi-joint vectors in Euclidean 3D space.

For any joint B flanked by adjacent anatomical points A and C (such as the knee joint K flanked by hip H and ankle A): The joint angle is calculated instantaneously using 3D vector dot product trigonometry to determine exact degrees of flexion and extension.

Deep Squat Depth Verification - **Standing lockout**: Hip-Knee-Ankle angle ~175° to 180°. - **Descent phase**: Angle smoothly decreases past 120° down to 90°. - **Parallel / Valid depth threshold**: Angle crosses 90° or below (femur parallel to floor plane). - **Ascent phase**: User returns to full extension >= 165°.

If the athlete only dips to 105° and rebounds early, TrueRep flags the repetition as a partial attempt. The rep counter refuses to increment, and the on-device voice coach issues an immediate audio cue: *"Hit full depth before ascending."*


State Machine Architecture: Preventing False Double Counts

A primary challenge in automated rep tracking is noisy oscillations at turnaround points (the eccentric-to-concentric transition). TrueRep eliminates false double counting using a robust finite-state machine (FSM) combined with hysteresis thresholds:

  • **STATE_READY**: Athlete detected in starting posture; stability check passed.
  • **STATE_ECCENTRIC**: Progressive decrease in primary joint angle beyond initiation threshold.
  • **STATE_INFLECTION**: Landmark angle achieves validated target depth and velocity approaches zero.
  • **STATE_CONCENTRIC**: Progressive ascent with positive velocity vector.
  • **STATE_COMPLETED**: Joint returns to lockout angle, confirming complete repetition.

By enforcing an angular hysteresis zone of 15 degrees, micro-movements, adjustments, or tremors under heavy load cannot accidentally trigger extra repetitions.


Zero-Cloud On-Device Processing: Why Privacy Equals Speed

Transmitting high-resolution video streams to cloud servers introduces significant downsides: - **Network Latency**: Round-trip cloud API requests take 250ms to 1200ms, making real-time voice corrections useless. - **Data Costs & Bandwidth**: Streaming 1080p video consumes gigabytes of mobile data. - **Biometric Privacy Risks**: Uploading raw video footage of your home or gym introduces unacceptable surveillance risks.

TrueRep executes all inference natively on your Android device hardware accelerators via INT8-quantized TFLite models. Camera frames are processed in volatile RAM buffers and immediately overwritten. Average frame inference takes just **14 to 22 milliseconds** on modern mid-range Android processors, enabling 45+ FPS real-time feedback with zero network traffic.


The TrueRep Advantage: Strength Ranks Tied to Form

Because TrueRep tracks exact range of motion, reps can no longer be faked. This allows the TrueRep platform to introduce competitive **Gym Strength Ranks**—from Wood all the way to Olympian. When every rep is measured by computer vision, your rank points reflect genuine biomechanical mastery.

Start Training with TrueRep Today

Put this biomechanical science into practice. TrueRep counts only honest reps with 100% on-device AI. No credit card, no sign-up, no cloud data.

Back to All ArticlesView TrueRep Features