This project utilizes OpenCV, YOLO and CNN to track the position, movement of players in a video. YOLOv8 is used to track the players. YOLOv5 is used to track the position of tennis ball at every frame of the video. ResNet34 is fine-tuned to detect the court keypoints.
Download the pretrained weights
https://drive.google.com/file/d/11oPP9h-lVfuOv09RFt0mmvydy4-maTjV/view?usp=sharing,
https://drive.google.com/file/d/1iGQMabajjVm_MbUlCXJDnslnLmYvgleX/view?usp=sharing,
https://drive.google.com/file/d/1ihueDeTl2XiYDiVMYBKpGygnBMG91pIW/view?usp=sharing
Clone the project
git clone https://github.com/abhroroy365/Tennis-Tracker.gitGo to the project directory
cd Tennis-TrackerCreate virtual environment
python -m venv envActivate the virtual environment
env\Scripts\activateInstall dependencies
pip install -r requirements.txtFor training (no need, weights alrady provided)
python .\training\train.pyFor running the tracker on your video
python run-tracker.pyPytorch, OpenCV, YOLO, Python, Computer Vision