Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bwconrad/stylegan-latent-embedding

Embedding images into StyleGAN's latent space with high reconstruction quality.
https://github.com/bwconrad/stylegan-latent-embedding

Last synced: about 1 month ago
JSON representation

Embedding images into StyleGAN's latent space with high reconstruction quality.

Awesome Lists containing this project

README

        

# StyleGAN Latent Embedding





Embed any image into StyleGAN's latent space. Based off of [PULSE's](https://github.com/adamian98/pulse) optimization method and codebase.

## How To Run
### Requirements
Run ```pip install -r requirements.txt``` to install all required packages.
### Usage
Run ```python run.py -input_dir ``` to embed and save all images in the input
directory.
- ```-save_intermediate```: save the current image after each optimization step.
- ```-save_latent```: save the final latent and noise vector to file which can be used by
```decode.py```.

```embed.ipynb``` offers an interface to embed single images and visualize the reconstruction error.

Run ```python decode.py -input ``` to reconstruct the image of a given saved latent and
noise vector from using the ```-save_latent``` flag with ```run.py```.