Skip to content

Repository files navigation

Ball Trajectory Event Detection

This project implements a machine learning pipeline to detect Bounce and Hit events from ball tracking data in the Rolland Garros 2025 final. It offers two approaches: a Supervised method using a pre-trained Random Forest classifier, and an Unsupervised method using physics-based anomaly detection.

The system processes raw 2D coordinate JSON data, engineered physics features (velocity, jerk, rolling volatility), and outputs an enriched JSON with predicted actions for each frame.

Project Structure

  • main.py: The core script containing the functions for supervised and unsupervised predictions
  • CLF.sav: The pre-trained Random Forest model (Pickle file).
  • testing.ipynb: Jupyter Notebook containing original testing code, visualisations
  • all_ball_data.csv: The aggregated training dataset (~110k points) used for model training and unsupervised splitting.
  • requirements.txt: List of Python dependencies.

Installation

  1. Clone the repository:

    git clone <your-repo-url>
    cd <your-repo-name>
  2. Install Dependencies:

    pip install -r requirements.txt
  3. Run main.py

About

Unsupervised and supervised analysis of the 2025 Roland Garros Final using positional data

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages