This repository adapts code from McNally et. al's original GolfDB repository with modifications and human pose estimation to enhance golf swing phase detection. It includes experiments for baseline models, dimming, and pose estimation.
Citation: McNally, W., Vats, K., Pinto, T., Dulhanty, C., McPhee, J., & Wong, A. (2019). GolfDB: A Video Database for Golf Swing Sequencing. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR) Workshops (pp. pages). IEEE.
- experiments/: Contains scripts for dataloader configurations, training, and evaluation for different experiments (baseline, dimming, pose estimation).
- twostream/: In-progress code to adapt SwingNet to incorporate human pose information as an additional input feature.
- data/: Contains GolfDB pickle files for training and validation splits.
Ensure you have Python and the necessary libraries from requiements.txt.
- Clone the repository:
- Download the golf swing videos from GolfDB's official repository.
- Generate Data Splits: by running generate_splits.py
- Generate Pose Estimation Data: by running pose_estimation_refined.py. Specify key points for the pose estimation skeleton as needed (see MediaPipe Pose Landmark website). This script will generate a new directory with the processed videos.
- Train and Evaluate the Pose Estimation Model: using the scripts within experiments/pose_estimation
- Run Training and Evaluation for Dimming: using the scripts within experiments/dimming. Adjust the pixel dimming specifications in the dataloader as required.