Analyze a golf swing looking at critical points.
Project description
Introdction
This package provides a utility for analyzing a golf swing. The input data is represented as a json file generated by GolfTracker.
The scripts in this package simply analze the data and meausre the various metrics associated with the swing.
Json File Format
An example json file is present in the data folder. It has the following entries.
| Class | Attribute | Type | Description |
|------------------|----------------|----------------------|------------------------------------| |
| GolfData
| video_spec
| VideoSpec
| The video specifications. |
| | video_input
| VideoInput
| Information about the video input. |
| | num_frames
| int
| The number of frames in the video analysis. |
| | pose_result
| PoseResult
| The result of the pose analysis. |
| | club_head_result
| ClubHeadResult
| Results of the club head analysis. |
| | mp_result
| List[List[float]]
| Multi-dimensional list representing additional analysis results. |
Each of the child dict definitons are below.
Class | Attribute | Type | Description |
---|---|---|---|
VideoSpec |
height |
int |
The height of the video in pixels. |
width |
int |
The width of the video in pixels. | |
num_frames |
int |
The number of frames in the video. | |
fps |
int |
The frames per second rate of the video. | |
scale |
int |
The scale factor used for the video. | |
rotate |
str |
The rotation setting for the video, if any. | |
VideoInput |
fname |
str |
The file name of the video. |
size |
int |
The size of the video file in bytes. | |
PoseResult |
poses |
List[str] |
A list of identified poses. |
handed |
str |
Information on whether the subject is left or right-handed, or 'Unknown'. | |
ClubHeadResult |
norm_points |
List[List[float]] |
Normalized points representing the position of the club head. |
algos |
List[str] |
List of algorithms used for analyzing the club |
Installation
Installs as a standard python package using PIP.
pip install golftrainer
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for golftrainer-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef2ffcd54caed4e194d3c8cf4963ab23b9abb05e3cd71bdad9dd969ea719c0da |
|
MD5 | bac5fe51727e4bb7cfd7c7bd759f8142 |
|
BLAKE2b-256 | f69a41ab48da2b399d7bcec2013eaf6cffe07bba8e88e17e6eb9575467e36c26 |