Skip to content

adityapgupta/Sports-Analysis

Repository files navigation

SoccArt - Pipeline for Soccer Game Analysis

Welcome to the Soccer Analysis project! This paper presents an automated computer vision pipeline for soccer game analysis using video input. The system employs YOLOv10 and ByteTrack for robust detection and tracking of players, referees, and the ball. Team identification and jersey number recognition are achieved through SigLIP-based color clustering and neural networks like ResNet34 and ViTPose. Field-camera calibration and homography transformation map detected entities onto a minimap. Interpolation with sliding window smoothing ensures temporal consistency. The pipeline provides accurate positional data and annotations, enabling detailed gameplay analysis and insights into soccer strategies.

Conference Presentation

This project was proudly presented as a poster at the 1st Conference on Applied AI and Scientific Machine Learning (CASML 2024) from 16th to 18th December 2024. Our innovative approach to soccer game analysis garnered significant interest and showcased the potential of advanced computer vision techniques in sports analytics.

Poster Title

SoccArt: Soccer Game Analysis

State of the Art Soccer Analysis Pipeline using Artificial Intelligence

View Poster

Read Abstract

Watch Tracking Demo

Authors

  • Aditya Gupta
  • Armaan Khetarpaul
  • R. K. Shishir
  • Sahil Chaudhary
  • S. Sharath
  • Umang Majumder

Evaluation Metrics

Player Detection AP Score (at IoU = 0.5)

Model Average Precision (AP)
YOLOv5 (Roboflow) 0.810
YOLOv8 (PyResearch) 0.794
YOLOv10 (Ours) 0.862

Jersey No. Recognition Accuracy

Model Accuracy (%)
ZZPM 92.85
AIBrain Global Team 75.18
PARSeq & VitPose based (Ours) 79.31

Calibration Metric Scores

Model acc@5 CR FS
SAIVA_Calibration - - 0.52
Sportlight 0.766 0.734 0.56
No-Bells-Just-Whistles 0.737 0.775 0.57

Key Features

  • Accurate Player and Ball Detection: Utilizing state-of-the-art YOLOv10 models.
  • In-depth Game Analysis: Extract meaningful insights from video feeds.
  • Customizable Models: Finetune your own models or use our pre-trained weights.
  • Visual Representations: Heatmaps, minimaps, and more to visualize game dynamics.

Getting Started

  1. Install Dependencies: Run pip install -r requirements.txt to install the required packages.
  2. Download Models: Obtain the SV_FT_WC14_kp and SV_FT_WC14_lines files from this repository and place them in the models folder.
  3. Model Training: If you wish to finetune your own models, follow the instructions in the training folder. Alternatively, use the provided weights in the models folder.
  4. Run Analysis: Execute main.py to perform detection and analysis on the video feed.

Results

Explore the results folder to see example videos with their detections.

Pipeline Overview

Pipeline

Demo

Original Video

Original

Detection Markers

Detection Markers

Minimap Visualization

Minimap

Unlock the full potential of football game analysis with our cutting-edge Sports Analysis project. Dive into the data and transform the way you understand the game!

About

Pipeline for Soccer game analysis

Resources

Stars

Watchers

Forks

Contributors 6