For more details, please refer to the official website. We provide scripts with documentations. Before we start, please make sure that the directory is located at $MMACTION/data_tools/ucf101/
.
First of all, run the following script to prepare annotations.
bash download_annotations.sh
Then, use the following script to prepare videos.
bash download_videos.sh
Now it is time to extract frames from videos.
Before extraction, please refer to DATASET.md
for installing dense_flow.
If you have some SSD, then we recommend extracting frames there for better I/O performance. The extracted frames (RGB + Flow) will take up ~100GB.
# execute these two line (Assume the SSD is mounted at "/mnt/SSD/")
mkdir /mnt/SSD/ucf101_extracted/
ln -s /mnt/SSD/ucf101_extracted/ ../data/ucf101/rawframes
If you didn't install dense_flow in the installation or only want to play with RGB frames (since extracting optical flow can be both time-comsuming and space-hogging), consider running the following script to extract RGB-only frames.
bash extract_rgb_frames.sh
If both rgb and optical flow are required, run the following script to extract frames alternatively.
bash extract_frames.sh
Run the follow script to generate filelist in the format of rawframes and videos.
bash generate_filelist.sh
In the context of the whole project (for ucf101 only), the folder structure will look like:
mmaction
├── mmaction
├── tools
├── configs
├── data
│ ├── ucf101
│ │ ├── ucf101_{train,val}_split_{1,2,3}_rawframes.txt
│ │ ├── ucf101_{train,val}_split_{1,2,3}_videos.txt
│ │ ├── annotations
│ │ ├── videos
│ │ │ ├── ApplyEyeMakeup
│ │ │ │ ├── v_ApplyEyeMakeup_g01_c01.avi
│ │ │ ├── YoYo
│ │ │ │ ├── v_YoYo_g25_c05.avi
│ │ ├── rawframes
│ │ │ ├── ApplyEyeMakeup
│ │ │ │ ├── v_ApplyEyeMakeup_g01_c01
│ │ │ │ │ ├── img_00001.jpg
│ │ │ │ │ ├── img_00002.jpg
│ │ │ │ │ ├── ...
│ │ │ │ │ ├── flow_x_00001.jpg
│ │ │ │ │ ├── flow_x_00002.jpg
│ │ │ │ │ ├── ...
│ │ │ │ │ ├── flow_y_00001.jpg
│ │ │ │ │ ├── flow_y_00002.jpg
│ │ │ ├── ...
│ │ │ ├── YoYo
│ │ │ │ ├── v_YoYo_g01_c01
│ │ │ │ ├── ...
│ │ │ │ ├── v_YoYo_g25_c05
For training and evaluating on UCF101, please refer to GETTING_STARTED.md.