mirror of
https://github.com/TencentARC/GFPGAN.git
synced 2025-05-16 07:10:24 -07:00
update trainining
This commit is contained in:
parent
2bbdcc1c84
commit
c466b9bfdd
11
README.md
11
README.md
@ -81,6 +81,17 @@ python inference_gfpgan_full.py --model_path experiments/pretrained_models/GFPGA
|
|||||||
We provide complete training codes for GFPGAN. <br>
|
We provide complete training codes for GFPGAN. <br>
|
||||||
You could improve it according to your own needs.
|
You could improve it according to your own needs.
|
||||||
|
|
||||||
|
1. Dataset preparation: [FFHQ](https://github.com/NVlabs/ffhq-dataset)
|
||||||
|
|
||||||
|
1. Download pre-trained models and other data. Put them in the `experiments/pretrained_models` folder.
|
||||||
|
1. [Pretrained StyleGAN2 model: StyleGAN2_512_Cmul1_FFHQ_B12G4_scratch_800k.pth](https://github.com/TencentARC/GFPGAN/releases/download/v0.1.0/StyleGAN2_512_Cmul1_FFHQ_B12G4_scratch_800k.pth)
|
||||||
|
1. [Component locations of FFHQ: FFHQ_eye_mouth_landmarks_512.pth](https://github.com/TencentARC/GFPGAN/releases/download/v0.1.0/FFHQ_eye_mouth_landmarks_512.pth)
|
||||||
|
1. [A simple ArcFace model: arcface_resnet18.pth](https://github.com/TencentARC/GFPGAN/releases/download/v0.1.0/arcface_resnet18.pth)
|
||||||
|
|
||||||
|
1. Modify the configuration file `train_gfpgan_v1.yml` accordingly.
|
||||||
|
|
||||||
|
1. Training
|
||||||
|
|
||||||
> python -m torch.distributed.launch --nproc_per_node=4 --master_port=22021 train.py -opt train_gfpgan_v1.yml --launcher pytorch
|
> python -m torch.distributed.launch --nproc_per_node=4 --master_port=22021 train.py -opt train_gfpgan_v1.yml --launcher pytorch
|
||||||
|
|
||||||
## :scroll: License and Acknowledgement
|
## :scroll: License and Acknowledgement
|
||||||
|
11
README_CN.md
11
README_CN.md
@ -81,6 +81,17 @@ python inference_gfpgan_full.py --model_path experiments/pretrained_models/GFPGA
|
|||||||
We provide complete training codes for GFPGAN. <br>
|
We provide complete training codes for GFPGAN. <br>
|
||||||
You could improve it according to your own needs.
|
You could improve it according to your own needs.
|
||||||
|
|
||||||
|
1. Dataset preparation: [FFHQ](https://github.com/NVlabs/ffhq-dataset)
|
||||||
|
|
||||||
|
1. Download pre-trained models and other data. Put them in the `experiments/pretrained_models` folder.
|
||||||
|
1. [Pretrained StyleGAN2 model: StyleGAN2_512_Cmul1_FFHQ_B12G4_scratch_800k.pth](https://github.com/TencentARC/GFPGAN/releases/download/v0.1.0/StyleGAN2_512_Cmul1_FFHQ_B12G4_scratch_800k.pth)
|
||||||
|
1. [Component locations of FFHQ: FFHQ_eye_mouth_landmarks_512.pth](https://github.com/TencentARC/GFPGAN/releases/download/v0.1.0/FFHQ_eye_mouth_landmarks_512.pth)
|
||||||
|
1. [A simple ArcFace model: arcface_resnet18.pth](https://github.com/TencentARC/GFPGAN/releases/download/v0.1.0/arcface_resnet18.pth)
|
||||||
|
|
||||||
|
1. Modify the configuration file `train_gfpgan_v1.yml` accordingly.
|
||||||
|
|
||||||
|
1. Training
|
||||||
|
|
||||||
> python -m torch.distributed.launch --nproc_per_node=4 --master_port=22021 train.py -opt train_gfpgan_v1.yml --launcher pytorch
|
> python -m torch.distributed.launch --nproc_per_node=4 --master_port=22021 train.py -opt train_gfpgan_v1.yml --launcher pytorch
|
||||||
|
|
||||||
## :scroll: License and Acknowledgement
|
## :scroll: License and Acknowledgement
|
||||||
|
7
experiments/pretrained_models/README.md
Normal file
7
experiments/pretrained_models/README.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# Pre-trained Models and Other Data
|
||||||
|
|
||||||
|
Download pre-trained models and other data. Put them in this folder.
|
||||||
|
|
||||||
|
1. [Pretrained StyleGAN2 model: StyleGAN2_512_Cmul1_FFHQ_B12G4_scratch_800k.pth](https://github.com/TencentARC/GFPGAN/releases/download/v0.1.0/StyleGAN2_512_Cmul1_FFHQ_B12G4_scratch_800k.pth)
|
||||||
|
1. [Component locations of FFHQ: FFHQ_eye_mouth_landmarks_512.pth](https://github.com/TencentARC/GFPGAN/releases/download/v0.1.0/FFHQ_eye_mouth_landmarks_512.pth)
|
||||||
|
1. [A simple ArcFace model: arcface_resnet18.pth](https://github.com/TencentARC/GFPGAN/releases/download/v0.1.0/arcface_resnet18.pth)
|
@ -9,9 +9,11 @@ datasets:
|
|||||||
train:
|
train:
|
||||||
name: FFHQ
|
name: FFHQ
|
||||||
type: FFHQDegradationDataset
|
type: FFHQDegradationDataset
|
||||||
dataroot_gt: datasets/ffhq/ffhq_512.lmdb
|
# dataroot_gt: datasets/ffhq/ffhq_512.lmdb
|
||||||
|
dataroot_gt: datasets/ffhq/ffhq_512
|
||||||
io_backend:
|
io_backend:
|
||||||
type: lmdb
|
# type: lmdb
|
||||||
|
type: disk
|
||||||
|
|
||||||
use_hflip: true
|
use_hflip: true
|
||||||
mean: [0.5, 0.5, 0.5]
|
mean: [0.5, 0.5, 0.5]
|
||||||
@ -44,10 +46,12 @@ datasets:
|
|||||||
prefetch_mode: ~
|
prefetch_mode: ~
|
||||||
|
|
||||||
val:
|
val:
|
||||||
name: validation1020_512
|
# Please modify accordingly to use your own validation
|
||||||
|
# Or comment the val block if do not need validation during training
|
||||||
|
name: validation
|
||||||
type: PairedImageDataset
|
type: PairedImageDataset
|
||||||
dataroot_lq: datasets/faces/validation1020_512/input # TODO: modify before release
|
dataroot_lq: datasets/faces/validation/input
|
||||||
dataroot_gt: datasets/faces/validation1020_512/input
|
dataroot_gt: datasets/faces/validation/reference
|
||||||
io_backend:
|
io_backend:
|
||||||
type: disk
|
type: disk
|
||||||
mean: [0.5, 0.5, 0.5]
|
mean: [0.5, 0.5, 0.5]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user