Skip to main content

openstarlab phaselearn modeling package

Project description

OpenSTARLab PhaseLearn Modeling package

Documentation Status dm ArXiv Discord

Introduction

The OpenSTARLab PhaseLearn package is the fundamental library for modeling and analyzing play phases in sports. It provides a robust framework to train and perform inference on play phases using state-of-the-art spatio-temporal architectures.

Key Concepts

image


Installation

  • Install pytorch (recommended version 2.4.0 linux pip python3.9 cuda11.8)
pip install torch torchvision torchaudio
  • To install this package via PyPI
pip install openstarlab-phaselearn
  • To install manually
git clone git@github.com:open-starlab/PhaseLearn.git
cd ./PhaseLearn
pip install -e .

Quick Start

Get started with inference using pre-trained models.

  1. Download Pre-trained Model: Download the model weights from MODEL_URL and place them in the model/ directory.

  2. Generate Phase Data: Convert your raw tracking and event data into the standardized Phase Data format using the Pre-Processing package.

  3. Run Inference: Perform phase estimation on your data.

Training and Analysis from Scratch

Follow these steps to train your own play phase model using the SoccerTrack-v2 dataset.

  1. Data Acquisition

  2. Generate Phase Data Before training, you must convert the raw tracking into the Phase Data format.

  3. Training & Evaluation Once the data is prepared, you can execute the training pipeline.

Repository Layout

PhaseLearn/
├── phase/sports/soccer/         
│   ├── dataloaders/data_module.py
|   ├── inference/inference.py
|   ├── main_class_soccer/main.py
|   ├── models/
|   |   ├── model_yaml/
|   |   |   ├── train_baller2vec.yaml
|   |   |   ├── train_gat_transformer.yaml
|   |   |   ├── train_gcn_transformer.yaml
|   |   |   └── train_transformer.yaml
|   |   ├── baller2vec.py
|   |   ├── gat_transformer.py
|   |   ├── gcn_transformer.py
|   |   └── transformer.py
|   ├── trainers/train.py
│   └── utils/
|       ├── evaluation.py
|       ├── load_train_data.py
|       └── preprocessing.py
├── data/                              # Data storage (gitignored except .gitkeep)
|   ├── phase_annotation_data/
|   |   ├── 117092/
|   |   |   ├── 117092_00_01-04_18_annotation
|   |   |   ├── ...
|   |   ├── ...
|   ├── phase_data/
|   |   ├── bepro/
|   |   |   ├── 117092/117092_main_data
|   |   |   ├── ...
|   |   └── statsbomb_skillcorner/
|   |       ├── 3894537_1018887/3894537_1018887_main_data
|   |       ├── ...
|   └── train_data/bepro/              # generated by preprocessing_data()
|       ├── label_np.bpy
|       └── sequence_np.bpy
└── model/                              # Model storage (gitignored except .gitkeep)
    ├── baller2vec/
    |   ├── ...
    ├── gat_transformer/
    |   ├── 2team_mode/
    |   |   ├── 20251221_155257/run1
    |   |   |   ├── best.pth
    |   |   |   ├── hyperparameters.json
    |   |   |   ├── loss.csv
    |   |   |   └── model_stats.txt
    |   |   ├── ...
    |   ├── ...
    ├── gcn_transformer/
    |   ├── ...
    └── trnsformer/
        ├── ...

RoadMap

  • Release the package
  • Provide pre-trained models

Other Information

Development torch version

version 0.0.1 linux pip python3.9 cuda11.8 

Citation

If you use phaselearn modeling in your research, please cite it as follows:

@article{playphase,
  title={Estimating Probability Distributions of FIFA-Defined Phases of Play Based on Inter-Analyst Diversity},
  author={Kento Kuroda, Keisuke Fujii and Yoshinari Kameda},
  journal={International Journal of Computer Science in Sport},
  year={2026},
  volume={XX},
  pages={XXX-XXX},
  publisher={Publisher}
}

Developer

Kento Kuroda
Kento Kuroda

💻
Kenjiro Ide
Kenjiro Ide

💻

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

openstarlab_phaselearn-0.0.1.tar.gz (30.2 kB view details)

Uploaded Source

Built Distribution

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

openstarlab_phaselearn-0.0.1-py3-none-any.whl (40.3 kB view details)

Uploaded Python 3

File details

Details for the file openstarlab_phaselearn-0.0.1.tar.gz.

File metadata

  • Download URL: openstarlab_phaselearn-0.0.1.tar.gz
  • Upload date:
  • Size: 30.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for openstarlab_phaselearn-0.0.1.tar.gz
Algorithm Hash digest
SHA256 d39185ebeec1d7fbca96b8e7455b237342c79b7daab1dad67030ce6422c50a12
MD5 f3a71d7d83d8e8ec63b58026ec0ea9cf
BLAKE2b-256 27371a834c882923b2e29dca80f815a523726c7ede3d2fb778cf704cd153c446

See more details on using hashes here.

File details

Details for the file openstarlab_phaselearn-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for openstarlab_phaselearn-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2cc9b910997583a70b6a23a302552adb7f85aa839391931d5fdb0b2890340aaf
MD5 0523b2e93f404cecad01d9c2fb20671b
BLAKE2b-256 85c90d2545b2a44e5570de1f9394b5d39cf4767359e1d8509fbfa5912ff58d67

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