A computer vision pipeline for analyzing pickleball gameplay videos using deep learning. This tool detects players, ball position, and court layout in each frame to generate rich visual analytics, including heatmaps, rally tempo, and kitchen zone usage. Outputs are compiled into a composite video with multiple synchronized views.
This project combines YOLO-based object/keypoint detection with homography transformations to power analytics to provide a rich breakdown of pickleball gameplay.
Processing Pipeline:
- Court Detection - Finds 12 keypoints and maps to a bird's-eye-view of the court
- Player Tracking - Detects players and projects their on-court positions
- Ball Tracking - Detects the ball each frame and projects it into the birds-eye-space
- Analytics - Generates player/ball heatmaps, kitchen instrusion panels, and rally tempo tracking
- Output Rendering - Produces a composite video with synchronized views
✅ Player Heatmaps – Track player positioning across the match.
✅ Ball Heatmaps – Visualize shot placement and movement.
✅ Kitchen Detection – Shows who is in the non-volley zone per frame.
✅ Rally Length & Tempo – Calculates rally duration and rallies/minute.
✅ Composite Video – Side-by-side view of:
Main annotated video
Bird’s-eye projection
Analytics dashboard (2×2 grid)
✅ Tkinter Desktop App – GUI for video selection, processing progress, and analytics badges.
Clone repository
git clone URL
Install depenedencies:
pip install -r requirements.txt
Run via GUI
python main.py
- select a
.mp4video from your system - Click process video
- Progress bar and status will update as processing runs
- Composite video will be saved under
video_outputs/run_<timestamp>/Main_overlay.mp4
-
analytics.py – Maintains heatmaps, kitchen detection, rally stats; renders analytics panels
-
ball_tracker.py – Detects ball bounding box and projects center point into bird’s-eye view
-
court_detection.py – Detects 12 keypoints and computes homography for court projection
-
player_tracker.py – Detects players and projects their on-court locations
-
process_video.py – Orchestrates full pipeline and renders composite video
-
main.py – Tkinter desktop UI for selecting/processing videos and monitoring progress
