Paper Review/GAN, Inversion

[CVPR 2023] 3D GAN Inversion with Facial Symmetry Prior

이성훈 Ethan 2023. 10. 5. 16:08

- Introduction

 

 

3D geometry 는 한 개의 monocular image 만으로 만들 수 없기 때문에, 3D inversion result 는 별로 좋지 못함

→ Optimization 이 진행될수록 점점 얼굴이 납작해지며 blurry & inconsistent 하는 등의 퀄리티도 좋지 못함

 

 

Main contribution

  1. 사람의 얼굴이 symmetrical 하다는 점을 이용하는 3D GAN inversion method 제안
  2. Depth-guided 3D warping 을 이용하여 texture quality 와 geometry 향상

- Method

 

 

Two-stage inversion pipeline

 

1. Inversion with Symmetry for Rough Geometry

 

이 부분은 rough geometry 를 구해서 뒤에서 나오는 tuning 을 위한 pivot 으로 사용하기 위함

 

Unseen 부분에 대한 정보를 얻기 위해, facial symmetry 를 기반으로 하여 input image 를 뒤집어서 mirror image 를 얻음

 

하지만 mirror image 는 원본 image 에 비해 inconsistent 할 수 있기 때문에, 원본 image 에 좀 더 depend 해야함

 

두 가지 경우가 존재하는데

input image 가 정면인 경우엔 그 자체로도 충분한 정보를 가지고 있기 때문에 mirror image 사용을 줄여야함

input image 가 side 인 경우엔 mirror image 와 거의 겹치지 않기 때문에, 충분히 depend 해도 괜찮음

 

$\mathcal{E}(x)=\frac{1}{\sigma \sqrt{2 \pi}} e^{-\frac{(x-\mu)^2}{2 \sigma^2}}$

 

$\lambda_m= \begin{cases}1-\mathcal{E}\left(\alpha_{\text {yaw }}\right), & \text { if } \mathcal{E}\left(\alpha_{\text {yaw }}\right) \leq k \\ 0, & \text { if } \mathcal{E}\left(\alpha_{\text {yaw }}\right)>k\end{cases}$

 

Mirror image 와 input image 사이의 Loss

 

$\begin{aligned} & \mathcal{L}_{\text {inv }}=\mathcal{L}_{\mathrm{LPIPS}}\left(G_{3 \mathrm{D}}\left(w, \pi_s ; \theta\right), I_s\right)+ \\ & \quad \lambda_m \mathcal{L}_{\mathrm{LPIPS}}\left(G_{3 \mathrm{D}}\left(w, \pi_m ; \theta\right), I_m\right)+\lambda_n \mathcal{L}_n(n)\end{aligned}$

 

 

2. Joint Optimization of Geometry and Texture

 

Geometry Regularization

 

아무런 constraint 없이 optimization 을 진행하면 2D 로 하는 것처럼 납작해질 수 있음

 

따라서 고정된 w 값으로 3D depth map 을 생성하고 un-tuned generator 에서 생성한 depth map 과의 L2 loss

 

$\mathcal{L}_{\text {depth }}=\sum_{i \in \mathbb{S}}\left\|D^i-D_0^i\right\|_2$

 

Depth-guided 3D Warping for Pseudo Supervision

 

Two image (input, mirror) 로 optimize 하는 것은 여전히 부족함

 

그래서 다른 view 의 pseudo image 를 생성하여 extra supervision

 

배경과 물체를 따로 구분하지 않는 한, projection 이 잘못될 수 있음

 

따라서 depth value 를 이용해 authentic mask 를 만들고 invisible area 를 filter

 

 

Adjacent View Warping

 

정면 이미지가 pseudo image 생성에 더 용이함

 

source view 만으로 adjacent view 를 만드는 것은 너무 미미한 효과를 보여주기 때문에, mirror view 에 대해서도 진행

 

얼굴 전체에 대한게 아닌, facial component 에 대한 similarities 를 compute


- Experiment

 

Backbone: EG3D (pretrained on FFHQ)

 

Datasets

  • CelebA-HQ
  • MEAD

 

Metrics

  • MSE
  • LPIPS
  • MS-SSIM
  • ID

 

 

 

 


- Discussion

 


- Reference

 

[1] Yin, Fei, et al. "3d gan inversion with facial symmetry prior." CVPR 2023 [Paper link]