Metadata-Version: 2.5
Name: tactifoot-vision
Version: 0.3.0
Summary: Football video analysis: detection, tracking, team classification and pitch homography, from dataset preparation to tactical maps.
Project-URL: Homepage, https://github.com/RedHot099/TactiFootVision
Project-URL: Repository, https://github.com/RedHot099/TactiFootVision
Project-URL: Issues, https://github.com/RedHot099/TactiFootVision/issues
Project-URL: Changelog, https://github.com/RedHot099/TactiFootVision/releases
Author-email: Jakub Eichner <redhotdevil996@gmail.com>
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: computer-vision,football,homography,object-detection,soccer,sports-analytics,tracking
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Multimedia :: Video
Classifier: Topic :: Scientific/Engineering :: Image Recognition
Requires-Python: >=3.13
Requires-Dist: huggingface-hub<2,>=0.36.2
Requires-Dist: matplotlib>=3.10
Requires-Dist: numpy<3,>=2.1
Requires-Dist: opencv-python>=5.0.0.93
Requires-Dist: pandas>=2.2.3
Requires-Dist: pillow>=11.3
Requires-Dist: pyarrow>=23.0.1
Requires-Dist: pydantic<3,>=2.14.1
Requires-Dist: pyyaml>=6.0.3
Requires-Dist: scikit-learn>=1.6.1
Requires-Dist: scipy>=1.16.3
Requires-Dist: supervision<0.26,>=0.25.1
Requires-Dist: torch<3,>=2.11
Requires-Dist: torchvision>=0.26
Requires-Dist: tqdm>=4.67.3
Requires-Dist: transformers<6,>=4.57.6
Requires-Dist: ultralytics<9,>=8.4.201
Requires-Dist: umap-learn>=0.5.12
Provides-Extra: all
Requires-Dist: numpy<2.4; extra == 'all'
Requires-Dist: rfdetr<1.4,>=1.3.0; extra == 'all'
Requires-Dist: transformers<5; extra == 'all'
Provides-Extra: rfdetr
Requires-Dist: numpy<2.4; extra == 'rfdetr'
Requires-Dist: rfdetr<1.4,>=1.3.0; extra == 'rfdetr'
Requires-Dist: transformers<5; extra == 'rfdetr'
Provides-Extra: sam2
Requires-Dist: hydra-core>=1.3.2; extra == 'sam2'
Requires-Dist: iopath>=0.1.10; extra == 'sam2'
Description-Content-Type: text/markdown

# TactiFoot Vision

![TactiFoot Vision on one attacking move](https://raw.githubusercontent.com/RedHot099/TactiFootVision/master/docs/media/tactifoot_promo.avif)

TactiFoot Vision turns football match video into tactical data. It finds and follows every player and the ball, works out who plays for which team, and maps the action onto the pitch in metres.

- **Data:** load, convert, split and augment annotated football datasets.
- **Models:** train and evaluate YOLO, RF-DETR and pitch-keypoint models through one interface.
- **Pipeline:** detection, tracking, team classification and homography to pitch coordinates.
- **Output:** tracks, StatsBomb-style freeze frames, annotated video and a tactical radar.

## Quick start

To see the whole workflow without installing anything, open the overview
notebook in Google Colab. It downloads an open demo match, trains a player
detector for a few minutes, tracks the players and draws the tactical map:

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/RedHot099/TactiFootVision/blob/v0.3.0/notebooks/00_overview.ipynb)

To use the package on your own footage, install it from PyPI (Python 3.13):

```bash
pip install tactifoot-vision
```

```python
import tactifoot_vision as tv

pipeline = tv.Pipeline(
    detector=tv.load_model("yolo", "models/detector_yolo11l.pt"),
    keypoint_model=tv.load_model("yolo_pose", "models/pitch_yolo11m_pose.pt"),
    team_classifier=tv.teams.TeamClassifier("siglip"),
)
result = pipeline.run("match.mp4")
tv.viz.render_video(result, "match.mp4", "annotated.mp4")
```

The same pipeline runs from the command line:

```bash
tactifoot init pipeline.yaml   # a commented run file to edit
tactifoot run pipeline.yaml --video match.mp4 --output-dir outputs/match
```

## Contributing

```bash
git clone https://github.com/RedHot099/TactiFootVision.git && cd TactiFootVision
uv sync                 # the package, its dev tools and the notebook kernel
uv run pytest -q        # the fast suite
```

The notebooks are generated from `notebooks/build/`. All but the overview
notebook, and the examples, expect local data and weights; see the
[notebooks README](https://github.com/RedHot099/TactiFootVision/blob/master/notebooks/README.md).

## Learn more

- **[Notebooks](https://github.com/RedHot099/TactiFootVision/blob/master/notebooks/README.md):** executed walkthroughs of every module, from data to visualisation. Start with `00_overview`, which also runs in Colab.
- **[Architecture](https://github.com/RedHot099/TactiFootVision/blob/master/docs/ARCHITECTURE.md):** modules, interfaces, run files and the CLI.
- **[Examples](https://github.com/RedHot099/TactiFootVision/tree/master/examples):** runnable scripts for each area and the CLI.
