Question about variable meaning in dataset loader
Thank author for the awesome work and effort to always keep the repo active!
My question is about meaning of variable in data_loader_frames.py.
def __init__(self,
root,
file_input,
file_labels,
frames_duration,
args=None,
multi_crop_test=False,
sample_rate=2,
is_test=False,
is_val=False,
num_boxes=10,
model=None,
if_augment=True):
"""
:param root: data root path
:param file_input: inputs path
:param file_labels: labels path
:param frames_duration: number of frames
:param multi_crop_test:
:param sample_rate: FPS
:param is_test: is_test flag
:param k_split: number of splits of clips from the video
:param sample_split: how many frames sub-sample from each clip
"""
self.in_duration = frames_duration
self.coord_nr_frames = self.in_duration // 2
self.multi_crop_test = multi_crop_test
self.sample_rate = sample_rate
self.if_augment = if_augment
self.is_val = is_val
self.data_root = root
self.dataset_object = WebmDataset(file_input, file_labels, root, is_test=is_test)
self.json_data = self.dataset_object.json_data
self.classes = self.dataset_object.classes
self.classes_dict = self.dataset_object.classes_dict
self.model = model
self.num_boxes = num_boxes
-
Does the
sample_ratehere denote FPS? I have the question 'cause I saw @ruiyan1995 mention we need to extract the video in 12 FPS to get the correct performance. But here we are using sample_rate as 2. It's some confusing for me. -
Does the
frame_durationmean number of frames? Here I find we're setting theframe_durationasnum_framesin our args. Do it mean we will have the fixed frames (like 8) for every video? -
What does
self.coord_nr_framesmean? Why it's a half offrames_duration?
Looking forward your kind reply, thanks! @joaanna @ruiyan1995
@YAOYI626 Extract frames from the original videos with '12 FPS'. The 'sample rate' is used to sample the images as the input of the model from frames that have been extracted.