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.
main.py: The core script containing the functions for supervised and unsupervised predictionsCLF.sav: The pre-trained Random Forest model (Pickle file).testing.ipynb: Jupyter Notebook containing original testing code, visualisationsall_ball_data.csv: The aggregated training dataset (~110k points) used for model training and unsupervised splitting.requirements.txt: List of Python dependencies.
-
Clone the repository:
git clone <your-repo-url> cd <your-repo-name>
-
Install Dependencies:
pip install -r requirements.txt
-
Run
main.py