Skip to content

sumanblack666/pickleball-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advanced Pickleball Analysis

A comprehensive desktop application designed for automated pickleball match analysis using computer vision and deep learning.

Analysis Preview

Features

  • 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).

Repository Structure

.
├── 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

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/pickleball-analysis.git
    cd pickleball-analysis
  2. Create a virtual environment (recommended):

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies:

    pip install -r requirements.txt

    Note: Ensure you have ffmpeg installed on your system for video processing.

Usage

Run the main application using the following command:

python main.py

CLI Arguments

You 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, or cpu).
  • --heatmap: Enable heatmap generation by default.
  • --court-model: Path to a custom court pose model.
  • --object-model: Path to a custom object detection model.

Core Dependencies

  • 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.

Status & Contributing

⚠️ Note: This project is still in early development and may contain bugs.

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.

License

Distributed under the MIT License. See LICENSE for more information.

About

Real-time AI-powered pickleball analytics: player tracking, ball trajectory, and heatmaps. Early development — contributions wanted!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages