https://github.com/szymon-budziak/ai_tennis_game_analysis
Tennis game analysis using AI models such as YOLO.
https://github.com/szymon-budziak/ai_tennis_game_analysis
Last synced: about 2 months ago
JSON representation
Tennis game analysis using AI models such as YOLO.
- Host: GitHub
- URL: https://github.com/szymon-budziak/ai_tennis_game_analysis
- Owner: Szymon-Budziak
- License: mit
- Created: 2024-04-25T14:01:43.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-30T16:17:44.000Z (9 months ago)
- Last Synced: 2025-02-01T02:49:48.260Z (3 months ago)
- Language: Python
- Size: 16.7 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AI Tennis Game Analysis
This project aims to analyze real-time tennis games using AI model and measures players speed, ball shoot speed and
number of players shots. The project uses YOLO model, which is a state-of-the-art, real-time object detection system
that is used to detect objects in images or video. It detects players and the tennis ball. The project also uses
CNNs to extract key points from the court. The project uses OpenCV to process the video and extract the frames.# Installation
The projects uses Poetry to manage dependencies. All the dependencies are in `pyproject.toml`. To install the them, run
the following command:```bash
poetry install
```# Output video
A screenshot from the output video:

# Models used
- YOLO v8 for player detection
- Fine Tuned YOLO for tennis ball detection
- CNN model for court key points extraction# Training
Training for the tennis ball and tennis court key points are written in notebooks:
- Tennis ball detector with YOLO: `src/tennis_ai/training/tennis_ball_detector_training.ipynb`
- Tennis court key points extraction with CNN: `src/tennis_ai/training/tennis_court_key_points_training.ipynb`