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.

http://serre-lab.clps.brown.edu/wp-content/uploads/2012/08/HMDB_snapshot1.png http://serre-lab.clps.brown.edu/wp-content/uploads/2012/08/HMDB_snapshot2.png

Setup

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

Filename

Size

hmdb51_org.rar

2.1 GB

test_train_splits.rar

200 KB

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

python hmdb51.py

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.

Note

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