This project runs ball tracking (TrackNet) and player tracking
(YOLOv8 + Kalman filter) together on a video.
It produces two outputs: - output_marked.mp4 → video with players
and ball marked - output_mask.mp4 → mask video (players & ball in
white on black)-
- Clone this repo and move into the folder:
git clone https://github.com/Komantxe/PadelCheeseAI.git
cd PadelCheeseAI- Create a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Edit the script to set your input/output video paths:
Opentrack.pyand update:
VIDEO_PATH = "input.mp4" # input video here
VIDEO_OUT = "output_marked.mp4" # annotated output
MASK_OUT = "output_mask.mp4" # mask video output- Run the script:
python track.py- Annotated video →
output_marked.mp4 - Mask video →
output_mask.mp4