HyperStyle: StyleGAN Inversion with HyperNetworks for Real Image Editing

Yuval Alaluf, Omer Tov, Ron Mokady, Rinon Gal, Amit H. Bermano
11/30/2021
cs.CV

Official code: yuval-alaluf/hyperstyle (1,027 stars, Python, MIT, last commit 2022-09-17).

Abstract

The inversion of real images into StyleGAN's latent space is a well-studied problem. Nevertheless, applying existing approaches to real-world scenarios remains an open challenge, due to an inherent trade-off between reconstruction and editability: latent space regions which can accurately represent real images typically suffer from degraded semantic control.

Show full abstract

Recent work proposes to mitigate this trade-off by fine-tuning the generator to add the target image to well-behaved, editable regions of the latent space. While promising, this fine-tuning scheme is impractical for prevalent use as it requires a lengthy training phase for each new image. In this work, we introduce this approach into the realm of encoder-based inversion. We propose HyperStyle, a hypernetwork that learns to modulate StyleGAN's weights to faithfully express a given image in editable regions of the latent space. A naive modulation approach would require training a hypernetwork with over three billion parameters. Through careful network design, we reduce this to be in line with existing encoders. HyperStyle yields reconstructions comparable to those of optimization techniques with the near real-time inference capabilities of encoders. Lastly, we demonstrate HyperStyle's effectiveness on several applications beyond the inversion task, including the editing of out-of-domain images which were never seen during training.

View on arXivView PDF

Code Implementations(1)

MIT

Official Implementation for "HyperStyle: StyleGAN Inversion with HyperNetworks for Real Image Editing" (CVPR 2022) https://arxiv.org/abs/2111.15666

1,027118Python, Jupyter NotebookNov 30, 20214 years agoMIT
cvpr2022generative-adversarial-networkhypernetworksstyleganstylegan-encoder

Similar Papers

Cite this paper

@article{alaluf2021hyperstyle,
  title  = {HyperStyle: StyleGAN Inversion with HyperNetworks for Real Image Editing},
  author = {Yuval Alaluf and Omer Tov and Ron Mokady and Rinon Gal and Amit H. Bermano},
  year   = {2021},
  eprint = {2111.15666},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2111.15666}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2111.15666.svg)](https://codeofpaper.com/paper/2111.15666)

Discussion