Skip to main content
QUICK REVIEW

[论文解读] Designing an Encoder for StyleGAN Image Manipulation

Omer Tov, Yuval Alaluf|arXiv (Cornell University)|Feb 4, 2021
Advanced Vision and Imaging被引用 6
一句话总结

本文提出 e4e,一种新型编码器,用于将真实图像反演到 StyleGAN 的潜在空间(W),以实现高质量的图像编辑。通过鼓励风格向量之间的低方差以及与原始 W 分布的接近性,e4e 在重建精度与可编辑性之间取得平衡,在汽车和马等多样化领域实现了卓越的感知质量与逼真的编辑效果,同时仅带来轻微的失真增加。

ABSTRACT

Recently, there has been a surge of diverse methods for performing image editing by employing pre-trained unconditional generators. Applying these methods on real images, however, remains a challenge, as it necessarily requires the inversion of the images into their latent space. To successfully invert a real image, one needs to find a latent code that reconstructs the input image accurately, and more importantly, allows for its meaningful manipulation. In this paper, we carefully study the latent space of StyleGAN, the state-of-the-art unconditional generator. We identify and analyze the existence of a distortion-editability tradeoff and a distortion-perception tradeoff within the StyleGAN latent space. We then suggest two principles for designing encoders in a manner that allows one to control the proximity of the inversions to regions that StyleGAN was originally trained on. We present an encoder based on our two principles that is specifically designed for facilitating editing on real images by balancing these tradeoffs. By evaluating its performance qualitatively and quantitatively on numerous challenging domains, including cars and horses, we show that our inversion method, followed by common editing techniques, achieves superior real-image editing quality, with only a small reconstruction accuracy drop.

研究动机与目标

  • 为解决使用预训练的 StyleGAN 生成器编辑真实图像的挑战,该挑战需要将图像准确反演到潜在空间。
  • 识别并分析 StyleGAN 潜在空间中固有的重建失真-可编辑性与重建失真-感知质量之间的权衡。
  • 设计一种编码器,将图像反演至接近原始 W 空间的区域,以最大化可编辑性与感知质量。
  • 证明即使存在轻微的重建损失,接近 W 空间也能带来更优的编辑性能。
  • 提供一种可泛化、高效的反演方法,适用于多样化的非人脸图像领域。

提出的方法

  • 提出一种新型编码器架构 e4e,通过训练使真实图像映射到具有低风格向量方差且每个向量均接近 W 分布的潜在码。
  • 借鉴 Nitzan 等人 [27] 的对抗训练方法,通过在真实 W 码上训练的判别器,促使每个风格向量位于 W 分布内部。
  • 实施渐进式训练策略,在训练过程中逐步增加风格向量之间的方差,以稳定学习并提升泛化能力。
  • 使用多尺度感知损失与 L2 重建损失,以在反演过程中平衡图像保真度与语义一致性。
  • 将编码器与标准编辑技术(如身份、年龄、姿态、色彩编辑)集成,以评估下游编辑质量。
  • 利用扩展的 W+ 空间(W*)以提升表达能力,同时约束反演过程保持在 W 附近,以维持可编辑性。
Figure 2 : An illustration of our definitions for a 1-dimensional $\mathcal{W}$ and for $k=2$ (i.e., $\mathcal{W}^{2}$ ). The diagonal line represents $\mathcal{W}_{*}$ since the two coordinates of each point on it are equal. The pink points are sampled from $\mathcal{W}$ , which here is represented
Figure 2 : An illustration of our definitions for a 1-dimensional $\mathcal{W}$ and for $k=2$ (i.e., $\mathcal{W}^{2}$ ). The diagonal line represents $\mathcal{W}_{*}$ since the two coordinates of each point on it are equal. The pink points are sampled from $\mathcal{W}$ , which here is represented

实验结果

研究问题

  • RQ1反演潜在码与原始 W 空间的接近程度在多大程度上影响 StyleGAN 中的可编辑性与感知质量?
  • RQ2StyleGAN 潜在空间中,重建失真、感知质量与可编辑性之间存在何种权衡?
  • RQ3能否设计一种编码器,系统性地将真实图像反演至潜在空间中既具重建性又高度可编辑的区域?
  • RQ4与现有反演方法(如 pSp、IDInvert)相比,所提出编码器在编辑质量与重建保真度方面的表现如何?
  • RQ5该方法在多样化、非人脸领域(如汽车和马)中的泛化能力如何?

主要发现

  • e4e 编码器在复杂领域(如汽车和马)中,相比 pSp 和 IDInvert,显著提升了感知质量与更逼真的编辑效果。
  • 尽管 L2 失真略有增加(人脸数据上为 0.05,pSp 为 0.03),但 e4e 在感知质量方面表现更优,定性结果表明其纹理与色彩更自然。
  • 在马类数据集上,e4e 的 FID 为 15.44,SWD 为 26.83,优于 IDInvert(FID 18.18,SWD 18.94)与 pSp(FID 21.00,SWD 24.46)的感知指标表现。
  • 失真-可编辑性与失真-感知质量之间的权衡可直接通过潜在码与原始 W 空间的接近程度进行控制。
  • 渐进式训练与对抗正则化有效引导编码器生成低方差、接近 W 的潜在码,从而实现高度可编辑的结果。
  • 人工评估证实,尽管重建误差略高,e4e 生成的编辑结果在视觉上更具吸引力与真实感,优于 pSp 与 IDInvert。
Figure 3 : As in Figure 2 , $\mathcal{W}$ is 1-dimensional and $k=2$ , that is $\mathcal{W}^{k}=\mathcal{W}^{2}$ . The main diagonal represents $\mathcal{W}_{*}$ , and warmer colors correspond to higher densities of $\mathcal{W}^{k}$ . As one traverses the space in parallel to the red arrow and appr
Figure 3 : As in Figure 2 , $\mathcal{W}$ is 1-dimensional and $k=2$ , that is $\mathcal{W}^{k}=\mathcal{W}^{2}$ . The main diagonal represents $\mathcal{W}_{*}$ , and warmer colors correspond to higher densities of $\mathcal{W}^{k}$ . As one traverses the space in parallel to the red arrow and appr

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。