From 4356ba057841b3ef42733a4bea56d80d36618279 Mon Sep 17 00:00:00 2001 From: Xintao Date: Sun, 8 Aug 2021 16:26:09 +0800 Subject: [PATCH] update readme --- README.md | 1 + Training.md | 10 +++++----- options/train_realesrgan_x4plus.yml | 4 ++-- options/train_realesrnet_x4plus.yml | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 644450f..97f671c 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,7 @@ This executable file is based on the wonderful [Tencent/ncnn](https://github.com # We use BasicSR for both training and inference pip install basicsr pip install -r requirements.txt + python setup.py develop ``` ## :zap: Quick Inference diff --git a/Training.md b/Training.md index 50454ae..64704e1 100644 --- a/Training.md +++ b/Training.md @@ -44,7 +44,7 @@ DF2K_HR_sub/000001_s003.png name: DF2K+OST type: RealESRGANDataset dataroot_gt: datasets/DF2K # modify to the root path of your folder - meta_info: data/meta_info/meta_info_DF2Kmultiscale+OST_sub.txt # modify to your own generate meta info txt + meta_info: realesrgan/meta_info/meta_info_DF2Kmultiscale+OST_sub.txt # modify to your own generate meta info txt io_backend: type: disk ``` @@ -76,12 +76,12 @@ DF2K_HR_sub/000001_s003.png 1. Before the formal training, you may run in the `--debug` mode to see whether everything is OK. We use four GPUs for training: ```bash CUDA_VISIBLE_DEVICES=0,1,2,3 \ - python -m torch.distributed.launch --nproc_per_node=4 --master_port=4321 train.py -opt options/train_realesrnet_x4plus.yml --launcher pytorch --debug + python -m torch.distributed.launch --nproc_per_node=4 --master_port=4321 realesrgan/train.py -opt options/train_realesrnet_x4plus.yml --launcher pytorch --debug ``` 1. The formal training. We use four GPUs for training. We use the `--auto_resume` argument to automatically resume the training if necessary. ```bash CUDA_VISIBLE_DEVICES=0,1,2,3 \ - python -m torch.distributed.launch --nproc_per_node=4 --master_port=4321 train.py -opt options/train_realesrnet_x4plus.yml --launcher pytorch --auto_resume + python -m torch.distributed.launch --nproc_per_node=4 --master_port=4321 realesrgan/train.py -opt options/train_realesrnet_x4plus.yml --launcher pytorch --auto_resume ``` ## Train Real-ESRGAN @@ -91,10 +91,10 @@ DF2K_HR_sub/000001_s003.png 1. Before the formal training, you may run in the `--debug` mode to see whether everything is OK. We use four GPUs for training: ```bash CUDA_VISIBLE_DEVICES=0,1,2,3 \ - python -m torch.distributed.launch --nproc_per_node=4 --master_port=4321 train.py -opt options/train_realesrgan_x4plus.yml --launcher pytorch --debug + python -m torch.distributed.launch --nproc_per_node=4 --master_port=4321 realesrgan/train.py -opt options/train_realesrgan_x4plus.yml --launcher pytorch --debug ``` 1. The formal training. We use four GPUs for training. We use the `--auto_resume` argument to automatically resume the training if necessary. ```bash CUDA_VISIBLE_DEVICES=0,1,2,3 \ - python -m torch.distributed.launch --nproc_per_node=4 --master_port=4321 train.py -opt options/train_realesrgan_x4plus.yml --launcher pytorch --auto_resume + python -m torch.distributed.launch --nproc_per_node=4 --master_port=4321 realesrgan/train.py -opt options/train_realesrgan_x4plus.yml --launcher pytorch --auto_resume ``` diff --git a/options/train_realesrgan_x4plus.yml b/options/train_realesrgan_x4plus.yml index 940a777..25bb5a2 100644 --- a/options/train_realesrgan_x4plus.yml +++ b/options/train_realesrgan_x4plus.yml @@ -39,7 +39,7 @@ datasets: name: DF2K+OST type: RealESRGANDataset dataroot_gt: datasets/DF2K - meta_info: data/meta_info/meta_info_DF2Kmultiscale+OST_sub.txt + meta_info: realesrgan/data/meta_info/meta_info_DF2Kmultiscale+OST_sub.txt io_backend: type: disk @@ -100,7 +100,7 @@ network_d: # path path: # use the pre-trained Real-ESRNet model - pretrain_network_g: experiments/train_RealESRNetx4plus_1000k_B12G4_fromESRGAN/model/net_g_1000000.pth + pretrain_network_g: experiments/train_RealESRNetx4plus_1000k_B12G4_fromESRGAN/models/net_g_1000000.pth param_key_g: params_ema strict_load_g: true resume_state: ~ diff --git a/options/train_realesrnet_x4plus.yml b/options/train_realesrnet_x4plus.yml index 400c580..2e13c39 100644 --- a/options/train_realesrnet_x4plus.yml +++ b/options/train_realesrnet_x4plus.yml @@ -36,7 +36,7 @@ datasets: name: DF2K+OST type: RealESRGANDataset dataroot_gt: datasets/DF2K - meta_info: data/meta_info/meta_info_DF2Kmultiscale+OST_sub.txt + meta_info: realesrgan/data/meta_info/meta_info_DF2Kmultiscale+OST_sub.txt io_backend: type: disk