Skip to content

A Tkinter-based UI that allows users to manipulate the latent space of StyleGAN2 and visualize the corresponding outcome.

Notifications You must be signed in to change notification settings

ManiadisG/StyleGAN_exploration_UI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StyleGAN2 visualizations

Visualize face images generated by StyleGAN2 and manipulate the latent space to observe the impact on the image.

The UI uses Tkinter, while the implementation of StyleGAN2 and the weights (trained on FFHQ) were taken from https://github.com/NVlabs/stylegan2-ada-pytorch

image info

How to run

Run the following command from the root of the repository:

python run.py

Possible arguments may include:

  • weights_path: The path to the weights of StyleGAN2. Default is ./ffhq.pkl.
  • sliders_no: The number of sliders to be included in the UI. Default is 15.
  • gpu: The GPU where StyleGAN2 is loaded. Default is 0.

Example:

python run.py --weights_path ./ffhq.pkl --gpu 0

If the weights are not downloaded in the path provided, they are downloaded from https://nvlabs-fi-cdn.nvidia.com/stylegan2-ada-pytorch/pretrained/.

How to use

When the application is run, a random latent vector is generated and the corresponding image created by StyleGAN2.

The UI provides sliders that can be used to change the values of specific features of the latent space. There are also options to change the feature that each slider controls, and +/- buttons that change the values of the features by 0.01 steps.

To create a new latent vector and image, click the Reset Latent Vector button.

Requirements

  • Pytorch >1.7.1
  • Numpy
  • Matplotlib

About

A Tkinter-based UI that allows users to manipulate the latent space of StyleGAN2 and visualize the corresponding outcome.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published