Methodology

LungeLab utilizes a custom-engineered pipeline that integrates AI-based Computer Vision with Computational Biomechanics to quantify high-velocity fencing kinematics. Utilizing the MediaPipe Pose framework, LungeLab extracts 2D body landmarks frame by frame and applies a rule-based event-detection algorithm to identify lunge initiation and completion. All spatial measurements are then normalized using a torso-derived body-scale reference computed from upper-body landmark geometry. The system computes four primary kinematic metrics and maps them to bounded reference ranges derived from biomechanics literature to produce deterministic five-point scores.

Pose Landmark Detection using MediaPipe

Video Data Collection

MediaPipe Pose is a Machine Learning (ML) solution for high-fidelity body pose tracking, inferring 33 3D landmarks and background segmentation mask on the whole body from RGB video frames. It detects body landmarks in a video by processing it frame by frame using a specialized ML model (the Pose Landmarker task) in conjunction with video processing libraries like OpenCV. (Google AI for Developers)

In this project, each video frame is processed using the MediaPipe ML model to detect the fencer's body pose. Out of the 33 landmarks provided by MediaPipe, 17 key landmarks were selected for pose analysis. For each video frame, the detected 17 landmarks are stored as a single row in a Pandas DataFrame. Each column contains the (X, Y) coordinates and the Visibility score of a landmark. As a result, the complete DataFrame represents the fencer's pose over the entire video, with each row corresponding to one frame.

How the Lunge is Detected

Pose Estimation

Lunge initiation is identified as the frame with the greatest distance between the front-hand and back-foot. Distance between ankles is also compared with height to confirm the fencer is initiating a lunge.

Lunge completeion is identified as the frame where the knee is farthest forward, 133 milliseconds (8 frames @ 60fps) after initiation.

Note: All distances are divided by the torso-derived body-scale reference (Avg torso diagonal x 2) to remove camera distance and angle bias.

How the Lunge is Scored

Each of four metrics listed below will be scored out of five.

Each metric is scored on a 5-point scale with a defined ideal measurement value and upper-lower bounds derived from biomechanical literature.

Metrics with two biomechanical dimensions use the average of the individual dimension scores received from each dimension.

Lunge Biomechanical Metrics

• Knee-Heel Alignment

• Trunk Balance and Posture

• Front-leg Extension (Knee Flexion Proxy)

• Horizontal Lunge Displacement (Lunge Effectiveness Proxy)

1. Knee-Heel Alignment

Pose Estimation

The Knee-Heel Alignment is the angle measure formed by the front knee, heel and toe.

Smaller angles indicate anterior knee placement. A measurement near 80 degrees prevents knee injuries and unecessary patellar tendon stress, earning five stars.

2. Trunk Balance and Posture

Lunge Phase Segmentation

Trunk Balance takes into account the body inclination measured by the angle between the front-knee, back-hip, and back-shoulder, as well as the distance between the back-arm wrist and back-hip.

Smaller angles signal excessive forward lean, placing strain on the lower back. Smaller distance can indicate improper non-dominant arm extension, leading to the athlete being off-balanced. A body angle larger than 60 degrees and a wrist to hip distance of greater than 0.3 times the fencer's height will earn a score of five stars.

3. Front-leg Extension (Knee Flexion Proxy)

Joint Angle Analysis

The Front-leg Extension takes into account the angle measured between the front hip, knee, and ankle, and the distance between the ankles at lunge completion relative to height.

Larger angles and excessive distances signal potential overstretch, which can lead to extensive hamstring strain during landing and recovery phases. A knee angle of 90 degrees or below and a distance to height ratio of 1.1 or below earns a five.

4. Horizontal Lunge Displacement (Lunge Effectiveness Proxy)

Balance and Stability Metrics

Horizontal Displacement considers the distance between the ankles at lunge completion and dividing that by the distance between the ankles of the prepatory step (smallest ankle distance during one second prior to the lunge initiation), as well as dividing the ankle distance at lunge completion by the fencer's height

A reasonably small prepatory step usually results in a more efficient transfer of power in the horizontal direction. A lunge to prepatory step distance ratio of 2.7 or above and a lunge to height ratio of 1.1 or above will score five stars.