Skip to main content

Tactical intelligence and computer vision pipeline for football analytics.

Project description

Gaffers Guide SDK

Gaffers Guide SDK is a modular sports computer vision library for tracking, spatial mapping, and tactical analysis workflows. It is designed as a pip-installable Python SDK with lightweight base modules and optional heavy ML vision components.

Installation

Base install (Parsers & IO):

pip install gaffers-guide

Full ML install (YOLO/SAHI Vision):

pip install "gaffers-guide[vision]"

Quickstart & Usage

Spatial Mapping (No ML required):

import numpy as np
from gaffers_guide.spatial import HomographyEngine

corners_px = np.array(
    [[120.0, 50.0], [1800.0, 45.0], [1900.0, 1030.0], [80.0, 1035.0]],
    dtype=np.float64,
)

engine = HomographyEngine()
mapping = engine.fit(corners_px, frame_shape=(1080, 1920))
pitch_point = mapping.pixel_to_pitch((960.0, 540.0))
print(pitch_point.to_dict())

Tactical IO:

from pathlib import Path
from gaffers_guide.io import parse_tracking_json

tracking = parse_tracking_json(Path("tracking_data.json"))
print(tracking.keys())

The Full Engine:

from pathlib import Path
from gaffers_guide.pipeline import MatchAnalysisPipeline
from gaffers_guide.pipeline.config import PipelineConfig

pipeline = MatchAnalysisPipeline.from_profile("balanced")
report_path = pipeline.process_video(
    PipelineConfig(
        video=Path("match.mp4"),
        output_dir=Path("output"),
        quality_profile="balanced",
    )
)
print(report_path)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gaffers_guide-2.0.2.tar.gz (69.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gaffers_guide-2.0.2-py3-none-any.whl (86.9 kB view details)

Uploaded Python 3

File details

Details for the file gaffers_guide-2.0.2.tar.gz.

File metadata

  • Download URL: gaffers_guide-2.0.2.tar.gz
  • Upload date:
  • Size: 69.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for gaffers_guide-2.0.2.tar.gz
Algorithm Hash digest
SHA256 2af4ce6c6c0521f7f84c7fe2ce44a40776bd5c4ac98436c80e1028ca1fc05071
MD5 f4f39b5054b1f70b29305d261c88906e
BLAKE2b-256 cf1d06057e964e1b131d24c122fc68be9aed2fa6827cc814fee661e585e1ad84

See more details on using hashes here.

File details

Details for the file gaffers_guide-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: gaffers_guide-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 86.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for gaffers_guide-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 30aef72c8b19f7a5aebe60010aa9f44f06256e90c992a42b939d55728ab232e7
MD5 65c295bbace882f0f589f78cfb56cb59
BLAKE2b-256 cabac54aa1163cb1be3ea3f86f61e4e4751af06196008dd26d7d6e3deeb3a159

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page