{"id":14065023,"url":"https://github.com/wmcnally/golfdb","last_synced_at":"2025-07-29T19:33:55.347Z","repository":{"id":45809524,"uuid":"175050924","full_name":"wmcnally/golfdb","owner":"wmcnally","description":"GolfDB is a video database for Golf Swing Sequencing, which involves detecting 8 golf swing events in trimmed golf swing videos. This repo demos the baseline model, SwingNet.","archived":false,"fork":false,"pushed_at":"2023-01-24T05:39:21.000Z","size":662,"stargazers_count":194,"open_issues_count":6,"forks_count":59,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-08-13T07:07:58.655Z","etag":null,"topics":["action-recognition","event-detection","golf","pytorch","temporal","video"],"latest_commit_sha":null,"homepage":"","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/wmcnally.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}},"created_at":"2019-03-11T17:30:35.000Z","updated_at":"2024-07-26T16:02:28.000Z","dependencies_parsed_at":"2023-02-13T18:15:59.128Z","dependency_job_id":null,"html_url":"https://github.com/wmcnally/golfdb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wmcnally%2Fgolfdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wmcnally%2Fgolfdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wmcnally%2Fgolfdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wmcnally%2Fgolfdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wmcnally","download_url":"https://codeload.github.com/wmcnally/golfdb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228046017,"owners_count":17861078,"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":["action-recognition","event-detection","golf","pytorch","temporal","video"],"created_at":"2024-08-13T07:04:14.641Z","updated_at":"2024-12-04T04:30:38.180Z","avatar_url":"https://github.com/wmcnally.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# GolfDB: A Video Database for Golf Swing Sequencing\n\nThe code in this repository is licensed under a [Creative Commons Attribution-NonCommercial 4.0 International License](https://creativecommons.org/licenses/by-nc/4.0/). \n\n## Introduction\nGolfDB is a high-quality video dataset created for general recognition applications \nin the sport of golf, and specifically for the task of golf swing sequencing. \n\nThis repo contains a simple PyTorch implemention of the SwingNet baseline model presented in the \n[paper](https://arxiv.org/abs/1903.06528).\nThe model was trained on split 1 **without any data augmentation** and achieved an average PCE of 71.5% (PCE\nof 76.1% reported in the paper is credited to data augmentation including horizontal flipping and affine \ntransformations). \n\nIf you use this repo please cite the GolfDB paper:\n```\n@InProceedings{McNally_2019_CVPR_Workshops,\nauthor = {McNally, William and Vats, Kanav and Pinto, Tyler and Dulhanty, Chris and McPhee, John and Wong, Alexander},\ntitle = {GolfDB: A Video Database for Golf Swing Sequencing},\nbooktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR) Workshops},\nmonth = {June},\nyear = {2019}\n}\n```\n\n## Dependencies\n* [PyTorch](https://pytorch.org/)\n\n## Getting Started\nRun [generate_splits.py](./data/generate_splits.py) to convert the .mat dataset file to a dataframe and \ngenerate the 4 splits.\n\n### Train\n* I have provided the preprocessed video clips for a frame size of 160x160 (download \n[here](https://drive.google.com/file/d/1uBwRxFxW04EqG87VCoX3l6vXeV5T5JYJ/view?usp=sharing)). \nPlace 'videos_160' in the [data](./data/) directory. \nIf you wish to use a different input configuration you must download the YouTube videos (URLs provided in \ndataset) and preprocess the videos yourself. I have provided [preprocess_videos.py](./data/preprocess_videos.py) to\nhelp with that.\n\n* Download the MobileNetV2 pretrained weights from this [repository](https://github.com/tonylins/pytorch-mobilenet-v2) \nand place 'mobilenet_v2.pth.tar' in the root directory. \n\n* Run [train.py](train.py)\n\n### Evaluate\n* Train your own model by following the steps above or download the pre-trained weights \n[here](https://drive.google.com/file/d/1MBIDwHSM8OKRbxS8YfyRLnUBAdt0nupW/view?usp=sharing). Create a 'models' directory\nif not already created and place 'swingnet_1800.pth.tar' in this directory.\n\n* Run [eval.py](eval.py). If using the pre-trained weights provided, the PCE should be 0.715.  \n\n### Test your own video\n* Follow steps above to download pre-trained weights. Then in the terminal: `python3 test_video.py -p test_video.mp4`\n\n* **Note:** This code requires the sample video to be cropped and cut to bound a single golf swing. \nI used online video [cropping](https://ezgif.com/crop-video) and [cutting](https://online-video-cutter.com/) \ntools for my golf swing video. See test_video.mp4 for reference.\n\nGood luck!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwmcnally%2Fgolfdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwmcnally%2Fgolfdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwmcnally%2Fgolfdb/lists"}