This demo codebase is built upon official implementations of ProgressiveGan, Stylegan, and Stylegan2.
System requirements for all three GANs need to be satisfied.
- Linux is recommended. We did not test on Windows systems.
- 64-bit Python 3.6 installation. We recommend Anaconda3 with numpy 1.14.3 or newer.
- TensorFlow 1.14 or 1.15 with GPU support. The code does not support TensorFlow 2.0.
- Tensorflow Models with Slim support. Set an environment variable to slim. For example:
export PYTHONPATH="~/models/research/slim:~/models/research:$PYTHONPATH"
- One or more high-end NVIDIA GPUs, NVIDIA drivers, CUDA 10.0 toolkit and cuDNN 7.5.
Note:
- CUDA 10.0 toolkit and cuDNN 7.5 are required for Stylegan2, but not for ProgressiveGan and Stylegan.
- Replace line 127 in
stylegan2/dnnlib/tflib/custom_ops.py
withcompile_opts += ' --compiler-options \'-fPIC\''
if you encounter compile errors for custom ops.
To run the demo code, please follow steps below:
- Download pretrained weights for three GANs to their desinated folders: ProgressiveGan, Stylegan, and Stylegan2.
- Download Inception V3 Checkpoint to checkpoints folder.
- Run
cd code; bash demo.sh