Load video datasets to PyTorch DataLoader. (Custom Video Data set for PyTorch DataLoader)
VDataset can be use to load 20BN-Jester dataset to the PyTorch DataLoader
Required Libraries
torch
Pillow
pandas
Arguments
LableMap Constructor
Argument
Type
Required
Default
Description
labels_csv
str
False
None
The path to the csv file containing the labels and ids.
labels_col_name
str
False
None
The name of the column containing the labels. (Required if labels_csv is not None)
ids_col_name
str/ None
False
None
The name of the column containing the ids.
id_type
type
False
int
The type of the ids.
VDataset Constructor
Argument
Type
Required
Default
Description
csv_file
str
True
-
Path to .csv file
root_dir
str
True
-
Root Directory of the video dataset
file_format
str
False
jpg
File type of the frame images (ex: .jpg, .jpeg, .png)
id_col_name
str
False
video_id
Column name, where id/name of the video on the .csv file
label_col_name
str
False
label
Column name, where label is on the .csv file
frames_limit_mode
str/None
False
None
Mode of the frame count detection ("manual", "csv" or else it auto detects all the frames available)
frames_limit
dict
False
{"start": 0, "end": None}
Number of frames in a video (required if frames_count_mode set to "manual")
frames_limit_col_name
str
False
frames
Column name, where label is on the .csv file (required if frames_count_mode set to "csv")