AI Football Video Analysis System
Firas Tlili
Published
Project Description
AI Football Video Analysis System is a comprehensive computer vision solution designed to extract real-time insights from football match footage. The system combines advanced object detection, tracking, and spatial analysis techniques to monitor player behavior, estimate ball possession, and generate meaningful performance analytics.
At its core, the system uses a YOLOv11 model (Ultralytics) to accurately detect players, referees, and the ball in each frame. These detections are enhanced with tracking and motion analysis techniques to maintain consistent identities and capture dynamic interactions throughout the match.
To enable deeper analysis, the project integrates KMeans clustering to group players by team based on visual features such as jersey color. Optical flow is used to estimate movement patterns and player trajectories, providing insights into speed, positioning, and overall activity on the field.
A key component of the system is perspective transformation, which maps the broadcast camera view into a top-down representation of the pitch. This allows for more accurate spatial reasoning, including player positioning, distance measurements, and zone-based analysis.
The system generates real-time analytics such as ball possession statistics, player movement tracking, and match dynamics visualization. Results can be visualized through overlays on the video as well as plotted using data analysis libraries like Matplotlib and Pandas.
Developed in Python using tools such as OpenCV, NumPy, and Scikit-learn, the project is structured for flexibility and experimentation, with development carried out in environments like Jupyter Notebook and VS Code. Version control is maintained using Git for reproducibility and collaboration.
Overall, this project demonstrates how modern AI and computer vision techniques can transform raw sports footage into actionable insights, enabling performance analysis, tactical evaluation, and enhanced understanding of the game.