This guide walks through the setup process for SoccerTrack v2.
- Python 3.12 or higher
uv(used to manage the virtualenv and lockfile)- Git
- FFmpeg (for video processing)
-
Clone the repository
git clone https://github.com/AtomScott/SoccerTrack-v2.git cd SoccerTrack-v2 -
Create the environment and install dependencies
The project is uv-managed.
uv synccreates a.venv/and installs the pinned dependencies frompyproject.toml+uv.lock.uv sync source .venv/bin/activate # macOS / Linux # .venv\Scripts\activate # Windows
Alternatively, run commands without activating:
uv run python -m src.main ....
Use the helper script to fetch from Hugging Face (atomscott/soccertrack-v2):
./scripts/download.sh --dest ./data # full dataset
./scripts/download.sh --dest ./data --match 117099 --match 117100 # subset--revision pins a dataset tag / commit; see scripts/download.sh --help for
full usage. The Hugging Face CLI (installed with huggingface_hub) is
required.
Run a quick load against the freshly downloaded data:
from src.data_utils.soccertrack_v2 import load_match
m = load_match("./data", match_id="117099")
frames = m.gsr_frames(half=1)
print(len(frames), "GSR frames in 1st half")
print(len(m.bas_events()), "BAS events")See ../notebooks/quickstart.ipynb for a
fuller runnable example.
Dev dependencies (lint, test, notebooks) are declared in the dev optional
group:
uv sync --group devFormat and lint with ruff (wrapper in the Makefile):
make format # ruff autofix on src/- Ubuntu / Debian:
sudo apt install ffmpeg - macOS:
brew install ffmpeg - Windows: download from https://ffmpeg.org/download.html
If you prefer to let the loader fetch from Hugging Face on demand rather than
running download.sh first:
from src.data_utils.load_from_hf import load_match_from_hf
m = load_match_from_hf("117099")snapshot_download caches under HF_HOME so repeat calls are free.
- Read the Configuration Guide.
- Browse
../notebooks/quickstart.ipynb. - Explore the CLI reference.