An open API service indexing awesome lists of open source software.

https://github.com/kr1shnasomani/sportiq

Player and ball tracking map for Tennis.
https://github.com/kr1shnasomani/sportiq

ball-tracking computer-vision deep-learning neural-network player-tracking

Last synced: 4 months ago
JSON representation

Player and ball tracking map for Tennis.

Awesome Lists containing this project

README

          

Sportiq





The project is designed for player and ball tracking in tennis. It processes video input to detect court boundaries, track player movements, and map ball trajectories, utilizing computer vision techniques, Mediapipe, and a custom ball detection model for accurate analysis and visualization.

## Repository Structure:
The following is the structure of the repository:
```
Sportiq
├── code/
│ ├── BallDetection.py
│ ├── BallMapping.py
│ ├── BallTrackNet.py
│ ├── BodyTracking.py
│ ├── CourtDetection.py
│ ├── CourtMapping.py
│ └── TraceHeader.py
├── dataset/
│ └── input.mp4
├── model/
│ └── TrackNet-Model.md
├── output/
│ └── output.mp4
├── README.md
└── requirements.txt
```

## Execution Guide:
1. Clone the repository:
```
git clone https://github.com/kr1shnasomani/Sportiq.git
cd Sportiq
```

2. Install the dependencies:
```
pip install -r requirements.txt
```

3. In the following files, replace the path with yours:
- `CourtDetection.py` - line 13, enter root directory
- `TraceHeader.py` - line 4, enter the input video path

4. Download the TrackNet model from **https://raw.githubusercontent.com/hgupt3/TRACE/main/TrackNet/Weights.pth** and rename the model to `TrackNet.pth`

5. Run the project:

You will need to run the `CourtDetection.py` script to run thei entire project:
```
/usr/bin/python3 /Users/krishnasomani/Documents/Projects/Sportiq/code/CourtDetection.py
```

## Output:

https://github.com/user-attachments/assets/31d239fb-44a8-4906-a2e6-43886348ba5b

## Workflow:

![image](https://github.com/user-attachments/assets/3a72bb94-7b6e-46e7-baf8-770a92bd4780)