File tree 4 files changed +38
-5
lines changed
experiments/pretrained_models 4 files changed +38
-5
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,17 @@ python inference_gfpgan_full.py --model_path experiments/pretrained_models/GFPGA
81
81
We provide complete training codes for GFPGAN. < br>
82
82
You could improve it according to your own needs.
83
83
84
+ 1. Dataset preparation: [FFHQ](https://github.com/NVlabs/ffhq-dataset)
85
+
86
+ 1. Download pre-trained models and other data. Put them in the ` experiments/pretrained_models` folder.
87
+ 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)
88
+ 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)
89
+ 1. [A simple ArcFace model: arcface_resnet18.pth](https://github.com/TencentARC/GFPGAN/releases/download/v0.1.0/arcface_resnet18.pth)
90
+
91
+ 1. Modify the configuration file ` train_gfpgan_v1.yml` accordingly.
92
+
93
+ 1. Training
94
+
84
95
> python -m torch.distributed.launch --nproc_per_node=4 --master_port=22021 train.py -opt train_gfpgan_v1.yml --launcher pytorch
85
96
86
97
# # :scroll: License and Acknowledgement
Original file line number Diff line number Diff line change @@ -81,6 +81,17 @@ python inference_gfpgan_full.py --model_path experiments/pretrained_models/GFPGA
81
81
We provide complete training codes for GFPGAN. < br>
82
82
You could improve it according to your own needs.
83
83
84
+ 1. Dataset preparation: [FFHQ](https://github.com/NVlabs/ffhq-dataset)
85
+
86
+ 1. Download pre-trained models and other data. Put them in the ` experiments/pretrained_models` folder.
87
+ 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)
88
+ 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)
89
+ 1. [A simple ArcFace model: arcface_resnet18.pth](https://github.com/TencentARC/GFPGAN/releases/download/v0.1.0/arcface_resnet18.pth)
90
+
91
+ 1. Modify the configuration file ` train_gfpgan_v1.yml` accordingly.
92
+
93
+ 1. Training
94
+
84
95
> python -m torch.distributed.launch --nproc_per_node=4 --master_port=22021 train.py -opt train_gfpgan_v1.yml --launcher pytorch
85
96
86
97
# # :scroll: License and Acknowledgement
Original file line number Diff line number Diff line change
1
+ # Pre-trained Models and Other Data
2
+
3
+ Download pre-trained models and other data. Put them in this folder.
4
+
5
+ 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 )
6
+ 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 )
7
+ 1 . [ A simple ArcFace model: arcface_resnet18.pth] ( https://github.com/TencentARC/GFPGAN/releases/download/v0.1.0/arcface_resnet18.pth )
Original file line number Diff line number Diff line change @@ -9,9 +9,11 @@ datasets:
9
9
train :
10
10
name : FFHQ
11
11
type : FFHQDegradationDataset
12
- dataroot_gt : datasets/ffhq/ffhq_512.lmdb
12
+ # dataroot_gt: datasets/ffhq/ffhq_512.lmdb
13
+ dataroot_gt : datasets/ffhq/ffhq_512
13
14
io_backend :
14
- type : lmdb
15
+ # type: lmdb
16
+ type : disk
15
17
16
18
use_hflip : true
17
19
mean : [0.5, 0.5, 0.5]
@@ -44,10 +46,12 @@ datasets:
44
46
prefetch_mode : ~
45
47
46
48
val :
47
- name : validation1020_512
49
+ # Please modify accordingly to use your own validation
50
+ # Or comment the val block if do not need validation during training
51
+ name : validation
48
52
type : PairedImageDataset
49
- dataroot_lq : datasets/faces/validation1020_512 /input # TODO: modify before release
50
- dataroot_gt : datasets/faces/validation1020_512/input
53
+ dataroot_lq : datasets/faces/validation /input
54
+ dataroot_gt : datasets/faces/validation/reference
51
55
io_backend :
52
56
type : disk
53
57
mean : [0.5, 0.5, 0.5]
You can’t perform that action at this time.
0 commit comments