Fitness Done Right: a Real-time Intelligent Personal Trainer for Exercise Correction

Yun Chen, Yiyue Chen, Zhengzhong TuarXiv 2019

Introduction

As the fitness industry continues to expand, the demand for accessible, professional-grade coaching has never been higher. However, many individuals exercising at home struggle to maintain proper form, which can lead to suboptimal results or physical injury. While personal trainers provide excellent guidance, their cost is often prohibitive for the average consumer.

Fitness Done Right (FDR) is a real-time system designed to bridge this gap by transforming a standard webcam into an intelligent personal trainer. By integrating multi-stage Convolutional Neural Networks (CNNs) with geometric heuristics and 3D perspective correction, FDR recognizes exercises such as planks and squats and provides immediate, actionable feedback with a remarkably low 1.2% error rate.

Overcoming Computer Vision Challenges in Fitness

Automating exercise coaching presents three significant technical hurdles:

  1. The Upright Bias: Most pre-trained pose estimation models are optimized for subjects standing or sitting. They frequently fail to detect "horizontal" poses common in exercises like planks.
  2. Occlusion: Body parts often overlap or move out of the camera's field of view during movement, causing standard trackers to lose track of the user.
  3. Perspective Distortion: A 2D camera captures a flattened version of a 3D human. Calculating precise metrics, such as a "straight back" or a "90-degree knee bend," is inherently inaccurate if the camera is not perfectly leveled and centered.

Methodology

The FDR system employs a sophisticated three-step pipeline to ensure accurate detection and correction.

The three-step pipeline of the FDR system, from initial keypoint detection to final pose correction logic.

1. Keypoint Detection

The system utilizes a two-branch multi-stage CNN (based on the OpenPose architecture) to identify 17 human joints. To optimize for real-time performance on consumer hardware, the authors removed multi-person parsing, focusing exclusively on a single user. To solve the "upright bias," FDR uses Multi-directional Recognition: it feeds rotated versions of video frames (e.g., 90-degree rotations) into the network. This allows the model to "see" a planking person as if they were standing, significantly increasing detection confidence.

2. Motion Recognition and Body Part Filling

If a joint is obscured, the system applies heuristic anthropometry—for example, mirroring the position of a visible shoulder to estimate a hidden one. To identify the specific exercise being performed, the system compares the user's pose to a "standard database" using a Hybrid Similarity Metric. This metric is a weighted combination of Euclidean distance (global position) and Angle distance (local joint configuration).

3. 3D Perspective Correction

This component is the system's "secret sauce." Using Least Square approximation, the system projects 2D coordinates into a pseudo-3D space. This "un-distorts" the user's pose, allowing the system to calculate true joint angles regardless of whether the camera is placed on the floor or at an odd angle.

Geometric representation of the perspective correction model used to calculate true joint angles from 2D camera data.

Datasets and Evaluation

The core CNN was initialized with weights from standard pose estimation models trained on the COCO and MPII datasets. For exercise-specific accuracy, the authors developed a custom Standard Database of 200 images (90 for planks, 110 for squats) to serve as the reference for "perfect form." The system's performance was evaluated over 1,000 frames of real-time video.

Key Insights and Results

  • Rotation over Retraining: The authors demonstrated that rotating input frames is a computationally cheaper and highly effective alternative to retraining models on massive datasets of horizontal poses.
  • The E-A Ratio: Optimization revealed that the ratio between Euclidean (E) and Angle (A) distance is critical. A higher E-A ratio (weighting global orientation more heavily) proved superior for planks, where the overall body line is a stronger indicator of form than individual joint angles.
  • High Accuracy and Feedback: The system achieved a 1.2% error rate in pose recognition. It successfully provides real-time text prompts such as "Hips too high" or "Weight on heels," allowing users to adjust their form mid-set.

Limitations and Future Work

Currently, FDR is optimized for planks and squats. Expanding the library to include movements like lunges or overhead presses would require a larger reference database. Additionally, the removal of Part Affinity Fields (PAF) to prioritize speed means the system cannot currently handle multiple people in the frame. Future iterations aim to refine the 3D projection for more complex, asymmetrical athletic movements and expand the exercise library.

Summary updated

BibTeX
@misc{chen2019fitness,
  author = {Yun Chen and Yiyue Chen and Zhengzhong Tu},
  title = {{Fitness Done Right: a Real-time Intelligent Personal Trainer for Exercise Correction}},
  year = {2019},
  eprint = {1911.07935},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1911.07935},
}
Figure