Dataset Viewer
The dataset could not be loaded because the splits use different data file formats, which is not supported. Read more about the splits configuration. Click for more details.
Couldn't infer the same data file format for all splits. Got {NamedSplit('train'): ('webdataset', {}), NamedSplit('test'): ('csv', {})}
Error code:   FileFormatMismatchBetweenSplitsError

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

HMDB51 Action Recognition Dataset

6,766 video clips · 51 action classes · WebDataset tar-shard format

Why tar shards?

Videos are packed into a small number of large .tar shards instead of 6,766 individual files. This makes downloads 10–50× faster and more reliable (fewer HTTP connections, no Git LFS stalling).

Dataset Structure

hf_dataset/
├── .gitattributes
├── README.md
├── metadata_train.csv    # 3,570 clips
├── metadata_test.csv     # 1,530 clips
├── metadata_other.csv    # 1,666 clips
└── shards/
│   ├── other-000000.tar  (484 MB)
│   ├── test-000000.tar  (462 MB)
│   ├── train-000000.tar  (505 MB)
│   ├── train-000001.tar  (504 MB)
│   ├── train-000002.tar  (120 MB)

Each .tar shard contains pairs of files per video sample:

File Content
split-NNNNNNN.avi Raw video bytes
split-NNNNNNN.json {"label": "brush_hair", "filename": "foo.avi", "split": "train"}

Splits

Split Clips
train 3,570
test 1,530
other 1,666

Classes (51 total)

brush_hair, cartwheel, catch, chew, clap, climb, climb_stairs, dive, draw_sword, dribble, drink, eat, fall_floor, fencing, flic_flac, golf, handstand, hit, hug, jump, kick, kick_ball, kiss, laugh, pick, pour, pullup, punch, push, pushup, ride_bike, ride_horse, run, shake_hands, shoot_ball, shoot_bow, shoot_gun, sit, situp, smile, smoke, somersault, stand, swing_baseball, sword, sword_exercise, talk, throw, turn, walk, wave

Usage

Option A – Streaming (no download needed!)

import webdataset as wds
from huggingface_hub import get_token

# Stream train shards directly from HF Hub
url = "https://huggingface.co/datasets/YOUR_USERNAME/hmdb51/resolve/main/shards/train-{000000..000009}.tar"
ds = (
    wds.WebDataset(url)
    .decode()
    .to_tuple("avi", "json")
)
for video_bytes, meta in ds:
    label = meta["label"]
    # process video_bytes with your video library

Option B – Download shards then iterate

# Download
python download_dataset.py --repo-id YOUR_USERNAME/hmdb51

# Then stream locally
import webdataset as wds
ds = wds.WebDataset("./hf_download/shards/train-*.tar").decode().to_tuple("avi", "json")
for video_bytes, meta in ds:
    print(meta["label"])
Downloads last month
30