Table Of Contents
Table Of Contents

Prepare the HMDB51 Dataset

HMDB51 is an action recognition dataset, collected from various sources, mostly from movies, and a small proportion from public databases such as the Prelinger archive, YouTube and Google videos. The dataset contains 6,766 clips divided into 51 action categories, each containing a minimum of 100 clips. This tutorial will go through the steps of preparing this dataset for GluonCV.


We need the following two files from HMDB51: the dataset and the official train/test split.




2.1 GB


200 KB

The easiest way to download and unpack these files is to download helper script and run the following command:


This script will help you download the dataset, unpack the data from compressed files, decode the videos to frames, and generate the training files for you. All the files will be stored at ~/.mxnet/datasets/hmdb51 by default. If you want to use more workers to speed up, please specify --num-worker to a larger number.


You need at least 60 GB disk space to download and extract the dataset. SSD (Solid-state disks) is preferred over HDD because of faster speed.

You may need to install unrar by sudo apt install unrar.

You may need to install rarfile, Cython, mmcv by pip install rarfile Cython mmcv.

The data preparation process may take a while. The total time to prepare the dataset depends on your Internet speed and disk performance. For example, it takes about 30min on an AWS EC2 instance with EBS.

Total running time of the script: ( 0 minutes 0.037 seconds)

Gallery generated by Sphinx-Gallery

Table Of Contents