diff --git a/codes/data_scripts/extract_subimages.py b/codes/data_scripts/extract_subimages.py index a3dbd38f..f3d62e6c 100644 --- a/codes/data_scripts/extract_subimages.py +++ b/codes/data_scripts/extract_subimages.py @@ -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' diff --git a/codes/test.py b/codes/test.py index 5f17b180..2793481f 100644 --- a/codes/test.py +++ b/codes/test.py @@ -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) diff --git a/codes/train.py b/codes/train.py index f372293b..c1cdc062 100644 --- a/codes/train.py +++ b/codes/train.py @@ -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)