Web application to automate football players tracking.
The goal of this project is to create a system dedicated to acquiring football players' tracking data and visualizing it automatically. The user is able to upload a video with a fragment of a football match and, in return, receive analytical data based on that footage. These data include tracking data and the percentage of teams' ball possession throughout the video clip.
Models weights for keypoints and players detections need to be downloaded and put into the models directory (adjust paths in config files). Weights are avaliable for download here.
- Python 3.11 or later: Ensure Python is installed. You can download it from here.
- Virtual Environment: It is recommended to create a virtual environment to manage dependencies.
python -m venv venv source venv/bin/activate # For MacOS/Linux venv\Scripts\activate # For Windows
-
Clone the repository:
git clone https://github.com/wwoszczek/football-players-tracking cd football-players-tracking
-
Install the required packages:
pip install -r requirements.txt
-
Set up the credentials in
Creds.yaml
file (if needed). -
Configure the paths in
tactical_config.yaml
andtv_config.yaml
.
-
Run the main application without the user interface:
python main.py
-
Run the web application to try the system with user interface:
streamlit run web_app.py
This will launch the web app where you can upload your video clip.
-
Once uploaded, the system will process the video and display:
- Tracking data for players, referees, and ball movements.
- A tactical map with player positions.
- Percentage ball possession for both teams.