Skip to content

Blaku03/PitchAnalyzer_AI

Repository files navigation

🏟️ PitchAnalyzer_AI

By Blaku03 and gruzewson

🧭 Overview

PitchAnalyzer_AI is a sports analytics framework designed to turn raw football match video into actionable insights. At its core, the system:

  • Detects players and the ball in each frame.
  • Assigns each player to their team.
  • Tracks players and ball trajectories over time.
  • Maps camera views to a bird’s‑eye perspective.
  • Aggregates events into game statistics.

If you are insterested how we created this project, what challenges we faced, and how we solved them, check out our Technical Documentation.

Table of Contents

🎦 Demo

Here’s a quick demo of PitchAnalyzer_AI in action:

Demo of PitchAnalyzer_AI

👀 Try it out!

Explore the project in action with interactive Jupyter Notebooks!

The notebooks are designed to run online on Kaggle or Google Colab as well locally on your machine.

📌 Featured Notebooks

  • Game Annotator Colab Kaggle GitHub

  • Pitch Mapping Colab Kaggle GitHub

  • Model Training (we trained our models mainly on kaggle) Kaggle GitHub

Resources

  • Our models can be found on kaggle Kaggle as well as our labeled dataset Kaggle

⚙️ Project workflow

project workflow diagram

  1. Raw Data & Events

    • 30 s match clips + manually logged events as inputs.
  2. Auto‑Labeling (Label Studio)

    • Semi‑automated generation of player/ball bounding boxes and pitch keypoints, with model‑assisted corrections.
  3. Model Training

    • YOLOv11 for player/ball detection
    • Keypoint detector + homography for field mapping
    • Play‑recognition module combining detections and geometry
  4. Post‑Processing & Analytics

    • Derive ball possession, player heatmaps, bird’s‑eye view, distances covered, and other stats from model outputs.

🔜Future plans

When we have more time, we plan to:

  • Develop a model for detecting specific plays and game strategies.
  • Improve the accuracy and robustness of our current models for player and ball detection.
  • Expand the range of statistics generated, such as advanced metrics for player performance and team dynamics.
  • Implement a more sophisticated method for recognizing teams, potentially replacing KNN with a deep learning-based approach for better accuracy and scalability.

About

Get statistics from a football match video

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •