AI Golf Launch Monitor
Low-cost ball flight analysis from video using YOLOv8
AI / Computer Vision / Sports Analytics
Project Story
I built this because I was frustrated by how little feedback I had after a shot. I could see the ball slice or hook, but I wanted to know what changed in the first few frames after impact. Since commercial launch monitors are expensive and not always available, I tried to see how far I could get with a normal video, computer vision, and a physics model.
Why I Built It
The hard part is that a golf ball is tiny, fast, and often blurred. Classical OpenCV could find it in some clips, but shadows, grass texture, and motion blur caused false detections. On top of that, a simple projectile model is only an approximation because real ball flight depends on drag, lift, spin, and wind.
What I Built
I built a software-only pipeline: load the swing video, detect the ball, calibrate pixels into metres, fit the first part of the trajectory, and turn that into launch speed, angle, and carry. When classical tracking became unreliable, I labelled my own golf-ball dataset and trained a YOLOv8 model to get cleaner detections.
What I Did
- Created and labelled a custom golf-ball detection dataset
- Trained and fine-tuned YOLOv8 for golf swing video
- Wrote the calibration, trajectory fitting, and carry-estimation code
- Compared the outputs with TrackMan-style reference data and kept refining the assumptions
- Built the analysis pipeline and demo presentation for AWS KIRO Hackathon
How I Built It
Build Flow
Video input -> frame extraction -> YOLO detection (ball/club) -> impact frame identification -> trajectory tracking -> physics-based parameter estimation.
How It Works
The system finds the ball frame by frame, focuses on the first part of flight, and converts image movement into real-world speed using a scale factor from the scene. I use least-squares fitting over the early trajectory instead of trusting one noisy frame. From there, the physics model estimates carry, and I used TrackMan comparisons to see where simple projectile assumptions started to break down.
Software
- Python
- YOLOv8
- OpenCV
- Ultralytics
What Was Hard
- The ball is only a few pixels wide in many frames and disappears quickly after impact
- Pixel-to-metre calibration has to be right or every downstream number is wrong
- Motion blur and shadows made early OpenCV tracking fragile
- The physics model had to be honest about what it did not know, especially spin and drag
Build Reference
Pipeline from video input to detection, tracking, launch-parameter estimation, projectile modelling, and output metrics.
Click to inspect
Demos and Build Notes
Product Demos
Photos and Notes
Project photos
Technical Evidence
Screenshots
Downloads
Results & Impact
- Winner - AWS KIRO Hackathon 2025
- Functional prototype estimating key launch parameters from video
- Custom dataset and trained detection model for golf-specific scenarios
- In controlled tests, launch angle, velocity, and carry were typically within about 5% of reference values
What I Learned
- Domain-specific training data dramatically improves detection accuracy
- Physics modelling bridges the gap when hardware sensors are unavailable, but assumptions about spin and drag must be made explicit
- Golf video analysis requires careful frame rate and camera positioning
Next Steps
- Improve calibration with reference markers or dual-camera setup
- Expand to spin estimation and club path analysis
- Integrate with Golf Dual View for multi-angle capture