something_else icon indicating copy to clipboard operation
something_else copied to clipboard

Question about variable meaning in dataset loader

Open YAOYI626 opened this issue 5 years ago • 1 comments

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
  1. Does the sample_rate here 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.

  2. Does the frame_duration mean number of frames? Here I find we're setting the frame_duration as num_frames in our args. Do it mean we will have the fixed frames (like 8) for every video?

  3. What does self.coord_nr_frames mean? Why it's a half of frames_duration?

Looking forward your kind reply, thanks! @joaanna @ruiyan1995

YAOYI626 avatar Sep 02 '20 17:09 YAOYI626

@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.

ruiyan1995 avatar Sep 03 '20 16:09 ruiyan1995