The Football Analytics Dashboard is a comprehensive tool designed to analyze football games using advanced machine learning models. This project leverages YOLO (You Only Look Once) models for object detection and tracking of football players in video footage.
- Player Detection: Detects and tracks football players in video footage.
- Model Training: Supports training of YOLOv5 and YOLOv8 models.
- Environment Setup: Easy setup of virtual environments and dependencies.
- Memory Management: Includes utilities for managing GPU memory.
- Python 3.10
virtualenv
package
To set up the virtual environment and install dependencies, run the following commands:
virtualenv -p $(which python3.10) --system-site-packages football_env
source football_env/bin/activate
pip install -r requirements.txt
The project requires the following directories:
input_videos
output_videos
stubs
models
memdump
logs
These directories will be created automatically by the setup script.
To train a YOLO model, use the provided Jupyter notebooks in the training
directory. For example, to train a YOLOv8 model, open and run the football_training_yolo_v8.ipynb
notebook.
To deallocate fragmented GPU memory, use the following code:
python
import torch
torch.cuda.empty_cache()
To tweak the environment for better memory management, use:
python
import os
os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "max_split_size_mb:512"
This project is licensed under the MIT License. See the LICENSE file for details.
- Hardik Goel - [email protected]
- Ultralytics for the YOLO models.
- Roboflow for dataset management.
Contributions are welcome! Please fork the repository and submit a pull request.
For any questions or issues, please contact Hardik Goel.