Work · KhiladiPro · R&D → Production

Smash.

Badminton smash biomechanics analysis on 240 FPS mobile capture — a dual-output pipeline that classifies the smash into 6 kinematic phases at 95% accuracy and measures shuttle exit speed at 90% accuracy versus ground truth. MediaPipe Pose for the body, TrackNet for the shuttle, a Savitzky-Golay denoiser between them — coach-grade biomechanics without a mocap lab.

Phase Classification
95%
Speed Accuracy vs GT
90%
Capture Format
240 FPS mobile
Status
R&D → Production
01 / The Problem

Smash biomechanics belongs in a mocap lab. We needed it on a phone.

Cricket bowling has a mature biomechanics framework — six well-defined phases (run-up, impulse, jump, back-foot contact, front-foot contact, release, follow-through), each with its own measurable kinematics. Coaches use it. Sports scientists publish papers about it. Badminton smash analysis, by comparison, was nowhere close to that maturity.

The hypothesis going in (from the original R&D ticket): "Can we replicate bowling side-action analysis to badminton smash?" The answer turned out to be yes, with adaptations — but the harder problem was making the analysis run on 240 FPS mobile capture, not lab-grade motion capture rigs. Coaches at academy level don't have mocap labs. They have phones.

The job: take MediaPipe Pose (33 skeletal keypoints, mobile-friendly) and our production TrackNet shuttle detector (TFLite, on-device), fuse them into a single biomechanics pipeline, and produce coach-grade metrics. No external sensors. No mocap markers. Just a phone, a tripod, and a 240 FPS recording.

02 / Dual Output

Two outputs from one pipeline.

The same 240 FPS clip produces two independent measurements: a temporal segmentation of the smash motion into six biomechanical phases, and an event-driven measurement of the shuttle's exit speed at the contact moment. Both run from the same MediaPipe + TrackNet substrate.

— Output 01 · Phase Classification
95%

6-phase kinematic segmentation

State-machine-driven segmentation on smoothed pose data. Detects six distinct phases: Preparation, Loading, Jump, Acceleration, Contact, Follow-through — each with its own measurable kinematics (knee flexion, takeoff angle, shoulder angular velocity, follow-through arc).

Not ML. A state machine reading thresholds on vertical velocity and wrist position. The benefit: interpretable, deterministic, debuggable. The annotator confirms phase boundaries; the model learns nothing about the segmentation itself.

— Output 02 · Shuttle Exit Speed
90%

Event-driven displacement speed

Wrist-based speed proxies are unreliable. The wrist decelerates after contact; the shuttle accelerates from it. So instead of estimating shuttle speed from the wrist, we use an event-driven approach: once the Contact Phase is detected by Output 01, TrackNet locks onto the shuttle for the next 5 frames and computes the displacement-based speed in km/h.

The 90% accuracy vs ground truth is the result. The architectural decision — let the phase classifier trigger the speed measurement — is why it works.

03 / The Six Phases

From feet on the ground to follow-through.

Phase boundaries are detected by a state machine reading vertical velocity, wrist position, and shoulder angular velocity off the smoothed MediaPipe pose stream. The transition triggers are deterministic; the metrics within each phase come from vector geometry on the keypoints.

— 01
Preparation
Stance setup, racket back-swing initiation, weight transfer to back foot.
— 02
Loading
Knee flexion, hip rotation, shoulder cocked back. Energy storage phase.
— 03
Jump
Vertical velocity crosses threshold. Both feet leave the ground.
— 04
Acceleration
Shoulder angular velocity ramps. Wrist accelerating into contact zone.
— 05
Contact
Detected by wrist position + shoulder peak. Triggers shuttle speed measurement.
— 06
Follow-through
Wrist decelerates, body rotates through, weight transfers forward.
04 / Pipeline

The 10-stage architecture.

What actually happens between a raw 240 FPS clip and a phase-classified, speed-measured, coach-ready output.

— 01
Calibration foundation (space & time)
Before any analysis, physical constraints get established. A PIXELS_PER_METER constant is derived from a known reference object in frame (e.g., the net pole height) to convert pixel distances into real-world meters. A high frame rate — 240 FPS — ensures the time-step calculations (dt) are precise enough for the high-speed motion the smash produces.
— 02
Dual-model substrate
Two models in parallel. MediaPipe Pose extracts 33 skeletal keypoints — shoulders, elbows, wrists, hips, knees, ankles — to track body mechanics. TrackNet (TFLite) detects the shuttlecock, which is too fast and too small for general object detectors. Two models, one stream, two output channels.
— 03
Signal smoothing · the jitter fix
Raw AI keypoint data is noisy — frame-to-frame jitter on the order of 1-2 pixels even when nothing is moving. Untreated, this produces velocity spikes that aren't real: an early version of this pipeline computed shoulder angular velocity at 14,000°/s due to a 2-pixel keypoint wobble at 240 FPS. The fix: a Savitzky-Golay filter (window size 9, polynomial order 2) applied to the keypoint trajectories. Smooths the high-frequency noise while preserving the actual peaks of the smash motion.
— 04
Heuristic phase segmentation
A state machine — not ML — reads the smoothed pose stream and transitions through the 6 phases based on deterministic thresholds: vertical velocity sign change for Jump entry, wrist y-position peak for Contact, shoulder angular velocity decay for Follow-through. Deterministic is a feature, not a limitation — phase boundaries are auditable, debuggable, and reproducible across re-runs.
— 05
Geometric angle calculation
For static metrics — Knee Flexion, Hip Hinge, Takeoff Angle — vector geometry on three points (e.g., Hip → Knee → Ankle) using dot products. Reference frames were corrected so that 0° represents a straight leg and 90° represents a squat, matching biomechanical convention (early versions had this inverted).
— 06
Kinematic velocity extraction
Rotational velocities for the shoulder (angular), linear velocities for the body and wrist. Compute the delta between frames (Δdistance / Δtime) using the smoothed signal. Take the 95th percentile rather than absolute max — filters remaining outliers and produces realistic elite-level reference numbers.
— 07
Event-driven shuttle speed · the unlock
Once Contact Phase is detected by Stage 04, TrackNet locks onto the shuttle for the next 5 frames. The displacement of the shuttle's centroid across these frames produces the true exit speed in km/h. This is the architectural decision that produces the 90% speed accuracy — wrist-based proxies couldn't beat ~75%.
— 08
Elite benchmarking
Extracted metrics are compared against a hardcoded EliteStandards dictionary — ranges derived from professional badminton biomechanics literature (e.g., Jump Height > 0.5m, Knee Flexion 40-90°, Shoulder Angular Velocity > 1500°/s). The system classifies each metric as Excellent / Good / Needs Improvement based on these thresholds.
— 09
Feedback generation
Algorithmic coaching tips based on the benchmark results. If knee flexion measures 36° instead of the 40°+ target, the system pulls a specific correction string from the database — e.g., "Squat deeper to load more power" — and surfaces it in the output. Rule-based; explainable; the coach can override.
— 10
Visualization & rendering
OpenCV frame-by-frame reconstruction: overlay the smoothed skeleton, draw the shuttle's trajectory across the frames, burn the real-time metrics directly onto the video. The output is an augmented-reality clip the player can scrub through, with phase boundaries and metric callouts overlaid frame-accurately.
05 / The Bug Story

When the shoulder hit 14,000°/s.

— A debugging moment worth surfacing

The world record for shoulder angular velocity is around 9,000°/s. We were reading 14,000.

An early version of the pipeline reported a peak shoulder angular velocity of 14,000°/s on a club-level player. That number is physically impossible — elite professional badminton smash velocities top out around 7,000–9,000°/s. The pipeline was confidently reporting a number twice that of any human ever measured.

The cause: at 240 FPS, the time-step between frames is roughly 4.17 milliseconds. A MediaPipe keypoint wobbling by just 2 pixels frame-to-frame, with the upstream pixel-to-meter conversion applied, produced a derivative spike in the angular velocity calculation that dwarfed the actual motion. The faster the capture rate, the more sensitive the derivative is to noise.

The fix: a Savitzky-Golay filter (window size 9, polynomial order 2) applied to the keypoint trajectories before any kinematic calculation. The filter smooths the high-frequency noise floor while preserving the genuine peaks of the smash motion. Post-filter velocity numbers came down to the realistic 1500–2200°/s range that matches the literature.

The lesson worth surfacing on the resume: high-frame-rate biomechanics is fundamentally a signal-processing problem, not a computer-vision problem. Detection works fine; differentiation breaks. Anyone shipping pose-based kinematics without a signal smoothing pass has the same 14,000°/s waiting for them.

06 / Results

What it measures.

Phase Classification
95%
6-phase segmentation accuracy on annotated 240 FPS clips.
Shuttle Speed
90%
Accuracy vs ground truth — event-driven, post-contact.
Capture Hardware
Phone
No mocap markers. No external sensors. No lab.
Body Keypoints
33
MediaPipe Pose skeletal tracking, full body.
Frame Rate
240fps
Time resolution: ~4.17ms per frame.
Smoothing Filter
SG(9,2)
Savitzky-Golay, window 9, polynomial order 2.
07 / Decisions worth defending

Why these choices.

Why MediaPipe
over OpenPose?
MediaPipe runs on-device, has mobile-tuned inference, and gives us 33 keypoints with z-depth out of the box. OpenPose is more accurate in lab conditions but ships with a model size and inference budget that doesn't fit the "phone, tripod, 240 FPS" constraint. We needed the pipeline to run wherever a coach has a phone, not wherever a coach has a server.
Why a state machine
and not ML for phases?
Phase boundaries in a badminton smash are physically deterministic. The Jump starts when both feet leave the ground; Contact is when the racket head intersects the shuttle's trajectory. These aren't probabilistic events that need a learned classifier — they're geometric events that need a state machine. Choosing rule-based here is the right inductive bias. The benefit beyond interpretability: a coach can audit a phase boundary in two seconds; they can't audit a model's softmax.
Why event-driven
shuttle speed?
Wrist-based speed proxies — "the shuttle moves as fast as the wrist that hit it" — are wrong. The wrist decelerates after contact; the shuttle accelerates away from it. So we don't measure shuttle speed from the wrist. We measure it from the shuttle. The state machine fires at Contact; TrackNet locks for 5 frames; we compute displacement-based speed in km/h. The 90% accuracy is the result of the architectural decision, not the model.
Why hardcoded
elite standards?
The EliteStandards dictionary (Jump Height > 0.5m, Knee Flexion 40-90°, etc.) is derived from published professional badminton biomechanics studies. Hardcoded is appropriate because the underlying physics doesn't change — an elite player's jump height isn't going to be different next season. If sports science updates the standards, we update the dictionary in one place. Learning the standards from data would have required a labelled corpus of elite-vs-amateur smashes we don't have.
Why 95th percentile
over peak velocity?
Peak velocities are dominated by outlier frames — a single noisy MediaPipe detection on one frame produces a velocity spike that misrepresents the actual smash. The 95th percentile of the smoothed velocity profile is much more representative of "how fast is this player actually swinging." The fact that we report 95th percentile and not "peak" is itself a credibility signal: anyone serious about kinematics knows raw peaks are noise-dominated.
08 / Honest Limitations

What this doesn't yet do.

01
Side-view dependency. The phase classifier and angle calculations assume a side-view camera angle. Front-view or oblique-angle captures produce systematically different keypoint geometries that the current state machine doesn't handle. Coaches are instructed to set up the tripod laterally — but it's a constraint, not a robustness.
02
Single-player only. MediaPipe Pose detects the highest-confidence person in frame. In a doubles match or training drill with multiple players, the wrong player can be tracked across phases. No identity-tracking layer yet.
03
240 FPS is non-trivial to capture. Most phones can shoot 240 FPS but only at reduced resolution and only for short bursts. Drift between recordings, inconsistent exposure, and rolling-shutter artifacts at this frame rate all affect downstream measurements. The pipeline assumes clean 240 FPS — quality of capture matters.
04
Calibration depends on a known reference object. The PIXELS_PER_METER constant is derived from the net pole height being in frame. Recordings without a clearly visible reference can't be calibrated, which means absolute metrics (jump height in meters, smash speed in km/h) can't be computed — only relative ones.
05
Elite standards are static and based on published literature. Different studies report different elite ranges; the hardcoded dictionary picks one set. Athletes at different ages, skill levels, or body types have different optimal kinematics that the current thresholds don't account for.
06
No per-stroke variant handling. A jump smash, around-the-head smash, and stick smash have different optimal mechanics, but the pipeline treats them uniformly. The Contact Phase trigger fires for all of them, but the elite standards are calibrated for jump smashes specifically.
07
Ground truth for the 90% speed claim is radar-based. Comparing TrackNet-derived displacement speed against radar gun measurements. The 90% is mean accuracy over ~50 test smashes — sufficient for portfolio credibility but a larger evaluation set would tighten the confidence interval.
08
Phase classification ground truth is single-annotator. The 95% phase accuracy is measured against one annotator's phase boundaries. Inter-annotator agreement (IAA) hasn't been computed — two coaches might disagree on the exact frame where Loading transitions to Jump, which would lower the ceiling of the metric.
09 / What's Next

From smash to full kinematic library.

— A note on detail
This page describes the system's architecture, methodology, and measured outcomes. Internal training data, repository paths, deployment infrastructure, and the exact elite-standards thresholds are not shown — this is production work for KhiladiPro, and the engineering substance is what's discoverable here without exposing IP.