This package provides a utility for analyzing a golf swing. The input data is represented as a json file generated by GolfTracker.
The json file structure is represented by a data class "GolfData". A factory method is used to create it from the json filename.
The structure of the GolfData class is shown below.
Create a virtual env and then clone this directory. Recreate the development env
pip install -r requirements.txt
Install the package locally
pip install -e .
Install the package in your virtual env.
** This is still under developement. Not released yet. **
pip install golftrainer
For this purpose we will use data/00001.json as an example.
To make the notebook run under my virtual env (say 'venv'), follow the following steps.
pip install jupyter
Or for existing install create a new kernel.
ipython kernel install --user --name=venv
cd notebooks/demo
jupyter notebook demo1.ipynb
Once we have the notebook the following commands we can use the GolfData object to access the parameters.
Various sample golf swing videos shot down the line on a right handed golf player with the corresponding json file are stored in this GoogleDrive.
Each video file (either a mp4 or mov) has 2 output files. The ".pkl" is the pickle database and ".json" is the file that we will use for this package to measure the various metrics associated with the swing.
Copies of the json file from google drive are checked into the data directory and has a corresponding notebook in notebooks/demo area.