Downloads · 30 days
0
OmarhAhmed/ai-padel-coach
ai-padel-coach is a machine learning model from OmarhAhmed. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This project analyzes padel game videos to extract player and ball tracking data. It processes an input video, applies various computer vision models to track players, the ball, and court keypoints, and then outputs t…
Downloads · 30 days
0
Access
Public
Updated May 19, 2025
Repo size
255 MB
Likes
1
Public
Click a slice to open those files.
.pt255 MB · 100%
From the Hugging Face model README
This project analyzes padel game videos to extract player and ball tracking data. It processes an input video, applies various computer vision models to track players, the ball, and court keypoints, and then outputs the collected analytics into a CSV file.
Clone Repository:
git install lfs
git clone https://huggingface.co/OmarhAhmed/ai-padel-coach
cd ai-padel-coach
Create Virtual Environment (Recommended):
python -m venv venv
source venv/bin/activate
Install Dependencies:
pip install -r requirements.txt
Prepare Court Keypoints:
court_keypoints.json) with the coordinates of these 12 points. Example format:
[
[x1, y1], [x2, y2], [x3, y3], [x4, y4],
[x5, y5], [x6, y6], [x7, y7], [x8, y8],
[x9, y9], [x10, y10], [x11, y11], [x12, y12]
]
FIXED_COURT_KEYPOINTS_LOAD_PATH in config.py to point to this JSON file.Before running the project, review and update the config.py file. Key settings include:
input_video: Path to the padel game video you want to analyze.output_video: Path where the output CSV data file will be saved.keypoint_tracking_model: Path to your JSON file containing the 12 court keypoints.maximum_frame_count: Set to None to process the entire video, or an integer to limit the number of frames.save_data: Set to True to enable saving the output CSV file.Execute the main script from the project's root directory:
python main.py