def __init__(self, opts): self.data_root = opts.data_root self.device = opts.device hr_list = os.path.join(opts.test_filelist) self.datasets_hr = pd.read_csv(hr_list, header=None) self.noises_mean, self.noise_yuv, self.noises_weight = get_noises_list( opts.noise_path, 0.5)
def __init__(self, opts): self.data_root = opts.data_root self.device = opts.device hr_list = os.path.join(opts.test_filelist) self.datasets_hr = pd.read_csv(hr_list, header=None) self.noises_mean, self.noise_yuv, self.noises_weight = get_noises_list( opts.noise_path, 1) self.transform = transforms.Compose([ # transforms.Resize(256), transforms.RandomCrop(256), transforms.ToTensor(), ])
def __init__(self, opts): self.data_root = opts.data_root self.device = opts.device self.main_path = opts.main_path hr_list = os.path.join(opts.val_filelist) self.datasets_hr = pd.read_csv(hr_list, header=None) self.noises_mean, self.noise_yuv, self.noises_weight = get_noises_list( opts.noise_path, 1) self.with_possion = opts.with_possion self.imgfilter_l = opts.imgfilter_l self.imgfilter_h = opts.imgfilter_h self.with_texturesyn_thesis = opts.with_texturesyn_thesis self.transform = transforms.Compose([ # transforms.Resize(256), transforms.CenterCrop(opts.centralcropsize), transforms.RandomCrop(opts.cropsize), transforms.ToTensor(), ])