Skip to content

Latest commit

 

History

History
116 lines (83 loc) · 8.46 KB

README.md

File metadata and controls

116 lines (83 loc) · 8.46 KB

StyleGANv3 (NeurIPS'2021)

Alias-Free Generative Adversarial Networks

Task: Unconditional GANs

Abstract

We observe that despite their hierarchical convolutional nature, the synthesis process of typical generative adversarial networks depends on absolute pixel coordinates in an unhealthy manner. This manifests itself as, e.g., detail appearing to be glued to image coordinates instead of the surfaces of depicted objects. We trace the root cause to careless signal processing that causes aliasing in the generator network. Interpreting all signals in the network as continuous, we derive generally applicable, small architectural changes that guarantee that unwanted information cannot leak into the hierarchical synthesis process. The resulting networks match the FID of StyleGAN2 but differ dramatically in their internal representations, and they are fully equivariant to translation and rotation even at subpixel scales. Our results pave the way for generative models better suited for video and animation.

Results and Models

Results (compressed) from StyleGAN3 config-T converted by mmagic

We perform experiments on StyleGANv3 paper settings and also experimental settings. For user convenience, we also offer the converted version of official weights.

Paper Settings

Model Dataset Iter FID50k Download
stylegan3-t ffhq 1024x1024 490000 3.37* ckpt | log
stylegan3-t-ada metface 1024x1024 130000 15.09 ckpt | log

Experimental Settings

Model Dataset Iter FID50k Download
stylegan3-t ffhq 256x256 740000 4.51 ckpt | log
stylegan3-r-ada ffhq 1024x1024 - - ckpt

Converted Weights

Model Dataset Comment FID50k EQ-T EQ-R Download
stylegan3-t ffhqu 256x256 official weight 4.62 63.01 13.12 ckpt
stylegan3-t afhqv2 512x512 official weight 4.04 60.15 13.51 ckpt
stylegan3-t ffhq 1024x1024 official weight 2.79 61.21 13.82 ckpt
stylegan3-r ffhqu 256x256 official weight 4.50 66.65 40.48 ckpt
stylegan3-r afhqv2 512x512 official weight 4.40 64.89 40.34 ckpt
stylegan3-r ffhq 1024x1024 official weight 3.07 64.76 46.62 ckpt

Interpolation

We provide a tool to generate video by walking through GAN's latent space. Run this command to get the following video.

python apps/interpolate_sample.py configs/styleganv3/stylegan3_t_afhqv2_512_b4x8_official.py https://download.openmmlab.com/mmediting/stylegan3/stylegan3_t_afhqv2_512_b4x8_cvt_official.pkl --export-video --samples-path work_dirs/demos/ --endpoint 6 --interval 60 --space z --seed 2022 --sample-cfg truncation=0.8
lerp.mp4

Equivarience Visualization && Evaluation

We also provide a tool to visualize the equivarience properties for StyleGAN3. Run these commands to get the results below.

python tools/utils/equivariance_viz.py configs/styleganv3/stylegan3_r_ffhqu_256_b4x8_official.py https://download.openmmlab.com/mmediting/stylegan3/stylegan3_r_ffhqu_256_b4x8_cvt_official.pkl --translate_max 0.5 --transform rotate --seed 5432

python tools/utils/equivariance_viz.py configs/styleganv3/stylegan3_r_ffhqu_256_b4x8_official.py https://download.openmmlab.com/mmediting/stylegan3/stylegan3_r_ffhqu_256_b4x8_cvt_official.pkl --translate_max 0.25 --transform x_t --seed 5432

python tools/utils/equivariance_viz.py configs/styleganv3/stylegan3_r_ffhqu_256_b4x8_official.py https://download.openmmlab.com/mmediting/stylegan3/stylegan3_r_ffhqu_256_b4x8_cvt_official.pkl --translate_max 0.25 --transform y_t --seed 5432
eq-rotate-seed-5432.mp4
eq-x_t-seed-5432.mp4
eq-y_t-seed-5432.mp4

If you want to get EQ-Metric for StyleGAN3, just add following codes into config.

metrics = dict(
    eqv=dict(
        type='Equivariance',
        num_images=50000,
        eq_cfg=dict(
            compute_eqt_int=True, compute_eqt_frac=True, compute_eqr=True)))

And we highly recommend you to use slurm_test.sh script to accelerate evaluation time.

Citation

@inproceedings{Karras2021,
  author = {Tero Karras and Miika Aittala and Samuli Laine and Erik H\"ark\"onen and Janne Hellsten and Jaakko Lehtinen and Timo Aila},
  title = {Alias-Free Generative Adversarial Networks},
  booktitle = {Proc. NeurIPS},
  year = {2021}
}