Skip to content

jeremyfix/fakestylegan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fakestylegan

Code to experiment with stylegan.

Expected target:

  • stylegan running as a server on a GPU node,
  • waiting for input images and aligning it
  • backproejcting onto the latent space
  • playing around with the latent direction to generate new images

Installation

python3 -m pip install git+https://github.com/jeremyfix/fakestylegan

You also need to have the dnnlib and torch_utils directories from the original stylegan3 repository.

Then, if you are using a GPU, you need to set the CUDA_HOME variable appropriately :

export CUDA_HOME=/usr/local/cuda-11

and then have fun without our scripts, for example

python3 -m fakestylegan.generator

Testing

Alignment

For testing the alignment code, which is the one used by NVlabs for realigning their input face image, you can :

python3 -m fakestylegan.align mysourceimage.jpg

Interpolation in the latent space

The video faces.avi has been generated with python3 -m fakestylegan.generator and goes around in the latent space to illustrate its topology and the incredible power of stylegan to generate faces.

See stylegan3 in action

The interpolation scripts takes 30 seconds on a Geforce 3090, generating 200 images.

References

Interesting papers are :

R. Abdal, Y. Qin, P. Wonka (2019). Image2StyleGAN : How to embed images into the styleGAN latent space. https://arxiv.org/pdf/1904.03189.pdf

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Languages