update readme

This commit is contained in:
Xintao
2021-08-08 16:26:09 +08:00
parent 32a4fa1772
commit 4356ba0578
4 changed files with 9 additions and 8 deletions

View File

@@ -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 # We use BasicSR for both training and inference
pip install basicsr pip install basicsr
pip install -r requirements.txt pip install -r requirements.txt
python setup.py develop
``` ```
## :zap: Quick Inference ## :zap: Quick Inference

View File

@@ -44,7 +44,7 @@ DF2K_HR_sub/000001_s003.png
name: DF2K+OST name: DF2K+OST
type: RealESRGANDataset type: RealESRGANDataset
dataroot_gt: datasets/DF2K # modify to the root path of your folder 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: io_backend:
type: disk 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: 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 ```bash
CUDA_VISIBLE_DEVICES=0,1,2,3 \ 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. 1. The formal training. We use four GPUs for training. We use the `--auto_resume` argument to automatically resume the training if necessary.
```bash ```bash
CUDA_VISIBLE_DEVICES=0,1,2,3 \ 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 ## 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: 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 ```bash
CUDA_VISIBLE_DEVICES=0,1,2,3 \ 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. 1. The formal training. We use four GPUs for training. We use the `--auto_resume` argument to automatically resume the training if necessary.
```bash ```bash
CUDA_VISIBLE_DEVICES=0,1,2,3 \ 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
``` ```

View File

@@ -39,7 +39,7 @@ datasets:
name: DF2K+OST name: DF2K+OST
type: RealESRGANDataset type: RealESRGANDataset
dataroot_gt: datasets/DF2K 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: io_backend:
type: disk type: disk
@@ -100,7 +100,7 @@ network_d:
# path # path
path: path:
# use the pre-trained Real-ESRNet model # 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 param_key_g: params_ema
strict_load_g: true strict_load_g: true
resume_state: ~ resume_state: ~

View File

@@ -36,7 +36,7 @@ datasets:
name: DF2K+OST name: DF2K+OST
type: RealESRGANDataset type: RealESRGANDataset
dataroot_gt: datasets/DF2K 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: io_backend:
type: disk type: disk