.. | ||
README.md | ||
train_ffhq_glean.yml |
GLEAN
DLAS contains an attempt at implementing GLEAN, which performs image super-resolution guided by pretrained StyleGAN networks. Since this paper is currently closed-source, it was implemented entirely on what information I could glean from the paper.
Training
GLEAN requires a pre-trained StyleGAN network to operate. DLAS currently only has support for StyleGAN2 models, so you will need to use one of those. The pre-eminent StyleGAN 2 model is the one trained on FFHQ faces, so I will use that in this training example.
-
Download the ffhq model from nVidias Drive. This repo currently only supports the "-f.pkl" files without further modifications, so choose one of those.
-
Download and extract the FFHQ dataset.
-
Convert the TF model to a Pytorch one supported by DLAS:
python scripts/stylegan2/convert_weights_rosinality.py stylegan2-ffhq-config-f.pkl
-
The above conversion script outputs a *.pth file as well as JPG preview of model outputs. Check the JPG to ensure the StyleGAN is performing as expected. If so, copy the *.pth file to your experiments/ directory within DLAS.
-
Edit the provided trainer configuration. Find comments starting with '<--' and make changes as indicated.
-
Train the model:
python train.py -opt train_ffhq_glean.yml