{"id":23293227,"url":"https://github.com/philsv/ai_tennis_analysis","last_synced_at":"2025-10-13T03:43:39.559Z","repository":{"id":263000733,"uuid":"866599655","full_name":"philsv/ai_tennis_analysis","owner":"philsv","description":"This is a rebuild project from scratch based on the original work by Abdullah Tarek, which analyzes tennis players in video to measure key metrics such as player speed, ball shot speed, and detects both players and the tennis ball on the court using YOLO, while extracting court keypoints with CNNs.","archived":false,"fork":false,"pushed_at":"2024-11-15T13:34:16.000Z","size":207851,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-20T06:13:57.112Z","etag":null,"topics":["cnn","pytorch","yolo"],"latest_commit_sha":null,"homepage":"https://www.youtube.com/watch?v=L23oIHZE14w\u0026","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/philsv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-02T14:48:34.000Z","updated_at":"2024-11-30T04:45:16.000Z","dependencies_parsed_at":"2024-11-15T14:42:18.770Z","dependency_job_id":null,"html_url":"https://github.com/philsv/ai_tennis_analysis","commit_stats":null,"previous_names":["philsv/ai_tennis_analysis"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philsv%2Fai_tennis_analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philsv%2Fai_tennis_analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philsv%2Fai_tennis_analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philsv%2Fai_tennis_analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/philsv","download_url":"https://codeload.github.com/philsv/ai_tennis_analysis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238574781,"owners_count":19494724,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cnn","pytorch","yolo"],"created_at":"2024-12-20T06:14:04.258Z","updated_at":"2025-10-13T03:43:34.539Z","avatar_url":"https://github.com/philsv.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI Tennis Analysis\n\nThis is a rebuild project from scratch based on the [original work by Abdullah Tarek](https://github.com/abdullahtarek/tennis_analysis), which analyzes tennis players in video to measure key metrics such as player speed, ball shot speed, and detects both players and the tennis ball on the court using YOLO, while extracting court keypoints with CNNs.\n\n## Output Example\n\nThis is a snippet from the final output video:\n\n![image](example.gif)\n\n## Dependencies\n\n* numpy\n* pandas\n* python-dotenv\n* requests\n* roboflow\n* torch\n* torchvision\n* tqdm\n* ultralytics\n\n## Installation\n\n* Clone the project\n\n```bash\ngit clone https://github.com/philsv/ai_tennis_analysis.git\n```\n\n* Install dependencies\n\n```bash\ncd ai_tennis_analysis\npip install -r requirements.txt\n```\n\n* Download the models from [Google Drive](https://drive.google.com/drive/folders/1SIoKD8Yi2c8qN0vltrzw2QuwSRUT9_HT?usp=sharing)\n* Or train the model yourself with the files from the [training folder](https://github.com/philsv/ai_tennis_analysis/tree/main/training)\n\n## Usage\n\n* Run the project\n\n```bash\npython main.py\n```\n\nThis will create the output video and save it in the `outputs` folder.\n\n## Models Used\n\n* YOLO v8 for player detection\n* Fine-tuned YOLO-Model for ball detection\n* Court Key point extraction using Pytorch\n\n## Datasets\n\n* Tennis ball detection dataset [link](https://universe.roboflow.com/viren-dhanwani/tennis-ball-detection)\n* Tennis court key points dataset [link](https://drive.usercontent.google.com/download?id=1lhAaeQCmk2y440PmagA0KmIVBIysVMwu\u0026export=download\u0026authuser=0\u0026confirm=t\u0026uuid=3077628e-fc9b-4ef2-8cde-b291040afb30\u0026at=APZUnTU9lSikCSe3NqbxV5MVad5T%3A1708243355040)\n\n## Author\n\n* Abdullah Tarek\n\n## Reference\n\n* [Build an AI/ML Tennis Analysis system with YOLO, PyTorch, and Key Point Extraction](https://www.youtube.com/watch?v=L23oIHZE14w\u0026)\n\n## To-Do\n\n* Improve Mini-Court Ball Detection\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilsv%2Fai_tennis_analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphilsv%2Fai_tennis_analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilsv%2Fai_tennis_analysis/lists"}