Add GTLQ dataset
This commit is contained in:
parent
4d269fdac6
commit
12d92dc443
|
@ -7,14 +7,14 @@ import torch.utils.data as data
|
|||
import data.util as util
|
||||
|
||||
|
||||
class LQGTDataset(data.Dataset):
|
||||
class GTLQDataset(data.Dataset):
|
||||
"""
|
||||
Read LQ (Low Quality, e.g. LR (Low Resolution), blurry, etc) and GT image pairs.
|
||||
If only GT images are provided, generate LQ images on-the-fly.
|
||||
Reads unpaired high-resolution and low resolution images. Downsampled, LR images matching the provided high res
|
||||
images are produced and fed to the downstream model, which can be used in a pixel loss.
|
||||
"""
|
||||
|
||||
def __init__(self, opt):
|
||||
super(LQGTDataset, self).__init__()
|
||||
super(GTLQDataset, self).__init__()
|
||||
self.opt = opt
|
||||
self.data_type = self.opt['data_type']
|
||||
self.paths_LQ, self.paths_GT = None, None
|
||||
|
@ -43,7 +43,7 @@ class LQGTDataset(data.Dataset):
|
|||
self._init_lmdb()
|
||||
GT_path, LQ_path = None, None
|
||||
scale = self.opt['scale']
|
||||
GT_size = self.opt['GT_size']
|
||||
GT_size = self.opt['target_size']
|
||||
|
||||
# get GT image
|
||||
GT_path = self.paths_GT[index]
|
||||
|
|
|
@ -32,6 +32,8 @@ def create_dataset(dataset_opt):
|
|||
from data.LQ_dataset import LQDataset as D
|
||||
elif mode == 'LQGT':
|
||||
from data.LQGT_dataset import LQGTDataset as D
|
||||
elif mode == 'GTLQ':
|
||||
from data.GTLQ_dataset import GTLQDataset as D
|
||||
# datasets for video restoration
|
||||
elif mode == 'REDS':
|
||||
from data.REDS_dataset import REDSDataset as D
|
||||
|
|
Loading…
Reference in New Issue
Block a user