test w/o GT
This commit is contained in:
parent
0098663b6b
commit
a25ee9464d
|
@ -11,6 +11,7 @@ class LQDataset(data.Dataset):
|
||||||
def __init__(self, opt):
|
def __init__(self, opt):
|
||||||
super(LQDataset, self).__init__()
|
super(LQDataset, self).__init__()
|
||||||
self.opt = opt
|
self.opt = opt
|
||||||
|
self.data_type = self.opt['data_type']
|
||||||
self.paths_LQ, self.paths_GT = None, None
|
self.paths_LQ, self.paths_GT = None, None
|
||||||
self.LQ_env = None # environment for lmdb
|
self.LQ_env = None # environment for lmdb
|
||||||
|
|
||||||
|
@ -27,7 +28,7 @@ class LQDataset(data.Dataset):
|
||||||
LQ_path = None
|
LQ_path = None
|
||||||
|
|
||||||
# get LQ image
|
# get LQ image
|
||||||
LQ_path = self.LQ_path[index]
|
LQ_path = self.paths_LQ[index]
|
||||||
resolution = [int(s) for s in self.sizes_LQ[index].split('_')
|
resolution = [int(s) for s in self.sizes_LQ[index].split('_')
|
||||||
] if self.data_type == 'lmdb' else None
|
] if self.data_type == 'lmdb' else None
|
||||||
img_LQ = util.read_img(self.LQ_env, LQ_path, resolution)
|
img_LQ = util.read_img(self.LQ_env, LQ_path, resolution)
|
||||||
|
|
26
codes/options/test/test_ESRGAN_woGT.yml
Normal file
26
codes/options/test/test_ESRGAN_woGT.yml
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
name: RRDB_ESRGAN_x4
|
||||||
|
suffix: ~ # add suffix to saved images
|
||||||
|
model: sr
|
||||||
|
distortion: sr
|
||||||
|
scale: 4
|
||||||
|
crop_border: ~ # crop border when evaluation. If None(~), crop the scale pixels
|
||||||
|
gpu_ids: [0]
|
||||||
|
|
||||||
|
datasets:
|
||||||
|
test_1: # the 1st test dataset
|
||||||
|
name: set14
|
||||||
|
mode: LQ
|
||||||
|
dataroot_LQ: ../datasets/val_set14/Set14_bicLRx4
|
||||||
|
|
||||||
|
#### network structures
|
||||||
|
network_G:
|
||||||
|
which_model_G: RRDBNet
|
||||||
|
in_nc: 3
|
||||||
|
out_nc: 3
|
||||||
|
nf: 64
|
||||||
|
nb: 23
|
||||||
|
upscale: 4
|
||||||
|
|
||||||
|
#### path
|
||||||
|
path:
|
||||||
|
pretrain_model_G: ../experiments/pretrained_models/RRDB_ESRGAN_x4.pth
|
Loading…
Reference in New Issue
Block a user