This project analyzes Tennis players in a video to measure their speed, ball shot speed and number of shots. This project will detect players and the tennis ball using YOLO and also utilizes CNNs to extract court keypoints.
Here is a screenshot from one of the output videos:
drivelink:https://drive.google.com/drive/folders/1Nc_aGyonVLe_DWhZAYgXJr6ZMEfpxOrj?usp=sharing download folder in drive link add folder in training/tennis-ball-detection-6
-
Player & Ball Detection (YOLO): Detect players and tennis balls in video frames.
-
Court Keypoints (CNNs): Extract court lines and points for context.
-
Speed Calculation:
• Player Speed: Measure player movement across frames using court dimensions.
• Ball Shot Speed: Calculate ball velocity based on movement between frames.
- Shot Counting: Detect each ball-player interaction as a shot.
- Tennis ball detetcor with YOLO: training/tennis_ball_detector_training.ipynb
- Tennis court keypoint with Pytorch: training/tennis_court_keypoints_training.ipynb
• YOLO: For detecting players and the tennis ball.
• CNNs: For extracting court keypoints.
• OpenCV: Video processing.
- python3.8
- ultralytics
- pytroch
- pandas
- numpy
- opencv