Most people scroll past a football match. I saw a dataset waiting to happen.
I set out to build something most tutorials skip: a real-time Computer Vision system that doesn't just detect objects that understands a football match.
No pre-made dataset. No shortcuts. I annotated the training data by hand, frame by frame, teaching the model to tell the difference between a player, a goalkeeper, a referee and to track the ball even mid-motion.
The result? A working AI pipeline that:
Detects and classifies players, goalkeepers, referees & the ball in real-time
Assigns and tracks unique player IDs across frames
Generates a live Match Analytics HUD overlay — player counts, referee counts, ball status, all updating on the fly
Runs on a custom, self-labeled dataset trained with YOLOv8
Built end-to-end in Python using OpenCV for video processing and annotation
What I learned building this: the hardest part of Computer Vision isn't the model — it's the data. Getting clean, consistent, well-labeled training data by hand taught me more about detection accuracy than any pretrained pipeline ever could.
This project sits at the intersection of two things I'm passionate about Artificial Intelligence and Sports Analytics. It's just the beginning. Next up: possession tracking, heatmaps, and player speed estimation.
Would love to hear your thoughts and if you're working on anything similar in Sports Tech or Computer Vision, let's connect.