Skip to main content

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

cluster_01.gif

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

ffhq flicker faces

wget --no-check-certificate --content-disposition https://th-koeln.sciebo.de/s/j06LuPxYHRRtnQEj06LuPxYHRRtnQE/download -O pretrained/ffhq_faces.pkl

Wikiart

wikiart

wget 

--no-check-certificate --content-disposition https://th-koeln.sciebo.de/s/tbjJS7XBezbAC3BtbjJS7XBezbAC3B/download -O pretrained/wikiart.pkl

Metfaces

metfaces

wget 

--no-check-certificate --content-disposition https://th-koeln.sciebo.de/s/tbjJS7XBezbAC3BeFZAmR6dDLelSo7/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


activating conda environment

make sure that you are in the folder stylegan3 when you run the following commands

conda init bash
source ~/.bashrc
conda activate stylegan3



downloading models




inference images

inference video


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