def __init__(self, lq_folder, pipeline, gt_folder = "", num_input_frames = 7, scale = 4, mode = "train", eval_part = None): # for mge, we use ("08", "26") super(SRManyToOneDataset, self).__init__(pipeline, scale, mode) assert num_input_frames % 2 == 1, ( f'num_input_frames should be odd numbers, ' f'but received {num_input_frames }.') self.lq_folder = str(lq_folder) self.gt_folder = str(gt_folder) self.num_input_frames = num_input_frames self.eval_part = eval_part if eval_part is not None: assert is_tuple_of(eval_part, str) self.data_infos = self.load_annotations()
def __init__(self, lq_folder, pipeline, gt_folder="", num_input_frames=7, scale=4, mode="train", eval_part=None, LR_symbol="@"): # impossible name default super(SRManyToManyDataset, self).__init__(pipeline, scale, mode) assert num_input_frames % 2 == 1, ( f'num_input_frames should be odd numbers, ' f'but received {num_input_frames }.') self.lq_folder = str(lq_folder) self.gt_folder = str(gt_folder) self.num_input_frames = num_input_frames self.eval_part = eval_part if eval_part is not None: assert is_tuple_of(eval_part, str) self.LR_symbol = LR_symbol self.data_infos = self.load_annotations()
def __init__(self, lq_folder, pipeline, gt_folder="", num_input_frames=7, scale=4, mode="train", eval_part=None): super(SRManyToOneDataset, self).__init__(pipeline, scale, mode) assert num_input_frames % 2 == 1, ( f'num_input_frames should be odd numbers, ' f'but received {num_input_frames }.') self.lq_folder = str(lq_folder) self.gt_folder = str(gt_folder) self.num_input_frames = num_input_frames self.eval_part = eval_part if eval_part is not None: assert is_tuple_of(eval_part, str) self.data_infos = self.load_annotations() self.logger.info( "SRManyToOneDataset dataset load ok, mode: {} len:{}".format( self.mode, len(self.data_infos)))