AI coach and Emulator for Professional Tennis
Download the videos and save them in a folder, and match the folder name in the code.
Downlaod the models from the link below.
Run main.py in order to get the ball tracking and tennis court keypoints prediction on video and be able to detect in which zones the ball lands, the tennis_shot_recognition code now is implemented in main too.
N.B: When runnning the main script make sure to set left-handed = True, since Nadal is left handed.
The expected output should be the tennis_analysis_results.csv file containing each shot and its landing position.
Next run the most_common_play.py script to get the statistics of the player's preferred playstyle depending on the most repeated sequences, the most used type of shot and other important informations.

TrackNet Implementation https://github.com/yastrebksv/TrackNet
Tennis Shot Recognition: https://github.com/antoinekeller/tennis_shot_recognition/tree/master