Scripts to download and prepare the ClubheadDB dataset.
Project description
ClubheadDB: A Video Dataset for Golf Clubhead Tracking
ClubheadDB is a web-sourced dataset for computer vision research in golf swing analysis, with a focus on clubhead detection. It contains over 10,000 “down-the-line” frames from public golf swing videos, each hand-annotated with precise clubhead locations. The dataset is fully reproducible: we provide the metadata (video URLs, timestamps) and final annotations, along with scripts to download and extract the exact set of frames used in our study.
🌟 Dataset Highlights
| Feature | Value | Description |
|---|---|---|
| Unique Golfers | 67+ | Video-level split: 47 Train, 10 Validation, 10 Test. |
| Total Annotated Frames | 10,180 | A single bounding box annotation exists for each frame (zero for null examples). |
| Video Sources | YouTube (46%), Reddit (54%) | Sourced from public posts to ensure a wide variety of conditions. |
| Skill Level Mix | Pros (42%), Amateurs (58%) | Includes a mix of professional and amateur golfers. |
| Club Type Mix | Irons (70%), Drivers (27%) and Woods (3%) | A diverse set of clubs to ensure model generalization. |
🚀 Getting the Data
The entire process is managed by the clubhead-build command-line tool.
Prerequisites
Before you begin, you must have the following command-line tools installed and available in your system's PATH:
- Python (3.8 or higher)
- yt-dlp: For downloading video clips from YouTube and Reddit. (Installation Guide)
- ffmpeg: For extracting frames from videos. (Installation Guide)
Installation and Usage
Step 1: Install the Package
The easiest way to get the dataset is to install the package directly from PyPI:
pip install clubhead-db
Step 2: Run the Build Command
Now, you can build the entire dataset by running a single command in your terminal:
clubhead-build
This command will execute the full pipeline:
- It reads
metadata/metadata.csvto find the video clips. - It downloads the clips into a local
videos/directory. - It extracts frames from the videos into the
frames/swing_xxx/images/structure. - It reads
annotations/annotations.parquetand creates the corresponding.txtlabel files in theframes/swing_xxx/labels/structure.
The process may take a significant amount of time depending on your internet connection and the number of videos.
Final Data Structure
After running the pipeline, you will have a frames/ directory organized as follows. This structure is designed to be easy to parse, view, and use for further processing.
frames/
└── swing_001/
├── images/
│ ├── frame_0001.jpg
│ ├── frame_0002.jpg
│ └── ...
└── labels/
├── frame_0001.txt
├── frame_0002.txt
└── ...
Each .txt file contains the bounding box annotations for the corresponding image in YOLO format. Images with no clubhead present will have an empty .txt file.
Citation
If you use ClubheadDB or the tools in this repository in your research, please cite our paper:
(Placeholder until paper gets accepted or rejected:)
@inproceedings{unknownauthor23_2025clubheaddb,
title={ClubheadDB: A Video Dataset for Golf Clubhead Tracking},
author={unknownauthor23},
booktitle={Workshop}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file clubhead_db-1.0.1.tar.gz.
File metadata
- Download URL: clubhead_db-1.0.1.tar.gz
- Upload date:
- Size: 287.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15a1494a2c28855b84f76e9802f018c3387af976e32c19324c7ab2b62521d1d5
|
|
| MD5 |
69132f4f8ec766f093f76d1c0a1d16d5
|
|
| BLAKE2b-256 |
5dea0d3091e7db97540b825252ff319b1b1bd7c6159eae4a270d1027ddea7000
|
File details
Details for the file clubhead_db-1.0.1-py3-none-any.whl.
File metadata
- Download URL: clubhead_db-1.0.1-py3-none-any.whl
- Upload date:
- Size: 286.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
965c42b33b4f92390dccad1854f5687d6a32f8fedd641cf8781117a702365d61
|
|
| MD5 |
94209485a26929aefc28dbdd912d6bf3
|
|
| BLAKE2b-256 |
b092dee1e5273cda67bac8f96f3fc34c1e299c1afb095d779e17397d2dbd98bc
|