A comprehensive desktop application designed for automated pickleball match analysis using computer vision and deep learning.
- Object Detection: Real-time tracking of players, paddles, and the pickleball using YOLOv8/v11.
- Court Mapping: Automated court keypoint detection and homography estimation for top-down analytics.
- Live Analysis: Integrated GUI for real-time video processing and visualization.
- Analytics & Insights:
- Trajectory interpolation for missing ball detections.
- Interactive heatmaps of player and ball movements.
- Event logging and session summaries.
- YouTube Support: Directly analyze matches from YouTube URLs using
yt-dlp. - Data Export: Export results to MP4 (annotated video), CSV (event log), and JSON (summary).
.
├── data/ # Sample videos and test data
├── models/ # Pre-trained YOLO models (.pt)
├── outputs/ # Generated analysis reports and videos
├── pickleball_analysis/ # Core package source code
│ ├── core/ # Analysis logic, models, and tracking
│ └── gui/ # CustomTkinter interface components
├── main.py # Application entry point
├── requirements.txt # Project dependencies
└── README.md # Project documentation
-
Clone the repository:
git clone https://github.com/yourusername/pickleball-analysis.git cd pickleball-analysis -
Create a virtual environment (recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
Note: Ensure you have
ffmpeginstalled on your system for video processing.
Run the main application using the following command:
python main.pyYou can also customize the launch parameters via command line:
python main.py --source data/test.mp4 --device 0 --imgsz 960 --heatmap--source: Path to a video file or YouTube URL.--device: Torch device (e.g.,0,1, orcpu).--heatmap: Enable heatmap generation by default.--court-model: Path to a custom court pose model.--object-model: Path to a custom object detection model.
- Ultralytics: Powering the YOLO object detection and pose models.
- CustomTkinter: Providing a modern desktop UI.
- OpenCV: For high-performance video frame processing.
- yt-dlp: For seamless YouTube video integration.
Contributions are welcome! If you encounter issues or have ideas for improvements, please feel free to:
- Open an Issue to report a bug.
- Submit a Pull Request (PR) with your fixes or enhancements.
Distributed under the MIT License. See LICENSE for more information.
