Commit 57e0e891 authored by limm's avatar limm
Browse files

add part mmgeneration code

parent 04e07f48
_base_ = [
'../_base_/models/sagan/sagan_128x128.py',
'../_base_/datasets/imagenet_128.py', '../_base_/default_runtime.py'
]
init_cfg = dict(type='studio')
model = dict(
generator=dict(num_classes=1000, init_cfg=init_cfg),
discriminator=dict(num_classes=1000, init_cfg=init_cfg),
)
lr_config = None
checkpoint_config = dict(interval=10000, by_epoch=False, max_keep_ckpts=20)
custom_hooks = [
dict(
type='VisualizeUnconditionalSamples',
output_dir='training_samples',
interval=1000)
]
inception_pkl = './work_dirs/inception_pkl/imagenet.pkl'
evaluation = dict(
type='GenerativeEvalHook',
interval=10000,
metrics=[
dict(
type='FID',
num_images=50000,
inception_pkl=inception_pkl,
bgr2rgb=True,
inception_args=dict(type='StyleGAN')),
dict(type='IS', num_images=50000)
],
best_metric=['fid', 'is'],
sample_kwargs=dict(sample_model='ema'))
n_disc = 1
total_iters = 1000000 * n_disc
# use ddp wrapper for faster training
use_ddp_wrapper = True
find_unused_parameters = False
runner = dict(
type='DynamicIterBasedRunner',
is_dynamic_ddp=False, # Note that this flag should be False.
pass_training_status=True)
metrics = dict(
fid50k=dict(
type='FID',
num_images=50000,
inception_pkl=inception_pkl,
inception_args=dict(type='StyleGAN')),
IS50k=dict(type='IS', num_images=50000))
optimizer = dict(
generator=dict(type='Adam', lr=0.0001, betas=(0.0, 0.999)),
discriminator=dict(type='Adam', lr=0.0004, betas=(0.0, 0.999)))
# train on 4 gpus
data = dict(samples_per_gpu=64)
# In this config, we follow the setting `launch_SAGAN_bz128x2_ema.sh` from
# BigGAN's repo. Please refer to https://github.com/ajbrock/BigGAN-PyTorch/blob/master/scripts/launch_SAGAN_bs128x2_ema.sh # noqa
# In summary, in this config:
# 1. use eps=1e-8 for Spectral Norm
# 2. not use syncBN
# 3. not use Spectral Norm for embedding layers in cBN
# 4. start EMA at iterations
# 5. use xavier_uniform for weight initialization
# 6. no data augmentation
_base_ = [
'../_base_/models/sagan/sagan_128x128.py',
'../_base_/datasets/imagenet_noaug_128.py', '../_base_/default_runtime.py'
]
init_cfg = dict(type='BigGAN')
model = dict(
num_classes=1000,
generator=dict(
num_classes=1000,
init_cfg=init_cfg,
norm_eps=1e-5,
sn_eps=1e-8,
auto_sync_bn=False,
with_embedding_spectral_norm=False),
discriminator=dict(num_classes=1000, init_cfg=init_cfg, sn_eps=1e-8),
)
n_disc = 1
train_cfg = dict(disc_step=n_disc, use_ema=True)
lr_config = None
checkpoint_config = dict(interval=10000, by_epoch=False, max_keep_ckpts=20)
custom_hooks = [
dict(
type='VisualizeUnconditionalSamples',
output_dir='training_samples',
interval=1000),
dict(
type='ExponentialMovingAverageHook',
module_keys=('generator_ema'),
interval=n_disc,
start_iter=2000 * n_disc,
interp_cfg=dict(momentum=0.999),
priority='VERY_HIGH')
]
inception_pkl = './work_dirs/inception_pkl/imagenet.pkl'
evaluation = dict(
type='GenerativeEvalHook',
interval=10000,
metrics=[
dict(
type='FID',
num_images=50000,
inception_pkl=inception_pkl,
bgr2rgb=True,
inception_args=dict(type='StyleGAN')),
dict(type='IS', num_images=50000)
],
best_metric=['fid', 'is'],
sample_kwargs=dict(sample_model='ema'))
total_iters = 1000000 * n_disc
# use ddp wrapper for faster training
use_ddp_wrapper = True
find_unused_parameters = False
runner = dict(
type='DynamicIterBasedRunner',
is_dynamic_ddp=False, # Note that this flag should be False.
pass_training_status=True)
metrics = dict(
fid50k=dict(
type='FID',
num_images=50000,
inception_pkl=inception_pkl,
inception_args=dict(type='StyleGAN')),
IS50k=dict(type='IS', num_images=50000))
optimizer = dict(
generator=dict(type='Adam', lr=0.0001, betas=(0.0, 0.999)),
discriminator=dict(type='Adam', lr=0.0004, betas=(0.0, 0.999)))
# train on 8 gpus
data = dict(samples_per_gpu=32)
_base_ = ['../_base_/models/sagan/sagan_32x32.py']
_base_ = [
'../_base_/models/sagan/sagan_32x32.py',
'../_base_/datasets/cifar10_nopad.py', '../_base_/default_runtime.py'
]
init_cfg = dict(type='studio')
model = dict(
num_classes=10,
generator=dict(
num_classes=10,
act_cfg=dict(type='ReLU', inplace=True),
init_cfg=init_cfg),
discriminator=dict(
num_classes=10,
act_cfg=dict(type='ReLU', inplace=True),
init_cfg=init_cfg),
)
lr_config = None
checkpoint_config = dict(interval=10000, by_epoch=False, max_keep_ckpts=20)
custom_hooks = [
dict(
type='VisualizeUnconditionalSamples',
output_dir='training_samples',
interval=1000)
]
inception_pkl = './work_dirs/inception_pkl/cifar10.pkl'
evaluation = dict(
type='GenerativeEvalHook',
interval=10000,
metrics=[
dict(
type='FID',
num_images=50000,
inception_pkl=inception_pkl,
bgr2rgb=True,
inception_args=dict(type='StyleGAN')),
dict(type='IS', num_images=50000)
],
best_metric=['fid', 'is'],
sample_kwargs=dict(sample_model='orig'))
n_disc = 5
total_iters = 100000 * n_disc
# use ddp wrapper for faster training
use_ddp_wrapper = True
find_unused_parameters = False
runner = dict(
type='DynamicIterBasedRunner',
is_dynamic_ddp=False, # Note that this flag should be False.
pass_training_status=True)
metrics = dict(
fid50k=dict(
type='FID',
num_images=50000,
inception_pkl=inception_pkl,
inception_args=dict(type='StyleGAN')),
IS50k=dict(type='IS', num_images=50000))
optimizer = dict(
generator=dict(type='Adam', lr=0.0002, betas=(0.5, 0.999)),
discriminator=dict(type='Adam', lr=0.0002, betas=(0.5, 0.999)))
data = dict(samples_per_gpu=64)
_base_ = [
'../_base_/models/sagan/sagan_32x32.py',
'../_base_/datasets/cifar10_nopad.py', '../_base_/default_runtime.py'
]
init_cfg = dict(type='studio')
model = dict(
num_classes=10,
generator=dict(num_classes=10, init_cfg=init_cfg),
discriminator=dict(num_classes=10, init_cfg=init_cfg))
lr_config = None
checkpoint_config = dict(interval=10000, by_epoch=False, max_keep_ckpts=20)
custom_hooks = [
dict(
type='VisualizeUnconditionalSamples',
output_dir='training_samples',
interval=1000)
]
inception_pkl = './work_dirs/inception_pkl/cifar10.pkl'
evaluation = dict(
type='GenerativeEvalHook',
interval=10000,
metrics=[
dict(
type='FID',
num_images=50000,
inception_pkl=inception_pkl,
bgr2rgb=True,
inception_args=dict(type='StyleGAN')),
dict(type='IS', num_images=50000)
],
best_metric=['fid', 'is'],
sample_kwargs=dict(sample_model='orig'))
n_disc = 5
total_iters = 100000 * n_disc
# use ddp wrapper for faster training
use_ddp_wrapper = True
find_unused_parameters = False
runner = dict(
type='DynamicIterBasedRunner',
is_dynamic_ddp=False, # Note that this flag should be False.
pass_training_status=True)
metrics = dict(
fid50k=dict(
type='FID',
num_images=50000,
inception_pkl=inception_pkl,
inception_args=dict(type='StyleGAN')),
IS50k=dict(type='IS', num_images=50000))
optimizer = dict(
generator=dict(type='Adam', lr=0.0002, betas=(0.5, 0.999)),
discriminator=dict(type='Adam', lr=0.0002, betas=(0.5, 0.999)))
data = dict(samples_per_gpu=64)
# SinGAN
> [Singan: Learning a Generative Model from a Single Natural Image](https://openaccess.thecvf.com/content_ICCV_2019/html/Shaham_SinGAN_Learning_a_Generative_Model_From_a_Single_Natural_Image_ICCV_2019_paper.html)
<!-- [ALGORITHM] -->
## Abstract
<!-- [ABSTRACT] -->
We introduce SinGAN, an unconditional generative model that can be learned from a single natural image. Our model is trained to capture the internal distribution of patches within the image, and is then able to generate high quality, diverse samples that carry the same visual content as the image. SinGAN contains a pyramid of fully convolutional GANs, each responsible for learning the patch distribution at a different scale of the image. This allows generating new samples of arbitrary size and aspect ratio, that have significant variability, yet maintain both the global structure and the fine textures of the training image. In contrast to previous single image GAN schemes, our approach is not limited to texture images, and is not conditional (i.e. it generates samples from noise). User studies confirm that the generated samples are commonly confused to be real images. We illustrate the utility of SinGAN in a wide range of image manipulation tasks.
<!-- [IMAGE] -->
<div align=center>
<img src="https://user-images.githubusercontent.com/28132635/143054395-000ceec1-3be9-4447-b4b9-effc9de94c62.JPG"/>
</div>
## Results and Models
<div align="center">
<b> SinGAN balloons</b>
<br/>
<img src="https://user-images.githubusercontent.com/12726765/113702715-7861a900-970c-11eb-9dd8-0743cc30701f.png" width="800"/>
</div>
| Model | Data | Num Scales | Config | Download |
| :----: | :---------------------------------------------------------: | :--------: | :-----------------------------------------------------------: | :--------------------------------------------------------------: |
| SinGAN | [balloons.png](https://download.openmmlab.com/mmgen/dataset/singan/balloons.png) | 8 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/singan/singan_balloons.py) | [ckpt](https://download.openmmlab.com/mmgen/singan/singan_balloons_20210406_191047-8fcd94cf.pth) \| [pkl](https://download.openmmlab.com/mmgen/singan/singan_balloons_20210406_191047-8fcd94cf.pkl) |
| SinGAN | [fish.jpg](https://download.openmmlab.com/mmgen/dataset/singan/fish-crop.jpg) | 10 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/singan/singan_fish.py) | [ckpt](https://download.openmmlab.com/mmgen/singan/singan_fis_20210406_201006-860d91b6.pth) \| [pkl](https://download.openmmlab.com/mmgen/singan/singan_fis_20210406_201006-860d91b6.pkl) |
| SinGAN | [bohemian.png](https://download.openmmlab.com/mmgen/dataset/singan/bohemian.png) | 10 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/singan/singan_bohemian.py) | [ckpt](https://download.openmmlab.com/mmgen/singan/singan_bohemian_20210406_175439-f964ee38.pth) \| [pkl](https://download.openmmlab.com/mmgen/singan/singan_bohemian_20210406_175439-f964ee38.pkl) |
## Notes for using SinGAN
When training SinGAN models, users may obtain the number of scales (stages) in advance via the following commands. This number is important for constructing config file, which is related to the generator, discriminator, the training iterations and so on.
```shell
>>> from mmgen.datasets.singan_dataset import create_real_pyramid
>>> import mmcv
>>> real = mmcv.imread('real_img_path')
>>> _, _, num_scales = create_real_pyramid(real, min_size=25, max_size=300, scale_factor_init=0.75)
```
When testing SinGAN models, users have to modify the config file to add the `test_cfg`. As shown in `configs/singan/singan_balloons.py`, the only thing you need to do is add the path for `pkl` data. There are some important data containing in the pickle files which you can download from our website.
```python
test_cfg = dict(
_delete_ = True
pkl_data = 'path to pkl data'
)
```
## Citation
```latex
@inproceedings{shaham2019singan,
title={Singan: Learning a generative model from a single natural image},
author={Shaham, Tamar Rott and Dekel, Tali and Michaeli, Tomer},
booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
pages={4570--4580},
year={2019},
url={https://openaccess.thecvf.com/content_ICCV_2019/html/Shaham_SinGAN_Learning_a_Generative_Model_From_a_Single_Natural_Image_ICCV_2019_paper.html},
}
```
Collections:
- Metadata:
Architecture:
- SinGAN
Name: SinGAN
Paper:
- https://openaccess.thecvf.com/content_ICCV_2019/html/Shaham_SinGAN_Learning_a_Generative_Model_From_a_Single_Natural_Image_ICCV_2019_paper.html
README: configs/singan/README.md
Models:
- Config: https://github.com/open-mmlab/mmgeneration/tree/master/configs/singan/singan_balloons.py
In Collection: SinGAN
Metadata:
Training Data: Others
Name: singan_balloons
Results:
- Dataset: Others
Metrics:
Num Scales: 8.0
Task: Internal Learning
Weights: https://download.openmmlab.com/mmgen/singan/singan_balloons_20210406_191047-8fcd94cf.pth
- Config: https://github.com/open-mmlab/mmgeneration/tree/master/configs/singan/singan_fish.py
In Collection: SinGAN
Metadata:
Training Data: Others
Name: singan_fish
Results:
- Dataset: Others
Metrics:
Num Scales: 10.0
Task: Internal Learning
Weights: https://download.openmmlab.com/mmgen/singan/singan_fis_20210406_201006-860d91b6.pth
- Config: https://github.com/open-mmlab/mmgeneration/tree/master/configs/singan/singan_bohemian.py
In Collection: SinGAN
Metadata:
Training Data: Others
Name: singan_bohemian
Results:
- Dataset: Others
Metrics:
Num Scales: 10.0
Task: Internal Learning
Weights: https://download.openmmlab.com/mmgen/singan/singan_bohemian_20210406_175439-f964ee38.pth
_base_ = [
'../_base_/models/singan/singan.py', '../_base_/datasets/singan.py',
'../_base_/default_runtime.py'
]
num_scales = 8 # start from zero
model = dict(
generator=dict(num_scales=num_scales),
discriminator=dict(num_scales=num_scales))
train_cfg = dict(
noise_weight_init=0.1,
iters_per_scale=2000,
)
# test_cfg = dict(
# _delete_ = True
# pkl_data = 'path to pkl data'
# )
data = dict(train=dict(img_path='./data/singan/balloons.png'))
optimizer = None
lr_config = None
checkpoint_config = dict(by_epoch=False, interval=2000, max_keep_ckpts=3)
custom_hooks = [
dict(
type='MMGenVisualizationHook',
output_dir='visual',
interval=500,
bgr2rgb=True,
res_name_list=['fake_imgs', 'recon_imgs', 'real_imgs']),
dict(
type='PickleDataHook',
output_dir='pickle',
interval=-1,
after_run=True,
data_name_list=['noise_weights', 'fixed_noises', 'curr_stage'])
]
total_iters = 18000
_base_ = [
'../_base_/models/singan/singan.py', '../_base_/datasets/singan.py',
'../_base_/default_runtime.py'
]
num_scales = 10 # start from zero
model = dict(
generator=dict(num_scales=num_scales),
discriminator=dict(num_scales=num_scales))
train_cfg = dict(
noise_weight_init=0.1,
iters_per_scale=2000,
)
# test_cfg = dict(
# _delete_ = True
# pkl_data = 'path to pkl data'
# )
data = dict(
train=dict(
img_path='./data/singan/bohemian.png', min_size=25, max_size=500))
optimizer = None
lr_config = None
checkpoint_config = dict(by_epoch=False, interval=2000, max_keep_ckpts=3)
custom_hooks = [
dict(
type='MMGenVisualizationHook',
output_dir='visual',
interval=500,
bgr2rgb=True,
res_name_list=['fake_imgs', 'recon_imgs', 'real_imgs']),
dict(
type='PickleDataHook',
output_dir='pickle',
interval=-1,
after_run=True,
data_name_list=['noise_weights', 'fixed_noises', 'curr_stage'])
]
total_iters = 22000
_base_ = [
'../_base_/models/singan/singan.py', '../_base_/datasets/singan.py',
'../_base_/default_runtime.py'
]
num_scales = 10 # start from zero
model = dict(
generator=dict(num_scales=num_scales),
discriminator=dict(num_scales=num_scales))
train_cfg = dict(
noise_weight_init=0.1,
iters_per_scale=2000,
)
# test_cfg = dict(
# _delete_ = True
# pkl_data = 'path to pkl data'
# )
data = dict(
train=dict(
img_path='./data/singan/fish-crop.jpg', min_size=25, max_size=300))
optimizer = None
lr_config = None
checkpoint_config = dict(by_epoch=False, interval=2000, max_keep_ckpts=3)
custom_hooks = [
dict(
type='MMGenVisualizationHook',
output_dir='visual',
interval=500,
bgr2rgb=True,
res_name_list=['fake_imgs', 'recon_imgs', 'real_imgs']),
dict(
type='PickleDataHook',
output_dir='pickle',
interval=-1,
after_run=True,
data_name_list=['noise_weights', 'fixed_noises', 'curr_stage'])
]
total_iters = 22000
# SNGAN
> [Spectral Normalization for Generative Adversarial Networks](https://openreview.net/forum?id=B1QRgziT-)
<!-- [ALGORITHM] -->
## Abstract
<!-- [ABSTRACT] -->
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.
<!-- [IMAGE] -->
<div align=center>
<img src="https://user-images.githubusercontent.com/28132635/143154496-6a03def4-4507-4d80-a948-89a5b747d916.png"/>
</div>
## Results and models
<div align="center">
<b> Results from our SNGAN-PROJ trained in CIFAR10 and ImageNet</b>
<br/>
<img src="https://user-images.githubusercontent.com/28132635/125151484-14220b80-e179-11eb-81f7-9391ccaeb841.png" width="400"/> &nbsp;&nbsp;
<img src="https://user-images.githubusercontent.com/28132635/127621152-7b7a0f2c-c743-485a-bf2e-2beca849a6e6.png" width="400"/>
</div>
| Models | Dataset | Inplace ReLU | disc_step | Total Iters\* | Iter | IS | FID | Config | Download | Log |
| :--------------------------------: | :------: | :----------: | :-------: | :-----------: | :----: | :-----: | :-----: | :---------------------------------: | :-----------------------------------: | :------------------------------: |
| SNGAN_Proj-32x32-woInplaceReLU Best IS | CIFAR10 | w/o | 5 | 500000 | 400000 | 9.6919 | 9.8203 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/sngan_proj/sngan_proj_32_woReLUinplace_lr-2e-4_ndisc5_cifar10_b64x1.py) | [ckpt](https://download.openmmlab.com/mmgen/sngan_proj/sngan_proj_cifar10_32_lr-2e-4_b64x1_woReLUinplace_is-iter400000_20210709_163823-902ce1ae.pth) | [Log](https://download.openmmlab.com/mmgen/sngan_proj/sngan_proj_cifar10_32_lr-2e-4_b64x1_woReLUinplace_20210624_065306_fid-ba0862a0_is-902ce1ae.json) |
| SNGAN_Proj-32x32-woInplaceReLU Best FID | CIFAR10 | w/o | 5 | 500000 | 490000 | 9.5659 | 8.1158 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/sngan_proj/sngan_proj_32_woReLUinplace_lr-2e-4_ndisc5_cifar10_b64x1.py) | [ckpt](https://download.openmmlab.com/mmgen/sngan_proj/sngan_proj_cifar10_32_lr-2e-4_b64x1_woReLUinplace_fid-iter490000_20210709_163329-ba0862a0.pth) | [Log](https://download.openmmlab.com/mmgen/sngan_proj/sngan_proj_cifar10_32_lr-2e-4_b64x1_woReLUinplace_20210624_065306_fid-ba0862a0_is-902ce1ae.json) |
| SNGAN_Proj-32x32-wInplaceReLU Best IS | CIFAR10 | w | 5 | 500000 | 490000 | 9.5564 | 8.3462 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/sngan_proj/sngan_proj_32_wReLUinplace_lr-2e-4_ndisc5_cifar10_b64x1.py) | [ckpt](https://download.openmmlab.com/mmgen/sngan_proj/sngan_proj_cifar10_32_lr-2e-4_b64x1_wReLUinplace_is-iter490000_20210709_202230-cd863c74.pth) | [Log](https://download.openmmlab.com/mmgen/sngan_proj/sngan_proj_cifar10_32_lr-2e-4_b64x1_wReLUinplace_20210624_065306_fid-ba0862a0_is-902ce1ae.json) |
| SNGAN_Proj-32x32-wInplaceReLU Best FID | CIFAR10 | w | 5 | 500000 | 490000 | 9.5564 | 8.3462 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/sngan_proj/sngan_proj_32_wReLUinplace_lr-2e-4_ndisc5_cifar10_b64x1.py) | [ckpt](https://download.openmmlab.com/mmgen/sngan_proj/sngan_proj_cifar10_32_lr-2e-4-b64x1_wReLUinplace_fid-iter490000_20210709_203038-191b2648.pth) | [Log](https://download.openmmlab.com/mmgen/sngan_proj/sngan_proj_cifar10_32_lr-2e-4_b64x1_wReLUinplace_20210624_065306_fid-ba0862a0_is-902ce1ae.json) |
| SNGAN_Proj-128x128-woInplaceReLU Best IS | ImageNet | w/o | 5 | 1000000 | 952000 | 30.0651 | 33.4682 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/sngan_proj/sngan_proj_128_woReLUinplace_Glr-2e-4_Dlr-5e-5_ndisc5_imagenet1k_b128x2.py) | [ckpt](https://download.openmmlab.com/mmgen/sngan_proj/sngan_proj_imagenet1k_128_Glr2e-4_Dlr5e-5_ndisc5_b128x2_woReLUinplace_is-iter952000_20210730_132027-9c884a21.pth) | [Log](https://download.openmmlab.com/mmgen/sngan_proj/sngan_proj_imagenet1k_128_Glr2e-4_Dlr5e-5_ndisc5_b128x2_woReLUinplace_20210730_131424_fid-061bf803_is-9c884a21.json) |
| SNGAN_Proj-128x128-woInplaceReLU Best FID | ImageNet | w/o | 5 | 1000000 | 989000 | 29.5779 | 32.6193 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/sngan_proj/sngan_proj_128_woReLUinplace_Glr-2e-4_Dlr-5e-5_ndisc5_imagenet1k_b128x2.py) | [ckpt](https://download.openmmlab.com/mmgen/sngan_proj/sngan_proj_imagenet1k_128_Glr2e-4_Dlr5e-5_ndisc5_b128x2_woReLUinplace_fid-iter988000_20210730_131424-061bf803.pth) | [Log](https://download.openmmlab.com/mmgen/sngan_proj/sngan_proj_imagenet1k_128_Glr2e-4_Dlr5e-5_ndisc5_b128x2_woReLUinplace_20210730_131424_fid-061bf803_is-9c884a21.json) |
| SNGAN_Proj-128x128-wInplaceReLU Best IS | ImageNet | w | 5 | 1000000 | 944000 | 28.1799 | 34.3383 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/sngan_proj/sngan_proj_128_wReLUinplace_Glr-2e-4_Dlr-5e-5_ndisc5_imagenet1k_b128x2.py) | [ckpt](https://download.openmmlab.com/mmgen/sngan_proj/sngan_proj_imagenet1k_128_Glr2e-4_Dlr5e-5_ndisc5_b128x2_wReLUinplace_is-iter944000_20210730_132714-ca0ccd07.pth) | [Log](https://download.openmmlab.com/mmgen/sngan_proj/sngan_proj_imagenet1k_128_Glr2e-4_Dlr5e-5_ndisc5_b128x2_wReLUinplace_20210730_132401_fid-9a682411_is-ca0ccd07.json) |
| SNGAN_Proj-128x128-wInplaceReLU Best FID | ImageNet | w | 5 | 1000000 | 988000 | 27.7948 | 33.4821 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/sngan_proj/sngan_proj_128_wReLUinplace_Glr-2e-4_Dlr-5e-5_ndisc5_imagenet1k_b128x2.py) | [ckpt](https://download.openmmlab.com/mmgen/sngan_proj/sngan_proj_imagenet1k_128_Glr2e-4_Dlr5e-5_ndisc5_b128x2_wReLUinplace_fid-iter988000_20210730_132401-9a682411.pth) | [Log](https://download.openmmlab.com/mmgen/sngan_proj/sngan_proj_imagenet1k_128_Glr2e-4_Dlr5e-5_ndisc5_b128x2_wReLUinplace_20210730_132401_fid-9a682411_is-ca0ccd07.json) |
'\*' 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](https://github.com/POSTECH-CVLab/PyTorch-StudioGAN).
To be noted that, in Pytorch Studio GAN, **inplace ReLU** is used in generator and discriminator.
| Models | Dataset | Inplace ReLU | disc_step | Total Iters | IS (Our Pipeline) | FID (Our Pipeline) | IS (StudioGAN) | FID (StudioGAN) | Config | Download | Original Download link |
| :-----------------: | :------: | :----------: | :-------: | :---------: | :---------------: | :----------------: | :------------: | :-------------: | :-----------------: | :--------------------: | :----------------------------------: |
| SAGAN_Proj-32x32 StudioGAN | CIFAR10 | w | 5 | 100000 | 9.372 | 10.2011 | 8.677 | 13.248 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/sngan_proj/sngan_proj_32_cvt_studioGAN.py) | [model](https://download.openmmlab.com/mmgen/sngan_proj/sngan_cifar10_convert-studio-rgb_20210709_111346-2979202d.pth) | [model](https://drive.google.com/drive/folders/16s5Cr-V-NlfLyy_uyXEkoNxLBt-8wYSM) |
| SAGAN_Proj-128x128 StudioGAN | ImageNet | w | 2 | 1000000 | 30.218 | 29.8199 | 32.247 | 26.792 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/sngan_proj/sngan_proj_32_cvt_studioGAN.py) | [model](https://download.openmmlab.com/mmgen/sngan_proj/sngan_imagenet1k_convert-studio-rgb_20210709_111406-877b1130.pth) | [model](https://drive.google.com/drive/folders/1Ek2wAMlxpajL_M8aub4DKQ9B313K8XhS) |
- `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:
1. We use [Tero's Inception](https://nvlabs-fi-cdn.nvidia.com/stylegan2-ada-pytorch/pretrained/metrics/inception-2015-12-05.pt) for feature extraction.
2. We use bicubic interpolation with PIL backend to resize image before feed them to Inception.
For FID evaluation, we follow the pipeline of [BigGAN](https://github.com/ajbrock/BigGAN-PyTorch/blob/98459431a5d618d644d54cd1e9fceb1e5045648d/calculate_inception_moments.py#L52), 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](https://nvlabs-fi-cdn.nvidia.com/stylegan2-ada-pytorch/pretrained/metrics/inception-2015-12-05.pt) for feature extraction.
You can download the preprocessed inception state by the following url: [CIFAR10](https://download.openmmlab.com/mmgen/evaluation/fid_inception_pkl/cifar10.pkl) and [ImageNet1k](https://download.openmmlab.com/mmgen/evaluation/fid_inception_pkl/imagenet.pkl).
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
```
## Citation
```latex
@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-},
}
```
Collections:
- Metadata:
Architecture:
- SNGAN
Name: SNGAN
Paper:
- https://openreview.net/forum?id=B1QRgziT-
README: configs/sngan_proj/README.md
Models:
- Config: https://github.com/open-mmlab/mmgeneration/tree/master/configs/sngan_proj/sngan_proj_32_woReLUinplace_lr-2e-4_ndisc5_cifar10_b64x1.py
In Collection: SNGAN
Metadata:
Training Data: CIFAR
Name: sngan_proj_32_woReLUinplace_lr-2e-4_ndisc5_cifar10_b64x1
Results:
- Dataset: CIFAR
Metrics:
FID: 9.8203
IS: 9.6919
Inplace ReLU: w/o
Iter: 400000.0
Log: '[Log]'
Total Iters\*: 500000.0
disc_step: 5.0
Task: Conditional GANs
Weights: https://download.openmmlab.com/mmgen/sngan_proj/sngan_proj_cifar10_32_lr-2e-4_b64x1_woReLUinplace_is-iter400000_20210709_163823-902ce1ae.pth
- Config: https://github.com/open-mmlab/mmgeneration/tree/master/configs/sngan_proj/sngan_proj_32_woReLUinplace_lr-2e-4_ndisc5_cifar10_b64x1.py
In Collection: SNGAN
Metadata:
Training Data: CIFAR
Name: sngan_proj_32_woReLUinplace_lr-2e-4_ndisc5_cifar10_b64x1
Results:
- Dataset: CIFAR
Metrics:
FID: 8.1158
IS: 9.5659
Inplace ReLU: w/o
Iter: 490000.0
Log: '[Log]'
Total Iters\*: 500000.0
disc_step: 5.0
Task: Conditional GANs
Weights: https://download.openmmlab.com/mmgen/sngan_proj/sngan_proj_cifar10_32_lr-2e-4_b64x1_woReLUinplace_fid-iter490000_20210709_163329-ba0862a0.pth
- Config: https://github.com/open-mmlab/mmgeneration/tree/master/configs/sngan_proj/sngan_proj_32_wReLUinplace_lr-2e-4_ndisc5_cifar10_b64x1.py
In Collection: SNGAN
Metadata:
Training Data: CIFAR
Name: sngan_proj_32_wReLUinplace_lr-2e-4_ndisc5_cifar10_b64x1
Results:
- Dataset: CIFAR
Metrics:
FID: 8.3462
IS: 9.5564
Inplace ReLU: w
Iter: 490000.0
Log: '[Log]'
Total Iters\*: 500000.0
disc_step: 5.0
Task: Conditional GANs
Weights: https://download.openmmlab.com/mmgen/sngan_proj/sngan_proj_cifar10_32_lr-2e-4_b64x1_wReLUinplace_is-iter490000_20210709_202230-cd863c74.pth
- Config: https://github.com/open-mmlab/mmgeneration/tree/master/configs/sngan_proj/sngan_proj_32_wReLUinplace_lr-2e-4_ndisc5_cifar10_b64x1.py
In Collection: SNGAN
Metadata:
Training Data: CIFAR
Name: sngan_proj_32_wReLUinplace_lr-2e-4_ndisc5_cifar10_b64x1
Results:
- Dataset: CIFAR
Metrics:
FID: 8.3462
IS: 9.5564
Inplace ReLU: w
Iter: 490000.0
Log: '[Log]'
Total Iters\*: 500000.0
disc_step: 5.0
Task: Conditional GANs
Weights: https://download.openmmlab.com/mmgen/sngan_proj/sngan_proj_cifar10_32_lr-2e-4-b64x1_wReLUinplace_fid-iter490000_20210709_203038-191b2648.pth
- Config: https://github.com/open-mmlab/mmgeneration/tree/master/configs/sngan_proj/sngan_proj_128_woReLUinplace_Glr-2e-4_Dlr-5e-5_ndisc5_imagenet1k_b128x2.py
In Collection: SNGAN
Metadata:
Training Data: IMAGENET
Name: sngan_proj_128_woReLUinplace_Glr-2e-4_Dlr-5e-5_ndisc5_imagenet1k_b128x2
Results:
- Dataset: IMAGENET
Metrics:
FID: 33.4682
IS: 30.0651
Inplace ReLU: w/o
Iter: 952000.0
Log: '[Log]'
Total Iters\*: 1000000.0
disc_step: 5.0
Task: Conditional GANs
Weights: https://download.openmmlab.com/mmgen/sngan_proj/sngan_proj_imagenet1k_128_Glr2e-4_Dlr5e-5_ndisc5_b128x2_woReLUinplace_is-iter952000_20210730_132027-9c884a21.pth
- Config: https://github.com/open-mmlab/mmgeneration/tree/master/configs/sngan_proj/sngan_proj_128_woReLUinplace_Glr-2e-4_Dlr-5e-5_ndisc5_imagenet1k_b128x2.py
In Collection: SNGAN
Metadata:
Training Data: IMAGENET
Name: sngan_proj_128_woReLUinplace_Glr-2e-4_Dlr-5e-5_ndisc5_imagenet1k_b128x2
Results:
- Dataset: IMAGENET
Metrics:
FID: 32.6193
IS: 29.5779
Inplace ReLU: w/o
Iter: 989000.0
Log: '[Log]'
Total Iters\*: 1000000.0
disc_step: 5.0
Task: Conditional GANs
Weights: https://download.openmmlab.com/mmgen/sngan_proj/sngan_proj_imagenet1k_128_Glr2e-4_Dlr5e-5_ndisc5_b128x2_woReLUinplace_fid-iter988000_20210730_131424-061bf803.pth
- Config: https://github.com/open-mmlab/mmgeneration/tree/master/configs/sngan_proj/sngan_proj_128_wReLUinplace_Glr-2e-4_Dlr-5e-5_ndisc5_imagenet1k_b128x2.py
In Collection: SNGAN
Metadata:
Training Data: IMAGENET
Name: sngan_proj_128_wReLUinplace_Glr-2e-4_Dlr-5e-5_ndisc5_imagenet1k_b128x2
Results:
- Dataset: IMAGENET
Metrics:
FID: 34.3383
IS: 28.1799
Inplace ReLU: w
Iter: 944000.0
Log: '[Log]'
Total Iters\*: 1000000.0
disc_step: 5.0
Task: Conditional GANs
Weights: https://download.openmmlab.com/mmgen/sngan_proj/sngan_proj_imagenet1k_128_Glr2e-4_Dlr5e-5_ndisc5_b128x2_wReLUinplace_is-iter944000_20210730_132714-ca0ccd07.pth
- Config: https://github.com/open-mmlab/mmgeneration/tree/master/configs/sngan_proj/sngan_proj_128_wReLUinplace_Glr-2e-4_Dlr-5e-5_ndisc5_imagenet1k_b128x2.py
In Collection: SNGAN
Metadata:
Training Data: IMAGENET
Name: sngan_proj_128_wReLUinplace_Glr-2e-4_Dlr-5e-5_ndisc5_imagenet1k_b128x2
Results:
- Dataset: IMAGENET
Metrics:
FID: 33.4821
IS: 27.7948
Inplace ReLU: w
Iter: 988000.0
Log: '[Log]'
Total Iters\*: 1000000.0
disc_step: 5.0
Task: Conditional GANs
Weights: https://download.openmmlab.com/mmgen/sngan_proj/sngan_proj_imagenet1k_128_Glr2e-4_Dlr5e-5_ndisc5_b128x2_wReLUinplace_fid-iter988000_20210730_132401-9a682411.pth
- Config: https://github.com/open-mmlab/mmgeneration/tree/master/configs/sngan_proj/sngan_proj_32_cvt_studioGAN.py
In Collection: SNGAN
Metadata:
Training Data: Others
Name: sngan_proj_32_cvt_studioGAN
Results:
- Dataset: Others
Metrics:
FID (Our Pipeline): 10.2011
FID (StudioGAN): 13.248
IS (Our Pipeline): 9.372
IS (StudioGAN): 8.677
Inplace ReLU: w
Total Iters: 100000.0
disc_step: 5.0
Task: Conditional GANs
Weights: https://download.openmmlab.com/mmgen/sngan_proj/sngan_cifar10_convert-studio-rgb_20210709_111346-2979202d.pth
- Config: https://github.com/open-mmlab/mmgeneration/tree/master/configs/sngan_proj/sngan_proj_32_cvt_studioGAN.py
In Collection: SNGAN
Metadata:
Training Data: Others
Name: sngan_proj_32_cvt_studioGAN
Results:
- Dataset: Others
Metrics:
FID (Our Pipeline): 29.8199
FID (StudioGAN): 26.792
IS (Our Pipeline): 30.218
IS (StudioGAN): 32.247
Inplace ReLU: w
Total Iters: 1000000.0
disc_step: 2.0
Task: Conditional GANs
Weights: https://download.openmmlab.com/mmgen/sngan_proj/sngan_imagenet1k_convert-studio-rgb_20210709_111406-877b1130.pth
_base_ = ['../_base_/models/sngan_proj/sngan_proj_128x128.py']
_base_ = [
'../_base_/models/sngan_proj/sngan_proj_128x128.py',
'../_base_/datasets/imagenet_128.py', '../_base_/default_runtime.py'
]
num_classes = 1000
init_cfg = dict(type='studio')
model = dict(
num_classes=num_classes,
generator=dict(
num_classes=num_classes,
act_cfg=dict(type='ReLU', inplace=True),
init_cfg=init_cfg),
discriminator=dict(
num_classes=num_classes,
act_cfg=dict(type='ReLU', inplace=True),
init_cfg=init_cfg))
n_disc = 5
train_cfg = dict(disc_steps=n_disc)
lr_config = None
checkpoint_config = dict(interval=50000, by_epoch=False, max_keep_ckpts=20)
custom_hooks = [
dict(
type='VisualizeUnconditionalSamples',
output_dir='training_samples',
interval=5000)
]
log_config = dict(interval=100, hooks=[dict(type='TextLoggerHook')])
inception_pkl = './work_dirs/inception_pkl/imagenet.pkl'
evaluation = dict(
type='GenerativeEvalHook',
interval=dict(milestones=[800000], interval=[10000, 4000]),
metrics=[
dict(
type='FID',
num_images=50000,
inception_pkl=inception_pkl,
bgr2rgb=True,
inception_args=dict(type='StyleGAN')),
dict(type='IS', num_images=50000)
],
best_metric=['fid', 'is'],
sample_kwargs=dict(sample_model='orig'))
total_iters = 500000 * n_disc
# use ddp wrapper for faster training
use_ddp_wrapper = True
find_unused_parameters = False
runner = dict(
type='DynamicIterBasedRunner',
is_dynamic_ddp=False, # Note that this flag should be False.
pass_training_status=True)
metrics = dict(
fid50k=dict(
type='FID',
num_images=50000,
inception_pkl=inception_pkl,
inception_args=dict(type='StyleGAN')),
IS50k=dict(type='IS', num_images=50000))
optimizer = dict(
generator=dict(type='Adam', lr=0.0002, betas=(0.0, 0.999)),
discriminator=dict(type='Adam', lr=0.00005, betas=(0.0, 0.999)))
# train on 2 gpus
data = dict(samples_per_gpu=128)
_base_ = [
'../_base_/models/sngan_proj/sngan_proj_128x128.py',
'../_base_/datasets/imagenet_128.py', '../_base_/default_runtime.py'
]
num_classes = 1000
init_cfg = dict(type='studio')
model = dict(
num_classes=num_classes,
generator=dict(num_classes=num_classes, init_cfg=init_cfg),
discriminator=dict(num_classes=num_classes, init_cfg=init_cfg))
n_disc = 5
train_cfg = dict(disc_steps=n_disc)
lr_config = None
checkpoint_config = dict(interval=50000, by_epoch=False, max_keep_ckpts=20)
custom_hooks = [
dict(
type='VisualizeUnconditionalSamples',
output_dir='training_samples',
interval=5000)
]
log_config = dict(interval=100, hooks=[dict(type='TextLoggerHook')])
inception_pkl = './work_dirs/inception_pkl/imagenet.pkl'
evaluation = dict(
type='GenerativeEvalHook',
interval=dict(milestones=[800000], interval=[10000, 4000]),
metrics=[
dict(
type='FID',
num_images=50000,
inception_pkl=inception_pkl,
bgr2rgb=True,
inception_args=dict(type='StyleGAN')),
dict(type='IS', num_images=50000)
],
best_metric=['fid', 'is'],
sample_kwargs=dict(sample_model='orig'))
total_iters = 500000 * n_disc
# use ddp wrapper for faster training
use_ddp_wrapper = True
find_unused_parameters = False
runner = dict(
type='DynamicIterBasedRunner',
is_dynamic_ddp=False, # Note that this flag should be False.
pass_training_status=True)
metrics = dict(
fid50k=dict(
type='FID',
num_images=50000,
inception_pkl=inception_pkl,
inception_args=dict(type='StyleGAN')),
IS50k=dict(type='IS', num_images=50000))
optimizer = dict(
generator=dict(type='Adam', lr=0.0002, betas=(0.0, 0.999)),
discriminator=dict(type='Adam', lr=0.00005, betas=(0.0, 0.999)))
# train on 2 gpus
data = dict(samples_per_gpu=128)
_base_ = ['../_base_/models/sngan_proj/sngan_proj_32x32.py']
# follow pytorch GAN-Studio, random flip is used in the dataset
_base_ = [
'../_base_/models/sngan_proj/sngan_proj_32x32.py',
'../_base_/datasets/cifar10_nopad.py', '../_base_/default_runtime.py'
]
num_classes = 10
init_cfg = dict(type='studio')
model = dict(
num_classes=num_classes,
generator=dict(
act_cfg=dict(type='ReLU', inplace=True),
num_classes=num_classes,
init_cfg=init_cfg),
discriminator=dict(
act_cfg=dict(type='ReLU', inplace=True),
num_classes=num_classes,
init_cfg=init_cfg))
n_disc = 5
lr_config = None
checkpoint_config = dict(interval=10000, by_epoch=False, max_keep_ckpts=20)
custom_hooks = [
dict(
type='VisualizeUnconditionalSamples',
output_dir='training_samples',
interval=5000)
]
inception_pkl = './work_dirs/inception_pkl/cifar10.pkl'
evaluation = dict(
type='GenerativeEvalHook',
interval=10000,
metrics=[
dict(
type='FID',
num_images=50000,
inception_pkl=inception_pkl,
bgr2rgb=True,
inception_args=dict(type='StyleGAN')),
dict(type='IS', num_images=50000)
],
best_metric=['fid', 'is'],
sample_kwargs=dict(sample_model='orig'))
total_iters = 100000 * n_disc
# use ddp wrapper for faster training
use_ddp_wrapper = True
find_unused_parameters = False
runner = dict(
type='DynamicIterBasedRunner',
is_dynamic_ddp=False, # Note that this flag should be False.
pass_training_status=True)
metrics = dict(
fid50k=dict(
type='FID',
num_images=50000,
inception_pkl=inception_pkl,
inception_args=dict(type='StyleGAN')),
IS50k=dict(type='IS', num_images=50000))
optimizer = dict(
generator=dict(type='Adam', lr=0.0002, betas=(0.5, 0.999)),
discriminator=dict(type='Adam', lr=0.0002, betas=(0.5, 0.999)))
data = dict(samples_per_gpu=64)
# follow pytorch GAN-Studio, random flip is used in the dataset
_base_ = [
'../_base_/models/sngan_proj/sngan_proj_32x32.py',
'../_base_/datasets/cifar10_nopad.py', '../_base_/default_runtime.py'
]
num_classes = 10
init_cfg = dict(type='studio')
model = dict(
num_classes=num_classes,
generator=dict(num_classes=num_classes, init_cfg=init_cfg),
discriminator=dict(num_classes=num_classes, init_cfg=init_cfg))
n_disc = 5
lr_config = None
checkpoint_config = dict(interval=10000, by_epoch=False, max_keep_ckpts=20)
custom_hooks = [
dict(
type='VisualizeUnconditionalSamples',
output_dir='training_samples',
interval=5000)
]
inception_pkl = './work_dirs/inception_pkl/cifar10.pkl'
evaluation = dict(
type='GenerativeEvalHook',
interval=10000,
metrics=[
dict(
type='FID',
num_images=50000,
inception_pkl=inception_pkl,
bgr2rgb=True,
inception_args=dict(type='StyleGAN')),
dict(type='IS', num_images=50000)
],
best_metric=['fid', 'is'],
sample_kwargs=dict(sample_model='orig'))
total_iters = 100000 * n_disc
# use ddp wrapper for faster training
use_ddp_wrapper = True
find_unused_parameters = False
runner = dict(
type='DynamicIterBasedRunner',
is_dynamic_ddp=False, # Note that this flag should be False.
pass_training_status=True)
metrics = dict(
fid50k=dict(
type='FID',
num_images=50000,
inception_pkl=inception_pkl,
inception_args=dict(type='StyleGAN')),
IS50k=dict(type='IS', num_images=50000))
optimizer = dict(
generator=dict(type='Adam', lr=0.0002, betas=(0.5, 0.999)),
discriminator=dict(type='Adam', lr=0.0002, betas=(0.5, 0.999)))
data = dict(samples_per_gpu=64)
# StyleGANv1
> [A Style-Based Generator Architecture for Generative Adversarial Networks](https://openaccess.thecvf.com/content_CVPR_2019/html/Karras_A_Style-Based_Generator_Architecture_for_Generative_Adversarial_Networks_CVPR_2019_paper.html)
<!-- [ALGORITHM] -->
## Abstract
<!-- [ABSTRACT] -->
We propose an alternative generator architecture for generative adversarial networks, borrowing from style transfer literature. The new architecture leads to an automatically learned, unsupervised separation of high-level attributes (e.g., pose and identity when trained on human faces) and stochastic variation in the generated images (e.g., freckles, hair), and it enables intuitive, scale-specific control of the synthesis. The new generator improves the state-of-the-art in terms of traditional distribution quality metrics, leads to demonstrably better interpolation properties, and also better disentangles the latent factors of variation. To quantify interpolation quality and disentanglement, we propose two new, automated methods that are applicable to any generator architecture. Finally, we introduce a new, highly varied and high-quality dataset of human faces.
<!-- [IMAGE] -->
<div align=center>
<img src="https://user-images.githubusercontent.com/28132635/143055313-f4988870-2963-4a2f-916e-0de0e04eb474.JPG"/>
</div>
## Results and Models
<div align="center">
<b> Results (compressed) from StyleGANv1 trained by MMGeneration</b>
<br/>
<img src="https://user-images.githubusercontent.com/12726765/113845642-4f9ee980-97c8-11eb-85c7-49d6d21dd46b.png" width="800"/>
</div>
| Model | FID50k | P&R50k_full | Config | Download |
| :------------------: | :----: | :-----------: | :-----------------------------------------------------------------------------: | :--------------------------------------------------------------------------------: |
| styleganv1_ffhq_256 | 6.090 | 70.228/27.050 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/styleganv1/styleganv1_ffhq_256_g8_25Mimg.py) | [model](https://download.openmmlab.com/mmgen/styleganv1/styleganv1_ffhq_256_g8_25Mimg_20210407_161748-0094da86.pth) |
| styleganv1_ffhq_1024 | 4.056 | 70.302/36.869 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/styleganv1/styleganv1_ffhq_1024_g8_25Mimg.py) | [model](https://download.openmmlab.com/mmgen/styleganv1/styleganv1_ffhq_1024_g8_25Mimg_20210407_161627-850a7234.pth) |
## Citation
```latex
@inproceedings{karras2019style,
title={A style-based generator architecture for generative adversarial networks},
author={Karras, Tero and Laine, Samuli and Aila, Timo},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={4401--4410},
year={2019},
url={https://openaccess.thecvf.com/content_CVPR_2019/html/Karras_A_Style-Based_Generator_Architecture_for_Generative_Adversarial_Networks_CVPR_2019_paper.html},
}
```
Collections:
- Metadata:
Architecture:
- StyleGANv1
Name: StyleGANv1
Paper:
- https://openaccess.thecvf.com/content_CVPR_2019/html/Karras_A_Style-Based_Generator_Architecture_for_Generative_Adversarial_Networks_CVPR_2019_paper.html
README: configs/styleganv1/README.md
Models:
- Config: https://github.com/open-mmlab/mmgeneration/tree/master/configs/styleganv1/styleganv1_ffhq_256_g8_25Mimg.py
In Collection: StyleGANv1
Metadata:
Training Data: FFHQ
Name: styleganv1_ffhq_256_g8_25Mimg
Results:
- Dataset: FFHQ
Metrics:
FID50k: 6.09
P&R50k_full: 70.228/27.050
Task: Unconditional GANs
Weights: https://download.openmmlab.com/mmgen/styleganv1/styleganv1_ffhq_256_g8_25Mimg_20210407_161748-0094da86.pth
- Config: https://github.com/open-mmlab/mmgeneration/tree/master/configs/styleganv1/styleganv1_ffhq_1024_g8_25Mimg.py
In Collection: StyleGANv1
Metadata:
Training Data: FFHQ
Name: styleganv1_ffhq_1024_g8_25Mimg
Results:
- Dataset: FFHQ
Metrics:
FID50k: 4.056
P&R50k_full: 70.302/36.869
Task: Unconditional GANs
Weights: https://download.openmmlab.com/mmgen/styleganv1/styleganv1_ffhq_1024_g8_25Mimg_20210407_161627-850a7234.pth
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment