STROKE GAINED
ai10 min read

How AI Swing Analysis Actually Works

BA

Stroke Gained Team

How AI Swing Analysis Actually Works

Every golfer has been there — you hit a shot that feels perfect, then watch it slice into the trees. Or you shank one off the hosel and somehow it ends up pin-high. The disconnect between what your body does and what you think it does is one of the biggest challenges in golf.

That's exactly the problem AI swing analysis solves. Not by guessing, not by relying on generic tips, but by measuring what actually happens in your swing at a level of detail the human eye physically cannot process.

Here's how it works, what the technology actually measures, and why it matters more than most golfers realize.


The Science Behind Pose Estimation

At the core of AI swing analysis is a field of computer science called pose estimation — the ability for software to look at a video of a human and map where their body parts are in every single frame.

The technology we use is Google's MediaPipe, an open-source framework that tracks 33 key body landmarks in real time: wrists, elbows, shoulders, hips, knees, ankles, nose, eyes, ears, and several points on each hand and foot. These aren't rough estimates. MediaPipe's landmark detection achieves sub-centimeter accuracy when the camera angle and lighting are good — comparable to motion capture systems that cost tens of thousands of dollars.

When you record a swing video, here's what happens behind the scenes:

Step 1: Frame-by-Frame Landmark Detection

Your video is broken into individual frames (typically 30 or 60 per second). In each frame, the AI identifies all 33 landmarks and plots their x, y, and z coordinates. This creates a digital skeleton overlay of your entire swing motion — a 3D model of your body moving through space.

Step 2: Key Position Identification

The system identifies six critical swing positions automatically:

  • Address — your setup before the swing begins
  • Takeaway — the first movement away from the ball
  • Top of backswing — maximum rotation and arm elevation
  • Transition — the change of direction from back to down
  • Impact — the moment of truth
  • Follow-through — where you finish

Each position is identified by analyzing the velocity and direction changes of key landmarks. The top of backswing, for example, is detected when lead wrist velocity drops to near zero before reversing — the mathematical inflection point where the backswing ends and the downswing begins.

Step 3: Metric Calculation

From the landmark positions at each frame, the AI calculates specific biomechanical metrics. This is where it gets interesting.


What the AI Sees That You Don't

A trained eye can spot a flying elbow or early extension in slow motion. But AI analysis measures things that are physically impossible for humans to perceive in real time:

Angular Velocity

The AI calculates the rotational speed of each joint — hips, torso, shoulders, arms, wrists — throughout the entire swing. A full golf swing takes roughly 1.0-1.4 seconds. The downswing alone is 0.2-0.3 seconds. In that fraction of a second, your hips can rotate at over 500 degrees per second, your shoulders at 700+, and the club at 2,000+.

No human observer can track angular velocities at these speeds. But the AI measures them frame by frame, which reveals whether your body is generating speed efficiently or leaking energy somewhere in the chain.

The Kinematic Sequence

This is the single most important metric in golf biomechanics, and it's one that TPI (Titleist Performance Institute) has researched extensively.

The kinematic sequence is the order in which body segments accelerate and decelerate in the downswing. In an efficient swing, the sequence is:

  1. Hips accelerate first and decelerate
  2. Torso accelerates next, reaching peak speed as hips slow down
  3. Arms follow, peaking as torso decelerates
  4. Club fires last, reaching maximum speed at impact

This cascading "cracking the whip" pattern is what separates powerful, efficient swings from muscled, inconsistent ones. TPI's research across thousands of golfers shows that every single tour player exhibits this sequence, regardless of whether their swing looks "textbook" or unorthodox. Jim Furyk and Adam Scott have wildly different swing aesthetics but identical kinematic sequences.

The AI maps this sequence automatically and can tell you exactly where your chain breaks down. Maybe your torso fires before your hips clear. Maybe your arms take over too early and the club never fully releases. These are invisible to the naked eye but crystal clear in the data.

Consistency Patterns Across Multiple Swings

One swing tells you almost nothing. Ten swings start telling a story. Fifty swings give you statistical confidence.

AI analysis tracks metrics across multiple swings and identifies your patterns — not just your best swing or your worst swing, but your tendencies. Questions like:

  • What happens to your spine angle under fatigue? The AI can compare swing 1 to swing 50 in a practice session and flag if your posture degrades.
  • Is your tempo consistent? Novosel's Tour Tempo research identified a 3:1 backswing-to-downswing ratio among professionals (21 frames back, 7 frames down at 30fps). The AI tracks your ratio across every swing and flags drift.
  • Where is your miss pattern? If your hip turn decreases by 5 degrees on swings where you miss right, that's a causal link the AI can identify across a large enough sample.

This is the real power of AI swing analysis — not single-swing diagnosis, but longitudinal pattern recognition that would take a human coach hundreds of hours of video review to identify.

Micro-Movements at Transition

The transition from backswing to downswing happens in roughly 30-50 milliseconds. In that window, the entire character of the downswing is determined. The AI can detect:

  • Lateral shift — whether your weight moves toward the target before the club changes direction (a key TPI fundamental)
  • Hip bump magnitude — measured in centimeters of lateral movement
  • Wrist conditions — whether the lead wrist is flexed (bowed), flat, or extended (cupped) at the start of the downswing, which HackMotion's research shows is a primary determinant of face angle at impact
  • Shaft shallowing — whether the club drops into a flatter plane during transition, a move that happens too fast for most golfers to feel or coaches to see without slow motion

From Data to Drills

Raw data is useless without actionable feedback. A dashboard full of numbers doesn't help you get better. That's why the AI doesn't just measure — it prioritizes and prescribes.

Priority Fixes

The AI identifies the one or two changes that will have the biggest impact on your swing. This is based on a hierarchy informed by TPI's research on fault dependencies:

Some swing faults are root causes and others are compensations. Early extension (hips thrusting toward the ball), for example, is often a compensation for a lack of hip internal rotation — the body can't clear properly, so it pushes forward instead. Fixing the early extension without addressing the underlying mobility limitation produces a new compensation.

The AI is trained to identify root causes first. If your kinematic sequence shows that your hips aren't leading the downswing, it won't tell you to "clear your hips faster" — it'll flag the upstream issue (limited hip rotation, insufficient weight shift, or improper setup) and prescribe accordingly.

Specific Drills

Each priority fix comes with specific drills you can practice at the range or at home. These aren't generic "swing better" tips. They're targeted exercises tied to the exact metric that needs improvement:

  • Spine angle loss at impact → alignment stick drill maintaining posture through the strike zone
  • Tempo breakdown → pause-at-the-top drill with 3:1 count
  • Over-the-top transition → wall drill for proper shaft shallowing
  • Early extension → chair drill maintaining hip distance from the ball

Progress Tracking

Every swing you upload builds your personal database. The AI tracks how your key metrics change over time and shows you trend lines — not just "good" or "bad" but directional improvement. Are you getting 1% better per week at maintaining spine angle? That's visible in the data, even when it's invisible in your feel.

Comparisons to Your Own Swings

The AI compares you to your previous best, not to some idealized "perfect" swing model. Tour swings are beautiful, but copying Rory McIlroy's positions when you have different proportions, flexibility, and strength is a recipe for frustration. Your improvement is measured against your baselines, not someone else's highlights.


The Technology Stack (For the Curious)

If you're wondering how this actually runs on a phone without requiring a server farm:

  • MediaPipe handles pose estimation directly in the browser using WebAssembly — no server upload needed for the core analysis
  • TensorFlow.js powers the neural network models that run the landmark detection
  • Client-side processing means your video doesn't leave your device for the biomechanical analysis (privacy by architecture, not just policy)
  • Cloud AI (GPT-4 and Claude) generates the natural language feedback, drill recommendations, and coaching insights from the numerical data

The result: analysis that takes 3-5 seconds per swing on a modern smartphone. No appointments, no expensive hardware, no waiting for server processing.


Why This Matters for Coaches

If you're a golf coach, AI analysis doesn't replace you — it amplifies you. Instead of spending 20 minutes watching video frame by frame, you get an instant breakdown of your student's mechanics. The AI handles the measurement. You handle the interpretation, the prioritization, and the human judgment calls that no algorithm can make.

Combined with launch monitor data from Rapsodo, TrackMan, or even a Garmin R10, you get the complete picture: what the body does (swing analysis) and what the ball does (launch data). When you can overlay "your hips stalled 3 degrees early" with "your ball started 4 yards left of target with 800 RPM extra spin," you're making causal connections that change your student's game.

That's the foundation for real, measurable improvement.


The Limitations (Honesty Section)

AI swing analysis isn't perfect, and we won't pretend it is:

  • Camera angle matters enormously. A poor angle (too high, too close, wrong perspective) degrades landmark accuracy. Face-on and down-the-line are the two standard angles for a reason — they give the AI the clearest view of the critical planes of movement.
  • Lighting affects accuracy. Deep shadows, backlighting, or low-light conditions make pose detection less reliable. Outdoor daylight or well-lit indoor bays work best.
  • It can't see the club yet. Current pose estimation tracks the body, not the club. Club path, face angle, and shaft flex are inferred from body positions, not directly measured. This is a known limitation and an active area of development.
  • It's not a swing method. The AI doesn't teach the Stack and Tilt or the GolfTEC swing or any specific methodology. It measures biomechanics objectively. The interpretation of what's "good" or "bad" is guided by TPI fundamentals, Tour Tempo research, and Strokes Gained principles — but the final coaching decisions belong to you and your instructor.

Getting Started

Upload your first swing video in the Stroke Gained app. All you need is a phone camera, a decent angle (down the line or face-on), and 3-4 swings. The AI handles the rest.

For the best results: prop your phone at hip height, about 8-10 feet away, with your full body visible from address to follow-through. Natural daylight works best. One swing per clip keeps the analysis clean.

Your best round is waiting in the data.


Dive deeper:

Stay in the loop: Sign up for early access to the full Stroke Gained app.

SG

Written by Stroke Gained Team

The Stroke Gained team combines data science, golf instruction research, and AI to help golfers make smarter equipment and practice decisions.

Refine Your Game

Join golfers getting weekly data-backed insights.

No spam. Only gains.