Golf Swing analyzer???

My swing data said my hips were rotating 270 degrees. They are not.

This is a project that I have not been able to finish since it was surprisingly difficult, but would like to go further on. I feel like there is a lot of potential, for example, for an AI that you can talk to live while you hit golf balls at the range that understands the context and can relate your swings back to earlier swings.

However, this is the story of building Golf Swing Analyzer — an app where you film your golf swing on your phone and get back an AI diagnosis plus a practice plan that actually builds week over week, instead of the usual one-off "here's what's wrong" feedback.

The pipeline is simpler than it sounds:

  1. Film or upload a swing in the app.

  2. Extract body landmarks from every frame (shoulders, hips, wrists) — no AI needed here, just pose tracking.

  3. Turn those landmarks into real numbers: tempo, spine angle, hip rotation, swing plane.

  4. Hand those numbers to an LLM, which writes a plain-English diagnosis and a week-by-week drill plan.

  5. Show it all on a results screen — video, metrics, diagnosis, plan.

The 270-degree hips

Early on, the numbers coming out of step 3 were nonsense — hip rotation that's not physically possible. Chasing that down turned into a real rabbit hole: angle math that broke when it wrapped past 360°, swings looking different depending on how far from the camera someone stood.

But the real culprit was funnier and worse: the three sample swing videos I'd been using to build and test everything were mistrimmed. The auto-trim logic was cutting out the golfer walking over to pick up the camera — because that motion was bigger on screen than the actual swing, which is small and far away. I'd been tuning the whole pipeline against walking, not golfing.

More data, same lesson

Once I ran it against 25 real swing clips from a friend, the same kind of problem showed up again — the code was too willing to trust a single suspicious spike as "this is the moment of impact." I tried two fixes that looked great against my original 3 test clips. Both made the larger batch of real clips worse, so I reverted them. Passing your own test cases doesn't mean you're right — it just means you're not wrong about the three things you checked.

Being honest about uncertainty

Rather than pretend every metric is solid, shaky ones get flagged as unreliable, and the AI is told to hedge instead of stating a questionable number as fact. Better to say "I'm not confident about this one" than to confidently tell someone their hips did something anatomically impossible.

Next up: actually testing the results screen on a real phone and then making the ai you can live speak to.

Lawyer portrait photo

Create a free website with Framer, the website builder loved by startups, designers and agencies.