Skip to content

Latest commit

 

History

History
91 lines (52 loc) · 3.26 KB

StyleGAN_Note.md

File metadata and controls

91 lines (52 loc) · 3.26 KB

GAN

GAN — What is Generative Adversarial Networks GAN?

define GAN as a minimax game which Generator wants to minimize V while Discriminator wants to maximize it

  • discriminator 的 loss $$ D(G(x)) \text{ is the possibility of G(x) is real image, expect } D(real_data)=1\ \max_{D}{V(D)} = E[\log{D(real_data)}] + E[1-log(D(G(x)))] $$

    • 第一项为 真实数据,希望预测 D(z) =1 >> loss 接近0
    • 第二项为生成的数据,希望能鉴别出是假的,D(G(x)) = 0 >> loss 接近0
  • 生成器:希望鉴别器看不出来,就是 D(G(x)) 接近 0 $$ \min_{G}{V(G)} = E[1-\log{D(G(x))}] $$

  • 训练方式:交替训

    GAN_training_pseudo-code.png

  • gradient diminishing problem for the generator $$ \nabla_{\theta}{\log{(1-D(G(z^{(i)}))})} \ change~to >> \nabla_{\theta}{\log{(D(G(z^{(i)})))}} $$

Progressive GAN

TODO

StyleGAN

2019_CVPR_StyleGAN_A-Style-Based-Generator-Architecture-for-Generative-Adversarial-Networks.pdf

https://zhuanlan.zhihu.com/p/63230738 styleGAN-step-by-step-tutorial GAN — StyleGAN & StyleGAN2 👍 A Gentle Introduction to StyleGAN the Style Generative Adversarial Network

Official Full List of Code

warps a space that can be sampled with a uniform or normal distribution (middle below) into the latent feature space (left)

  • mapping network

    convert to a new latent space

  • Progress GAN network design (details) and reuses many hyperparameters

  1. nearest-neighbor up/downsampling in G/D >> bilinear sampling

  2. AdIN replace PixelNorm

    In each layer, StyleGAN computes a pair of style values (y(s, i) and y(b, i)) as the scale and the bias from w to apply the style to the spatial feature map i

  3. Constant Input layer

  4. Add noise to create stochastic variation 增加细节(头发)细节变化

  5. Mixing regularization

    With Mixing regularization, we switch to a different latent factor z to derive the style after reaching a certain spatial resolution

    use the latent factors that generate image “source B” to derive the coarse spatial resolutions (4×4 to 8×8) style and use that of “source A” for finer spatial resolutions.

    用两张 source Image

Perceptual path length

introduces a new metric in measuring GAN’s performance called perceptual path length.

  • problems

    • Blob-like artifacts

      StyleGAN2 paper, it traces the problem to the instance normalization used in AdaIN.

StyleGAN-V2

StyleGAN v2: notes on training and latent space exploration