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.
- 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.
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/
# train player detection box YOLO
python3 -m scripts.train_detect
# train perspect transformation model
python3 -m scripts.train_keypointsAfter train the models
# run real-time inference
python3 -m src.process.real_time
