- Extract features:
./script_video2feature.sh
- Generate lists:
- no official splits:
- official splits exist (e.g. UCF, HMDB):
./script_list2DA.sh
- The options in the scripts have comments with the following types:
- no comment: user can still change it, but NOT recommend (may need to change the code or have different experimental results)
- comments with choices (e.g.
true | false
): can only choose from choices - comments as
depend on users
: totally depend on users (mostly related to data path)
video2feature.py
loads the video dataset, and extract frame-level feature vectors, which are are needed for training and validation. A text file with all the category names is needed for labeled dataset.
Run ./script_video2feature.sh
.
There are two modes:
- labeled:
class_file=XXX/class_list_XXX.txt
. The features with the categories only listed in theclass_file
will generated. - unlabeled:
class_file=none
: all the features with the category "unlabeled" will be generated.
Output folder structures:
data_path/
RGB-Feature/
VIDEO_0001/
img_00001.t7
img_00002.t7
...
VIDEO_0002/
...
dataset2split.py
splits the whole dataset into two subsets according to the split ratio (randomly picking videos). Each subset has the same structure as shown above.
Run ./script_dataset2split.sh
.
Options:
input_type
: depend on the format of raw datasplit_ratio
: ratio of training datasplit_feat
: if the features are already generated, users can split the corresponding features as well.
video_dataset2list.py
generates the data list from a video dataset. The output text file will include all the selected categories showing {video_path, frame#, class}.
Run ./script_dataset2list.sh
.
Options:
random_each_video
: IfY
, it means users randomly select video clips from each raw and unsegmented video. ItN
, it means users randomly select video clips from each category.max_num
: maximal numbers of selected video clips for each unsegmented video or category (depend onrandom_each_video
)method_read
: the method of calculating frame # of each videovideo
: load from the raw video folder (slower, but more accurate)frame
: load from the feature folder
suffix
: add some string to the list file name
Output text file (format: [video_full_path frame# class]):
data_path/RGB-Feature/VIDEO_0001/ 100 0
data_path/RGB-Feature/VIDEO_0002/ 150 1
......
If official splits exist (e.g. UCF, HMDB), list_ucf_hmdb_full2DA.py
can separate the data list from the official splits with user chosen DA settings.
Run ./script_list2DA.sh
.