/latent_space_adventures

Buckle up, adventure in the styleGAN2-ada-pytorch network latent space awaits

Primary LanguageJupyter Notebook

DISCLAMER: THIS SOFTWARE IS SUPPOSED TO BE USED AS AN AUXILIARY ART TOOL FOR CONTENT CREATORS. IT'S NOT INTENDED TO BELITTLE, OFFEND, ETC ANY INDIVIDUAL, RACE, NATIONALITY, ETC.

Being fascinated by neural networks, I naturally dug into insides and found some interesting things.

First, here a notebook for image generation from neural networks from my network zoo

Using projection notebook you can project an image (thanks to project.py from the original styleGAN2-ada-pytorch repository, though results are often subpar (unless you try to project an image from FFHQ), but we can salvage this) and after that extract the state vector and use it on other similarly trained neural networks. Why do you want to do this? Well, let say you big fun of one particular person and you want for some reason change something in they appearence.

Harold project

You, of course, can save the state vector of any of the results in .npz file.

If you want more control, I have you covered. In tweaking notebook you can use your npz file or start over to:

  • Tweak randomly a face of a person

Harold small

  • Use a style of the original image and faces from random seeds

Harold seeds

  • Or you can apply styles from various seed onto your image

Harold styles

updates mix layers

You can also mix layers of two neural networks to get some interesting results (layermix notebook):

Layer mix

or other type of interesting results:

Layer mix

average out two networks

Another way to mix up the results is to find a mean between two networks (averaging notebook):

averaging