(self, opt)
| 11 | @DATASET_REGISTRY.register() |
| 12 | class sevenTaskDataset(data.Dataset): |
| 13 | def __init__(self, opt): |
| 14 | super(sevenTaskDataset, self).__init__() |
| 15 | self.opt = opt |
| 16 | self.file_client = None |
| 17 | self.io_backend_opt = opt['io_backend'] |
| 18 | self.mean = opt['mean'] if 'mean' in opt else None |
| 19 | self.std = opt['std'] if 'std' in opt else None |
| 20 | |
| 21 | self.gt_folder, self.lq_folder = None,None #opt['dataroot_gt'], opt['dataroot_lq'] |
| 22 | self.ots_dataset = DehazeOTSALPHADataset(opt,lq_path=opt['ots_lq_path'],gt_path=opt['ots_gt_path']) |
| 23 | self.rain13k_dataset = Rain13kDataset(opt,lq_path=opt['rain_lq_path'],gt_path=opt['rain_gt_path']) |
| 24 | self.deblur_dataset = GoProDataset(opt,dataroot=opt['gopro_path']) |
| 25 | self.lol_dataset = LOLv2Dataset(opt,dataroot=opt['lol_v2_path']) |
| 26 | |
| 27 | augmentators = parse_degradations(opt['augment']) |
| 28 | low_cost_datasets = [LowCostDataset(opt,dataroot=opt['lsdir_path'],augmentator=augmentator) for augmentator in augmentators] |
| 29 | high_cost_datasets = [self.ots_dataset,self.rain13k_dataset,self.deblur_dataset,self.lol_dataset] |
| 30 | |
| 31 | self.datasets = high_cost_datasets + low_cost_datasets |
| 32 | self.types = len(self.datasets) |
| 33 | self.ids = [0] * self.types |
| 34 | self.step = 0 |
| 35 | |
| 36 | def __getitem__(self, index): |
| 37 | type_ids = index % self.types |
nothing calls this directly
no test coverage detected