Skip to content

ptonso/soccer-vision

Repository files navigation

Computer Vision in Soccer

This repository contains the implementation and supporting materials for a project that uses computer vision and machine learning to analyze soccer matches. The primary goal is to extract real-world player positions from video recordings via homographic transformations, and subsequently use these positions and related features in predictive and analytical models.

Overview

  • Fine tune YOLO for detecting players in video in real time.
  • Estimate field keypoint detections.
  • Estimate real-time homographies from detected keypoint.
  • Further process group team members via clustering analysis.

Ubuntu-based setup

Create environment and install dependencies.

Place Roboflow training detection data in:

  • field : data/00--raw/football-field-detection.v15i.yolov8/
  • player : data/00--raw/football-players-detection.v12i.yolov8/

Finetune and Train Models

# train player detection box YOLO
python3 -m scripts.train_detect

# train perspect transformation model
python3 -m scripts.train_keypoints

After train the models

# run real-time inference
python3 -m src.process.real_time
YOLO-based player detection
Figure: YOLO-based player detection
Keypoint CNN pose
Figure: Keypoint CNN pose

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors