Skip to main content
QUICK REVIEW

[论文解读] Interpreting the Latent Space of GANs for Semantic Face Editing

Yujun Shen, Jinjin Gu|arXiv (Cornell University)|Jul 25, 2019
Generative Adversarial Networks and Image Synthesis参考文献 59被引用 75
一句话总结

论文介绍 InterFaceGAN,这是一个框架,发现并利用与人脸属性相关的 GAN 线性潜在子空间,以实现不重新训练的语义人脸编辑。它通过 GAN inversion 和基于投影的条件控制,在 PGGAN、StyleGAN 以及真实图像上展示了可解耦且可控的属性操作。

ABSTRACT

Despite the recent advance of Generative Adversarial Networks (GANs) in high-fidelity image synthesis, there lacks enough understanding of how GANs are able to map a latent code sampled from a random distribution to a photo-realistic image. Previous work assumes the latent space learned by GANs follows a distributed representation but observes the vector arithmetic phenomenon. In this work, we propose a novel framework, called InterFaceGAN, for semantic face editing by interpreting the latent semantics learned by GANs. In this framework, we conduct a detailed study on how different semantics are encoded in the latent space of GANs for face synthesis. We find that the latent code of well-trained generative models actually learns a disentangled representation after linear transformations. We explore the disentanglement between various semantics and manage to decouple some entangled semantics with subspace projection, leading to more precise control of facial attributes. Besides manipulating gender, age, expression, and the presence of eyeglasses, we can even vary the face pose as well as fix the artifacts accidentally generated by GAN models. The proposed method is further applied to achieve real image manipulation when combined with GAN inversion methods or some encoder-involved models. Extensive results suggest that learning to synthesize faces spontaneously brings a disentangled and controllable facial attribute representation.

研究动机与目标

  • 识别用于人脸合成的 GAN 潜在空间中编码的语义属性。
  • 证明潜在空间中的线性超平面可以将二元属性分开(姿态、微笑、年龄、性别、眼镜)。
  • 展示属性表示在经过线性变换后变得解耦,并且可以在最小程度的纠缠下进行操控。
  • 在固定的 GAN 模型上实现精确的属性编辑,而无需重新训练,包括通过反演对真实图像的编辑。
  • 将该方法扩展到条件性操控,以隔离属性并纠正生成脸部的伪影。

提出的方法

  • 将图像的语义分数建模为潜在码的线性函数:s = f(g(z)) ≈ λ n^T z,对应法向量为 n 的超平面。
  • 在潜在空间中为二元属性(姿态、微笑、年龄、性别、眼镜)训练线性 SVM 边界,以识别属性超平面。
  • 使用潜在码编辑 z_edit = z + α n 来操控单一属性;α 控制语义变化的强度。
  • 通过投影正交化属性方向实现条件性操控:n1 -> n1 - (n1^T n2) n2,以解耦属性。
  • 通过 GAN inversion(基于优化或编码器的映射,将真实图像映射到潜在码后再进行操控)扩展到真实图像编辑。
  • 比较 PGGAN 和 StyleGAN 的潜在空间,并分析 StyleGAN 的 Z 空间与 W 空间,包括使用基于投影的去相关化在潜在空间中的作用。

实验结果

研究问题

  • RQ1GAN 潜在空间中的二元人脸属性是否可以被线性超平面分离?
  • RQ2线性潜在子空间是否对应不同的语义属性,且它们能否独立地进行操控?
  • RQ3条件投影是否可以去相关属性,以实现多属性编辑而不产生无意的变化?
  • RQ4这些语义通过 GAN inversion 或基于编码器的模型迁移到真实图像的效果如何?
  • RQ5PGGAN 与 StyleGAN 的潜在空间在解耦和可编辑性方面有哪些差异?

主要发现

  • 潜在空间中的线性超平面在验证集上以较高的准确度分离属性(姿态 100.0%、微笑 96.9%、年龄 97.9%、性别 98.7%、眼镜 95.6%;所有属性在所有数据上的姿态 90.3%、微笑 78.5%、年龄 75.3%、性别 84.2%、眼镜 80.1%)。
  • 通过沿着相应的潜在方向移动,可以操作 GAN 中编码的语义,从而改变性别、年龄、表情、眼镜、姿态以及伪影修正。
  • 属性呈现出不同程度的纠缠;通过投影进行条件性操控可以减少对其他属性的非期望变化(例如年龄与性别、眼镜与年龄)。
  • StyleGAN 的 W-空间比 Z-空间具有更强的解耦性,有助于长距离的属性编辑;而 Z-空间通过条件投影获得去相关化的优势。
  • 真实图像编辑是可行的:通过将真实人脸反演到潜在码并应用 InterFaceGAN 的方向,可以进行编辑,StyleGAN 的反演尤其表现强劲。
  • 通过将潜在码向“质量”方向移动,生成图像中的伪影可以部分得到纠正。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

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