StyleGAN workshop
Setup
1. Signing into Jupyterhub via keycloak
key in your keycloak credentials here
Choose an XS slice
make sure to choose cuda 11.7 from the dropdown
2. Installing Stylegan3
git clone https://github.com/NVlabs/stylegan3.git
cd stylegan3
conda env create -f environment.yml
conda init bash
source ~/.bashrc
conda activate stylegan3
conda install cudatoolkit
downloading models
make 'pretrained' directory
mkdir pretrained
ffhq flicker faces
wget --no-check-certificate --content-disposition https://th-koeln.sciebo.de/s/j06LuPxYHRRtnQE/download -O pretrained/ffhq_faces.pkl
Wikiart
wget --no-check-certificate --content-disposition https://th-koeln.sciebo.de/s/tbjJS7XBezbAC3B/download -O pretrained/wikiart.pkl
Metfaces
wget --no-check-certificate --content-disposition https://th-koeln.sciebo.de/s/eFZAmR6dDLelSo7/download -O pretrained/metfaces.pkl
Inference
activating conda environment
this needs to be done before every session if you want to use stylegan
conda init bash
source ~/.bashrc
conda activate stylegan3
inference images
python gen_images.py --outdir=out --trunc=1 --seeds=2 --network=https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan3/versions/1/files/stylegan3-r-afhqv2-512x512.pkl
inference video
python gen_video.py --output=lerp.mp4 --trunc=1 --seeds=0-31 --grid=4x2 --network=pretrained/ffhq_faces.pkl
Training
Dowload Training data
Group 01
wget --no-check-certificate --content-disposition https://th-koeln.sciebo.de/s/7SzJ55ZroKPf5zY/download
Group 03
wget --no-check-certificate --content-disposition https://th-koeln.sciebo.de/s/YGR7BaeoIBSePNl/download
Group 05
wget --no-check-certificate --content-disposition https://th-koeln.sciebo.de/s/b1I0rgEaPcyaP44/download