Task: Conditional GANs
One of the challenges in the study of generative adversarial networks is the instability of its training. In this paper, we propose a novel weight normalization technique called spectral normalization to stabilize the training of the discriminator. Our new normalization technique is computationally light and easy to incorporate into existing implementations. We tested the efficacy of spectral normalization on CIFAR10, STL-10, and ILSVRC2012 dataset, and we experimentally confirmed that spectrally normalized GANs (SN-GANs) is capable of generating images of better or equal quality relative to the previous training stabilization techniques.
Model | Dataset | Inplace ReLU | disc_step | Total Iters* | Iter | IS | FID | Download |
---|---|---|---|---|---|---|---|---|
SNGAN_Proj-32x32-woInplaceReLU Best IS | CIFAR10 | w/o | 5 | 500000 | 400000 | 9.6919 | 9.8203 | ckpt | Log |
SNGAN_Proj-32x32-woInplaceReLU Best FID | CIFAR10 | w/o | 5 | 500000 | 490000 | 9.5659 | 8.1158 | ckpt | Log |
SNGAN_Proj-32x32-wInplaceReLU Best IS | CIFAR10 | w | 5 | 500000 | 490000 | 9.5564 | 8.3462 | ckpt | Log |
SNGAN_Proj-32x32-wInplaceReLU Best FID | CIFAR10 | w | 5 | 500000 | 490000 | 9.5564 | 8.3462 | ckpt | Log |
SNGAN_Proj-128x128-woInplaceReLU Best IS | ImageNet | w/o | 5 | 1000000 | 952000 | 30.0651 | 33.4682 | ckpt | Log |
SNGAN_Proj-128x128-woInplaceReLU Best FID | ImageNet | w/o | 5 | 1000000 | 989000 | 29.5779 | 32.6193 | ckpt | Log |
SNGAN_Proj-128x128-wInplaceReLU Best IS | ImageNet | w | 5 | 1000000 | 944000 | 28.1799 | 34.3383 | ckpt | Log |
SNGAN_Proj-128x128-wInplaceReLU Best FID | ImageNet | w | 5 | 1000000 | 988000 | 27.7948 | 33.4821 | ckpt | Log |
'*' Iteration counting rule in our implementation is different from others. If you want to align with other codebases, you can use the following conversion formula:
total_iters (biggan/pytorch studio gan) = our_total_iters / disc_step
We also provide converted pre-train models from Pytorch-StudioGAN. To be noted that, in Pytorch Studio GAN, inplace ReLU is used in generator and discriminator.
Model | Dataset | Inplace ReLU | disc_step | Total Iters | IS (Our Pipeline) | FID (Our Pipeline) | IS (StudioGAN) | FID (StudioGAN) | Download | Original Download link |
---|---|---|---|---|---|---|---|---|---|---|
SAGAN_Proj-32x32 StudioGAN | CIFAR10 | w | 5 | 100000 | 9.372 | 10.2011 | 8.677 | 13.248 | model | model |
SAGAN_Proj-128x128 StudioGAN | ImageNet | w | 2 | 1000000 | 30.218 | 29.8199 | 32.247 | 26.792 | model | model |
Our Pipeline
denote results evaluated with our pipeline.StudioGAN
denote results released by Pytorch-StudioGAN.
For IS metric, our implementation is different from PyTorch-Studio GAN in the following aspects:
- We use Tero's Inception for feature extraction.
- We use bicubic interpolation with PIL backend to resize image before feed them to Inception.
For FID evaluation, we follow the pipeline of BigGAN, where the whole training set is adopted to extract inception statistics, and Pytorch Studio GAN uses 50000 randomly selected samples. Besides, we also use Tero's Inception for feature extraction.
You can download the preprocessed inception state by the following url: CIFAR10 and ImageNet1k.
You can use following commands to extract those inception states by yourself.
# For CIFAR10
python tools/utils/inception_stat.py --data-cfg configs/_base_/datasets/cifar10_inception_stat.py --pklname cifar10.pkl --no-shuffle --inception-style stylegan --num-samples -1 --subset train
# For ImageNet1k
python tools/utils/inception_stat.py --data-cfg configs/_base_/datasets/imagenet_128x128_inception_stat.py --pklname imagenet.pkl --no-shuffle --inception-style stylegan --num-samples -1 --subset train
@inproceedings{miyato2018spectral,
title={Spectral Normalization for Generative Adversarial Networks},
author={Miyato, Takeru and Kataoka, Toshiki and Koyama, Masanori and Yoshida, Yuichi},
booktitle={International Conference on Learning Representations},
year={2018},
url={https://openreview.net/forum?id=B1QRgziT-},
}