This commit is contained in:
James Betker 2020-05-27 08:04:47 -06:00
parent e27a49454e
commit f6815df58b
3 changed files with 7 additions and 7 deletions

View File

@ -13,18 +13,18 @@ import data.util as data_util # noqa: E402
def main():
mode = 'single' # single (one input folder) | pair (extract corresponding GT and LR pairs)
split_img = True
split_img = False
opt = {}
opt['n_thread'] = 20
opt['compression_level'] = 3 # 3 is the default value in cv2
# CV_IMWRITE_PNG_COMPRESSION from 0 to 9. A higher value means a smaller size and longer
# compression time. If read raw images during training, use 0 for faster IO speed.
if mode == 'single':
opt['input_folder'] = 'F:\\4k6k\\datasets\\vrp\\images_sized'
opt['save_folder'] = 'F:\\4k6k\\datasets\\vrp\\images_tiled'
opt['crop_sz'] = 320 # the size of each sub-image
opt['input_folder'] = 'F:\\4k6k\\datasets\\sft_ns_images\\images'
opt['save_folder'] = 'F:\\4k6k\\datasets\\sft_ns_images\\images_tiled'
opt['crop_sz'] = 300 # the size of each sub-image
opt['step'] = 280 # step of the sliding crop window
opt['thres_sz'] = 200 # size threshold
opt['thres_sz'] = 120 # size threshold
extract_single(opt, split_img)
elif mode == 'pair':
GT_folder = '../../datasets/div2k/DIV2K_train_HR'

View File

@ -17,7 +17,7 @@ if __name__ == "__main__":
torch.backends.cudnn.benchmark = True
want_just_images = True
parser = argparse.ArgumentParser()
parser.add_argument('-opt', type=str, help='Path to options YMAL file.', default='../options/test_ESRGAN_adrianna_full.yml')
parser.add_argument('-opt', type=str, help='Path to options YMAL file.', default='../options/upsample_full_movie.yml')
opt = option.parse(parser.parse_args().opt, is_train=False)
opt = option.dict_to_nonedict(opt)

View File

@ -30,7 +30,7 @@ def init_dist(backend='nccl', **kwargs):
def main():
#### options
parser = argparse.ArgumentParser()
parser.add_argument('-opt', type=str, help='Path to option YAML file.', default='../options/train_vix_biggan.yml')
parser.add_argument('-opt', type=str, help='Path to option YAML file.', default='../options/finetune_hoh_resgen_xl_blurring.yml')
parser.add_argument('--launcher', choices=['none', 'pytorch'], default='none',
help='job launcher')
parser.add_argument('--local_rank', type=int, default=0)