From 4b181bca09e8cfd94c9979b0fc3ff480425d69a9 Mon Sep 17 00:00:00 2001 From: zeyuzeng Date: Mon, 16 Aug 2021 21:25:41 +0800 Subject: [PATCH 1/5] [Doc] add url link for papers --- configs/cyclegan/README.md | 3 ++- configs/dcgan/README.md | 3 ++- configs/ggan/README.md | 3 ++- configs/lsgan/README.md | 7 ++++--- configs/pggan/README.md | 7 ++++--- configs/pix2pix/README.md | 3 ++- configs/positional_encoding_in_gans/README.md | 11 ++++++----- configs/sagan/README.md | 9 +++++---- configs/singan/README.md | 7 ++++--- configs/sngan_proj/README.md | 3 ++- configs/styleganv1/README.md | 7 ++++--- configs/styleganv2/README.md | 15 ++++++++------- configs/wgan-gp/README.md | 7 ++++--- 13 files changed, 49 insertions(+), 36 deletions(-) diff --git a/configs/cyclegan/README.md b/configs/cyclegan/README.md index c42b88f7f..e3d803e43 100644 --- a/configs/cyclegan/README.md +++ b/configs/cyclegan/README.md @@ -10,7 +10,8 @@ author={Zhu, Jun-Yan and Park, Taesung and Isola, Phillip and Efros, Alexei A}, booktitle={Proceedings of the IEEE international conference on computer vision}, pages={2223--2232}, - year={2017} + year={2017}, + url={https://openaccess.thecvf.com/content_iccv_2017/html/Zhu_Unpaired_Image-To-Image_Translation_ICCV_2017_paper.html}, } ``` diff --git a/configs/dcgan/README.md b/configs/dcgan/README.md index 81b0e45ed..8d3f6a528 100644 --- a/configs/dcgan/README.md +++ b/configs/dcgan/README.md @@ -8,7 +8,8 @@ title={Unsupervised representation learning with deep convolutional generative adversarial networks}, author={Radford, Alec and Metz, Luke and Chintala, Soumith}, journal={arXiv preprint arXiv:1511.06434}, - year={2015} + year={2015}, + url={https://arxiv.org/abs/1511.06434}, } ``` diff --git a/configs/ggan/README.md b/configs/ggan/README.md index 38e7d0adc..abe017f4f 100644 --- a/configs/ggan/README.md +++ b/configs/ggan/README.md @@ -8,7 +8,8 @@ title={Geometric gan}, author={Lim, Jae Hyun and Ye, Jong Chul}, journal={arXiv preprint arXiv:1705.02894}, - year={2017} + year={2017}, + url={https://arxiv.org/abs/1705.02894}, } ``` diff --git a/configs/lsgan/README.md b/configs/lsgan/README.md index 23edd4d6e..b4ddd4e7a 100644 --- a/configs/lsgan/README.md +++ b/configs/lsgan/README.md @@ -9,7 +9,8 @@ author={Mao, Xudong and Li, Qing and Xie, Haoran and Lau, Raymond YK and Wang, Zhen and Paul Smolley, Stephen}, booktitle={Proceedings of the IEEE international conference on computer vision}, pages={2794--2802}, - year={2017} + year={2017}, + url={https://openaccess.thecvf.com/content_iccv_2017/html/Mao_Least_Squares_Generative_ICCV_2017_paper.html}, } ``` @@ -22,8 +23,8 @@ -| Models | Dataset | SWD | MS-SSIM | FID | Config | Download | -| :-----------: | :------------: | :-----------------------------: | :-----: | :-----: | :--------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | +| Models | Dataset | SWD | MS-SSIM | FID | Config | Download | +| :-----------: | :------------: | :-----------------------------: | :-----: | :-----: | :--------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | | LSGAN 64x64 | CelebA-Cropped | 6.16, 6.83, 37.64/16.87 | 0.3216 | 11.9258 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/lsgan/lsgan_celeba-cropped_dcgan-archi_lr-1e-3_64_b128x1_12m.py) | [model](https://download.openmmlab.com/mmgen/lsgan/lsgan_celeba-cropped_dcgan-archi_lr-1e-3_64_b128x1_12m_20210429_144001-92ca1d0d.pth?versionId=CAEQKhiBgIDS1crxyBciIDAxNzgzOTE2ZDNiNDQ4ZGU4MmI5MGY1YjdmNjg0Nzkw)| [log](https://download.openmmlab.com/mmgen/lsgan/lsgan_celeba-cropped_dcgan-archi_lr-1e-3_64_b128x1_12m_20210422_131925.log.json?versionId=CAEQKhiBgMDdwvHxyBciIGQwOThmY2MzNGY4NjQ4MjE5NzdmYzQwYjhmMTcyMjIy) | | LSGAN 64x64 | LSUN-Bedroom | 5.66, 9.0, 18.6/11.09 | 0.0671 | 30.7390 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/lsgan/lsgan_lsun-bedroom_dcgan-archi_lr-1e-4_64_b128x1_12m.py) | [model](https://download.openmmlab.com/mmgen/lsgan/lsgan_lsun-bedroom_dcgan-archi_lr-1e-4_64_b128x1_12m_20210429_144602-ec4ec6bb.pth?versionId=CAEQKhiBgMDc1crxyBciIDc0NGE5OTc1YmUwNzQ1OTg4YzY5MDkyOTYyY2VhZGVm)| [log](https://download.openmmlab.com/mmgen/lsgan/lsgan_lsun-bedroom_dcgan-archi_lr-1e-4_64_b128x1_12m_20210423_005020.log.json?versionId=CAEQKhiBgIDdwvHxyBciIDg4YWI3ZGRlYzNmMDRmOTc5OWU5NWJkNTZjMjQ0MjFm) | | LSGAN 128x128 | CelebA-Cropped | 21.66, 9.83, 16.06, 70.76/29.58 | 0.3691 | 38.3752 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/lsgan/lsgan_celeba-cropped_dcgan-archi_lr-1e-4_128_b64x1_10m.py) | [model](https://download.openmmlab.com/mmgen/lsgan/lsgan_celeba-cropped_dcgan-archi_lr-1e-4_128_b64x1_10m_20210429_144229-01ba67dc.pth?versionId=CAEQKhiBgMDS1crxyBciIGU4N2JhNGQ0YjU2YTQ2OWI5MWUxZmQ1NmUwNzY3MmUx)| [log](https://download.openmmlab.com/mmgen/lsgan/lsgan_celeba-cropped_dcgan-archi_lr-1e-4_128_b64x1_10m_20210423_132126.log.json?versionId=CAEQKhiBgICMw_HxyBciIDQ2MzZlNTViMTNjNTRjN2JhNWRlMzViMzg5YzlhODc3) | diff --git a/configs/pggan/README.md b/configs/pggan/README.md index 305834e30..5f93aba35 100644 --- a/configs/pggan/README.md +++ b/configs/pggan/README.md @@ -7,7 +7,8 @@ title={Progressive growing of gans for improved quality, stability, and variation}, author={Karras, Tero and Aila, Timo and Laine, Samuli and Lehtinen, Jaakko}, journal={arXiv preprint arXiv:1710.10196}, - year={2017} + year={2017}, + url={https://arxiv.org/abs/1710.10196}, } ```
@@ -17,8 +18,8 @@
-| Models | Details | MS-SSIM | SWD(xx,xx,xx,xx/avg) | Config | Download | -| :-------------: | :------------: | :-----: | :--------------------------: | :-------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------: | +| Models | Details | MS-SSIM | SWD(xx,xx,xx,xx/avg) | Config | Download | +| :-------------: | :------------: | :-----: | :--------------------------: | :-------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------: | | pggan_128x128 | celeba-cropped | 0.3023 | 3.42, 4.04, 4.78, 20.38/8.15 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/pggan/pggan_celeba-cropped_128_g8_12Mimgs.py) | [model](https://download.openmmlab.com/mmgen/pggan/pggan_celeba-cropped_128_g8_20210408_181931-85a2e72c.pth) | | pggan_128x128 | lsun-bedroom | 0.0602 | 3.5, 2.96, 2.76, 9.65/4.72 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/pggan/pggan_lsun-bedroom_128_g8_12Mimgs.py) | [model](https://download.openmmlab.com/mmgen/pggan/pggan_lsun-bedroom_128x128_g8_20210408_182033-5e59f45d.pth) | | pggan_1024x1024 | celeba-hq | 0.3379 | 8.93, 3.98, 3.07, 2.64/4.655 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/pggan/pggan_celeba-hq_1024_g8_12Mimg.py) | [model](https://download.openmmlab.com/mmgen/pggan/pggan_celeba-hq_1024_g8_20210408_181911-f1ef51c3.pth) | diff --git a/configs/pix2pix/README.md b/configs/pix2pix/README.md index 2218f4c6f..1b43cf875 100644 --- a/configs/pix2pix/README.md +++ b/configs/pix2pix/README.md @@ -10,7 +10,8 @@ author={Isola, Phillip and Zhu, Jun-Yan and Zhou, Tinghui and Efros, Alexei A}, booktitle={Proceedings of the IEEE conference on computer vision and pattern recognition}, pages={1125--1134}, - year={2017} + year={2017}, + url={https://openaccess.thecvf.com/content_cvpr_2017/html/Isola_Image-To-Image_Translation_With_CVPR_2017_paper.html}, } ``` diff --git a/configs/positional_encoding_in_gans/README.md b/configs/positional_encoding_in_gans/README.md index 5ce052595..5291256b1 100644 --- a/configs/positional_encoding_in_gans/README.md +++ b/configs/positional_encoding_in_gans/README.md @@ -8,7 +8,8 @@ title={Positional Encoding as Spatial Inductive Bias in GANs}, author={Xu, Rui and Wang, Xintao and Chen, Kai and Zhou, Bolei and Loy, Chen Change}, journal={arXiv preprint arXiv:2012.05217}, - year={2020} + year={2020}, + url={https://openaccess.thecvf.com/content/CVPR2021/html/Xu_Positional_Encoding_As_Spatial_Inductive_Bias_in_GANs_CVPR_2021_paper.html}, } ``` @@ -21,8 +22,8 @@ -| Models | Reference in Paper | Scales | FID50k | P&R10k | Config | Download | -| :--------------------------: | :----------------: | :------------: | :----: | :---------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------: | +| Models | Reference in Paper | Scales | FID50k | P&R10k | Config | Download | +| :--------------------------: | :----------------: | :------------: | :----: | :---------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------: | | stylegan2_c2_256_baseline | Tab.5 config-a | 256 | 5.56 | 75.92/51.24 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/positional_encoding_in_gans/stylegan2_c2_ffhq_256_b3x8_1100k.py) | [model](https://download.openmmlab.com/mmgen/pe_in_gans/stylegan2_c2_config-a_ffhq_256x256_b3x8_1100k_20210406_145127-71d9634b.pth) | | stylegan2_c2_512_baseline | Tab.5 config-b | 512 | 4.91 | 75.65/54.58 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/positional_encoding_in_gans/stylegan2_c2_ffhq_512_b3x8_1100k.py) | [model](https://download.openmmlab.com/mmgen/pe_in_gans/stylegan2_c2_config-b_ffhq_512x512_b3x8_1100k_20210406_145142-e85e5cf4.pth) | | ms-pie_stylegan2_c2_config-c | Tab.5 config-c | 256, 384, 512 | 3.35 | 73.84/55.77 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/positional_encoding_in_gans/mspie-stylegan2_c2_config-c_ffhq_256-512_b3x8_1100k.py) | [model](https://download.openmmlab.com/mmgen/pe_in_gans/mspie-stylegan2_c2_config-c_ffhq_256-512_b3x8_1100k_20210406_144824-9f43b07d.pth) | @@ -49,8 +50,8 @@ Note that we report the FID and P&R metric (FFHQ dataset) in the largest scale. -| Model | Data | Num Scales | Config | Download | -| :-----------------------------: | :-----------------------------------------------------------------------------: | :--------: | :------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | +| Model | Data | Num Scales | Config | Download | +| :-----------------------------: | :------------------------------------------------------------------------------: | :--------: | :------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | | SinGAN + no pad | [balloons.png](https://download.openmmlab.com/mmgen/dataset/singan/balloons.png) | 8 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/positional_encoding_in_gans/singan_interp-pad_balloons.py) | [ckpt](https://download.openmmlab.com/mmgen/pe_in_gans/singan_interp-pad_balloons_20210406_180014-96f51555.pth) | [pkl](https://download.openmmlab.com/mmgen/pe_in_gans/singan_interp-pad_balloons_20210406_180014-96f51555.pkl) | | SinGAN + no pad + no bn in disc | [balloons.png](https://download.openmmlab.com/mmgen/dataset/singan/balloons.png) | 8 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/positional_encoding_in_gans/singan_interp-pad_disc-nobn_balloons.py) | [ckpt](https://download.openmmlab.com/mmgen/pe_in_gans/singan_interp-pad_disc-nobn_balloons_20210406_180059-7d63e65d.pth) | [pkl](https://download.openmmlab.com/mmgen/pe_in_gans/singan_interp-pad_disc-nobn_balloons_20210406_180059-7d63e65d.pkl) | | SinGAN + no pad + no bn in disc | [fish.jpg](https://download.openmmlab.com/mmgen/dataset/singan/fish-crop.jpg) | 10 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/positional_encoding_in_gans/singan_interp-pad_disc-nobn_fish.py) | [ckpt](https://download.openmmlab.com/mmgen/pe_in_gans/singan_interp-pad_disc-nobn_fis_20210406_175720-9428517a.pth) | [pkl](https://download.openmmlab.com/mmgen/pe_in_gans/singan_interp-pad_disc-nobn_fis_20210406_175720-9428517a.pkl) | diff --git a/configs/sagan/README.md b/configs/sagan/README.md index 5869edda4..8d1d31db6 100644 --- a/configs/sagan/README.md +++ b/configs/sagan/README.md @@ -9,7 +9,8 @@ booktitle={International conference on machine learning}, pages={7354--7363}, year={2019}, - organization={PMLR} + organization={PMLR}, + url={https://proceedings.mlr.press/v97/zhang19d.html}, } ```
@@ -33,9 +34,9 @@ We also provide converted pre-train models from [Pytorch-StudioGAN](https://gith To be noted that, in Pytorch Studio GAN, **inplace ReLU** is used in generator and discriminator. | Models | Dataset | Inplace ReLU | n_disc | Total Iters | IS (Our Pipeline) | FID (Our Pipeline) | IS (StudioGAN) | FID (StudioGAN) | Download | Original Download link | -| :-------: | :------: | :----------: | :----: | :---------: | :----------------: | :-----------------: | :----------: | :-----------: | :-------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------: | -| sagan_32 | CIFAR10 | w | 5 | 100000 | 9.116 | 10.2011 | 8.680 | 14.009 | [Download](https://download.openmmlab.com/mmgen/sagan/sagan_32_cifar10_convert-studio-rgb_20210730_153321-080da7e2.pth) | [Download](https://drive.google.com/drive/folders/1FA8hcz4MB8-hgTwLuDA0ZUfr8slud5P_) | -| sagan_128 | ImageNet | w | 1 | 1000000 | 27.367 | 40.1162 | 29.848 | 34.726 | [Download](https://download.openmmlab.com/mmgen/sagan/sagan_128_imagenet1k_convert-studio-rgb_20210730_153357-eddb0d1d.pth) | [Download](https://drive.google.com/drive/folders/1ZYaqeeumDgxOPDhRR5QLeLFIpgBJ9S6B) | +| :-------: | :------: | :----------: | :----: | :---------: | :---------------: | :----------------: | :------------: | :-------------: | :-------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------: | +| sagan_32 | CIFAR10 | w | 5 | 100000 | 9.116 | 10.2011 | 8.680 | 14.009 | [Download](https://download.openmmlab.com/mmgen/sagan/sagan_32_cifar10_convert-studio-rgb_20210730_153321-080da7e2.pth) | [Download](https://drive.google.com/drive/folders/1FA8hcz4MB8-hgTwLuDA0ZUfr8slud5P_) | +| sagan_128 | ImageNet | w | 1 | 1000000 | 27.367 | 40.1162 | 29.848 | 34.726 | [Download](https://download.openmmlab.com/mmgen/sagan/sagan_128_imagenet1k_convert-studio-rgb_20210730_153357-eddb0d1d.pth) | [Download](https://drive.google.com/drive/folders/1ZYaqeeumDgxOPDhRR5QLeLFIpgBJ9S6B) | * `Our Pipeline` denote results evaluated with our pipeline. diff --git a/configs/singan/README.md b/configs/singan/README.md index 1b1a2b390..9da19916a 100644 --- a/configs/singan/README.md +++ b/configs/singan/README.md @@ -9,7 +9,8 @@ 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} + 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}, } ``` @@ -22,8 +23,8 @@
-| Model | Data | Num Scales | Config | Download | -| :----: | :-----------------------------------------------------------------------------: | :--------: | :------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | +| 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) | diff --git a/configs/sngan_proj/README.md b/configs/sngan_proj/README.md index 4280e0b96..0244001eb 100644 --- a/configs/sngan_proj/README.md +++ b/configs/sngan_proj/README.md @@ -7,7 +7,8 @@ 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} + year={2018}, + url={https://openreview.net/forum?id=B1QRgziT-}, } ```
diff --git a/configs/styleganv1/README.md b/configs/styleganv1/README.md index 1d8e3ba01..5b5752ff4 100644 --- a/configs/styleganv1/README.md +++ b/configs/styleganv1/README.md @@ -8,7 +8,8 @@ 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} + 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}, } ``` @@ -20,7 +21,7 @@
-| Model | FID50k | P&R50k_full | Config | Download | -| :------------------: | :----: | :-----------: | :-------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------: | +| 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) | diff --git a/configs/styleganv2/README.md b/configs/styleganv2/README.md index 44f9bff11..7d622841b 100644 --- a/configs/styleganv2/README.md +++ b/configs/styleganv2/README.md @@ -8,7 +8,8 @@ author={Karras, Tero and Laine, Samuli and Aittala, Miika and Hellsten, Janne and Lehtinen, Jaakko and Aila, Timo}, booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition}, pages={8110--8119}, - year={2020} + year={2020}, + url={https://openaccess.thecvf.com/content_CVPR_2020/html/Karras_Analyzing_and_Improving_the_Image_Quality_of_StyleGAN_CVPR_2020_paper.html}, } ``` @@ -19,8 +20,8 @@ -| Model | Comment | FID50k | P&R50k | Config | Download | -| :---------------------------------: | :-------------: | :----: | :-----------: | :---------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------: | +| Model | Comment | FID50k | P&R50k | Config | Download | +| :---------------------------------: | :-------------: | :----: | :-----------: | :---------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------: | | stylegan2_config-f_ffhq_1024 | official weight | 2.8134 | 62.856/49.400 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/styleganv2/stylegan2_c2_ffhq_1024_b4x8.py) | [model](https://download.openmmlab.com/mmgen/stylegan2/official_weights/stylegan2-ffhq-config-f-official_20210327_171224-bce9310c.pth) | | stylegan2_config-f_lsun-car_384x512 | official weight | 5.4316 | 65.986/48.190 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/styleganv2/stylegan2_c2_lsun-car_384x512_b4x8.py) | [model](https://download.openmmlab.com/mmgen/stylegan2/official_weights/stylegan2-car-config-f-official_20210327_172340-8cfe053c.pth) | | stylegan2_config-f_horse_256 | official weight | - | - | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/styleganv2/stylegan2_c2_lsun-horse_256_b4x8_800k.py) | [model](https://download.openmmlab.com/mmgen/stylegan2/official_weights/stylegan2-horse-config-f-official_20210327_173203-ef3e69ca.pth) | @@ -48,8 +49,8 @@ As shown in the figure, we provide **3** ways to do mixed-precision training for * [stylegan2_c2_apex_fp16_PL-R1-no-scaler](https://github.com/open-mmlab/mmgeneration/tree/master/configs/styleganv2/stylegan2_c2_apex_fp16_PL-R1-no-scaler_ffhq_256_b4x8_800k.py): In this setting, we adopt the [APEX](https://github.com/NVIDIA/apex) toolkit to implement mixed-precision training with multiple loss/gradient scalers. In APEX, you can assign different loss scalers for the generator and the discriminator respectively. Note that we still ignore the gradient scaler in the path length loss and gradient penalty loss. -| Model | Comment | Dataset | FID50k | Config | Download | -| :-------------------------------------------------------------------: | :-------------------------------------: | :-----: | :----: | :----------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | +| Model | Comment | Dataset | FID50k | Config | Download | +| :-------------------------------------------------------------------: | :-------------------------------------: | :-----: | :----: | :----------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | | stylegan2_config-f_ffhq_256 | baseline | FFHQ256 | 3.992 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/styleganv2/stylegan2_c2_ffhq_256_b4x8_800k.py) | [ckpt](https://download.openmmlab.com/mmgen/stylegan2/stylegan2_c2_ffhq_256_b4x8_20210407_160709-7890ae1f.pth) | | stylegan2_c2_fp16_partial-GD_PL-no-scaler_ffhq_256_b4x8_800k | partial layers in fp16 | FFHQ256 | 4.331 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/styleganv2/stylegan2_c2_fp16_partial-GD_PL-no-scaler_ffhq_256_b4x8_800k.py) | [ckpt](https://download.openmmlab.com/mmgen/stylegan2/stylegan2_c2_fp16_partial-GD_PL-no-scaler_ffhq_256_b4x8_800k_20210508_114854-dacbe4c9.pth?versionId=CAEQKxiBgIDNhrOoyhciIGM1OTIwZmFiYWM4MzQyNzE4YzlkYjYxMTNhZjU1ZGFj) | | stylegan2_c2_fp16-globalG-partialD_PL-R1-no-scaler_ffhq_256_b4x8_800k | the whole G in fp16 | FFHQ256 | 4.362 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/styleganv2/stylegan2_c2_fp16-globalG-partialD_PL-R1-no-scaler_ffhq_256_b4x8_800k.py) | [ckpt](https://download.openmmlab.com/mmgen/stylegan2/stylegan2_c2_fp16-globalG-partialD_PL-R1-no-scaler_ffhq_256_b4x8_800k_20210508_114930-ef8270d4.pth?versionId=CAEQKxiBgIDOhrOoyhciIDM4ZTQxYzkxZTE4ZjQ2ZjM4ZmU3YzlhOWNkYWI1OWQ1) | @@ -71,8 +72,8 @@ With a simliar way, users can switch to [config for partial-GD](https://github.c ## About Different Implementations of FID Metric -| Model | Comment | FID50k | FID Version | Config | Download | -| :--------------------------: | :-------------: | :----: | :-------------: | :----------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | +| Model | Comment | FID50k | FID Version | Config | Download | +| :--------------------------: | :-------------: | :----: | :-------------: | :----------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | | stylegan2_config-f_ffhq_1024 | official weight | 2.8732 | Tero's StyleGAN | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/styleganv2/stylegan2_c2_ffhq_1024_b4x8.py) | [model](https://download.openmmlab.com/mmgen/stylegan2/official_weights/stylegan2-ffhq-config-f-official_20210327_171224-bce9310c.pth) | [FID-Reals](https://download.openmmlab.com/mmgen/evaluation/fid_inception_pkl/ffhq-1024-50k-stylegan.pkl) | | stylegan2_config-f_ffhq_1024 | our training | 2.9413 | Tero's StyleGAN | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/styleganv2/stylegan2_c2_ffhq_1024_b4x8.py) | [model](https://download.openmmlab.com/mmgen/stylegan2/stylegan2_c2_ffhq_1024_b4x8_20210407_150045-618c9024.pth) | [FID-Reals](https://download.openmmlab.com/mmgen/evaluation/fid_inception_pkl/ffhq-1024-50k-stylegan.pkl) | | stylegan2_config-f_ffhq_1024 | official weight | 2.8134 | Our PyTorch | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/styleganv2/stylegan2_c2_ffhq_1024_b4x8.py) | [model](https://download.openmmlab.com/mmgen/stylegan2/official_weights/stylegan2-ffhq-config-f-official_20210327_171224-bce9310c.pth) | [FID-Reals](https://download.openmmlab.com/mmgen/evaluation/fid_inception_pkl/ffhq-1024-50k-rgb.pkl) | diff --git a/configs/wgan-gp/README.md b/configs/wgan-gp/README.md index 31fe2771e..cf22972e2 100644 --- a/configs/wgan-gp/README.md +++ b/configs/wgan-gp/README.md @@ -8,7 +8,8 @@ title={Improved Training of Wasserstein GANs}, author={Gulrajani, Ishaan and Ahmed, Faruk and Arjovsky, Martin and Dumoulin, Vincent and Courville, Aaron}, journal={arXiv preprint arXiv:1704.00028}, - year={2017} + year={2017}, + url={https://arxiv.org/abs/1704.00028}, } ``` @@ -20,7 +21,7 @@ -| Models | Dataset | Details | SWD | MS-SSIM | Config | Download | -| :---------: | :------------: | :----------------: | :---------------------------: | :-----: | :---------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------: | +| Models | Dataset | Details | SWD | MS-SSIM | Config | Download | +| :---------: | :------------: | :----------------: | :---------------------------: | :-----: | :---------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------: | | WGAN-GP 128 | CelebA-Cropped | GN | 5.87, 9.76, 9.43, 18.84/10.97 | 0.2601 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/wgan-gp/wgangp_GN_celeba-cropped_128_b64x1_160kiter.py) | [model](https://download.openmmlab.com/mmgen/wgangp/wgangp_GN_celeba-cropped_128_b64x1_160k_20210408_170611-f8a99336.pth) | | WGAN-GP 128 | LSUN-Bedroom | GN, GP-lambda = 50 | 11.7, 7.87, 9.82, 25.36/13.69 | 0.059 | [config](https://github.com/open-mmlab/mmgeneration/tree/master/configs/wgan-gp/wgangp_GN_GP-50_lsun-bedroom_128_b64x1_160kiter.py) | [model](https://download.openmmlab.com/mmgen/wgangp/wgangp_GN_GP-50_lsun-bedroom_128_b64x1_130k_20210408_170509-56f2a37c.pth) | From 1c47a8d84109f91448b890e74dfacd14bdd23e68 Mon Sep 17 00:00:00 2001 From: zeyuzeng Date: Mon, 30 Aug 2021 16:46:41 +0800 Subject: [PATCH 2/5] [Fix] wgangp config error --- configs/wgan-gp/wgangp_GN_celeba-cropped_128_b64x1_160kiter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configs/wgan-gp/wgangp_GN_celeba-cropped_128_b64x1_160kiter.py b/configs/wgan-gp/wgangp_GN_celeba-cropped_128_b64x1_160kiter.py index bcb608a40..ade921547 100644 --- a/configs/wgan-gp/wgangp_GN_celeba-cropped_128_b64x1_160kiter.py +++ b/configs/wgan-gp/wgangp_GN_celeba-cropped_128_b64x1_160kiter.py @@ -1,6 +1,7 @@ _base_ = [ '../_base_/datasets/unconditional_imgs_128x128.py', - '../_base_/models/wgangp_base.py' + '../_base_/models/wgangp_base.py', + '../_base_/default_runtime.py' ] data = dict( From a6393f55a880d55aefcfc4f5648c91ba54634ee9 Mon Sep 17 00:00:00 2001 From: zeyuzeng Date: Mon, 30 Aug 2021 17:42:11 +0800 Subject: [PATCH 3/5] [Fix] wgangp config error --- .../wgan-gp/wgangp_GN_celeba-cropped_128_b64x1_160kiter.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configs/wgan-gp/wgangp_GN_celeba-cropped_128_b64x1_160kiter.py b/configs/wgan-gp/wgangp_GN_celeba-cropped_128_b64x1_160kiter.py index ade921547..9eb978aa2 100644 --- a/configs/wgan-gp/wgangp_GN_celeba-cropped_128_b64x1_160kiter.py +++ b/configs/wgan-gp/wgangp_GN_celeba-cropped_128_b64x1_160kiter.py @@ -21,6 +21,11 @@ lr_config = None total_iters = 160000 +runner = dict( + type='DynamicIterBasedRunner', + is_dynamic_ddp=False, # Note that this flag should be False. + pass_training_status=True) + metrics = dict( ms_ssim10k=dict(type='MS_SSIM', num_images=10000), swd16k=dict(type='SWD', num_images=16384, image_shape=(3, 128, 128))) From c88b29a9ba6327d3eea4cf69169e3caf0d645370 Mon Sep 17 00:00:00 2001 From: zeyuzeng Date: Mon, 30 Aug 2021 17:43:02 +0800 Subject: [PATCH 4/5] [Fix] add format for LSUN dataset --- mmgen/datasets/unconditional_image_dataset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmgen/datasets/unconditional_image_dataset.py b/mmgen/datasets/unconditional_image_dataset.py index 47498b016..958f9c25b 100644 --- a/mmgen/datasets/unconditional_image_dataset.py +++ b/mmgen/datasets/unconditional_image_dataset.py @@ -23,7 +23,7 @@ class UnconditionalImageDataset(Dataset): mode. Otherwise, in train mode. Default to False. """ - _VALID_IMG_SUFFIX = ('.jpg', '.png', '.jpeg', '.JPEG') + _VALID_IMG_SUFFIX = ('.jpg', '.png', '.jpeg', '.JPEG', '.webp') def __init__(self, imgs_root, pipeline, test_mode=False): super().__init__() From 499a824e86cb71f33423be28f8007c04baf66ecd Mon Sep 17 00:00:00 2001 From: zeyuzeng Date: Wed, 1 Sep 2021 16:47:57 +0800 Subject: [PATCH 5/5] [Fix] lint --- .../wgangp_GN_celeba-cropped_128_b64x1_160kiter.py | 3 +-- mmgen/datasets/pipelines/crop.py | 8 ++++---- mmgen/models/gans/base_gan.py | 6 +++--- mmgen/models/gans/singan.py | 4 ++-- mmgen/ops/conv2d_gradfix.py | 7 +------ tests/test_datasets/test_pipelines/test_crop.py | 8 ++++---- 6 files changed, 15 insertions(+), 21 deletions(-) diff --git a/configs/wgan-gp/wgangp_GN_celeba-cropped_128_b64x1_160kiter.py b/configs/wgan-gp/wgangp_GN_celeba-cropped_128_b64x1_160kiter.py index 9eb978aa2..fdd0e2929 100644 --- a/configs/wgan-gp/wgangp_GN_celeba-cropped_128_b64x1_160kiter.py +++ b/configs/wgan-gp/wgangp_GN_celeba-cropped_128_b64x1_160kiter.py @@ -1,7 +1,6 @@ _base_ = [ '../_base_/datasets/unconditional_imgs_128x128.py', - '../_base_/models/wgangp_base.py', - '../_base_/default_runtime.py' + '../_base_/models/wgangp_base.py', '../_base_/default_runtime.py' ] data = dict( diff --git a/mmgen/datasets/pipelines/crop.py b/mmgen/datasets/pipelines/crop.py index 2cff59a79..74257767e 100644 --- a/mmgen/datasets/pipelines/crop.py +++ b/mmgen/datasets/pipelines/crop.py @@ -49,8 +49,8 @@ def _crop(self, data): y_offset = max(0, (data_h - crop_h)) // 2 crop_bbox = [x_offset, y_offset, crop_w, crop_h] - item_ = item[y_offset:y_offset + crop_h, - x_offset:x_offset + crop_w, ...] + item_ = item[y_offset:y_offset + crop_h, x_offset:x_offset + + crop_w, ...] crop_bbox_list.append(crop_bbox) data_list_.append(item_) @@ -111,8 +111,8 @@ def __init__(self, keys, crop_size, crop_pos=None): def _crop(self, data, x_offset, y_offset, crop_w, crop_h): crop_bbox = [x_offset, y_offset, crop_w, crop_h] - data_ = data[y_offset:y_offset + crop_h, x_offset:x_offset + crop_w, - ...] + data_ = data[y_offset:y_offset + crop_h, x_offset:x_offset + + crop_w, ...] return data_, crop_bbox def __call__(self, results): diff --git a/mmgen/models/gans/base_gan.py b/mmgen/models/gans/base_gan.py index dbc524376..784a15ba1 100644 --- a/mmgen/models/gans/base_gan.py +++ b/mmgen/models/gans/base_gan.py @@ -28,9 +28,9 @@ def with_ema_gen(self): @property def with_gen_auxiliary_loss(self): """bool: whether the GAN adopts auxiliary loss in the generator.""" - return hasattr(self, - 'gen_auxiliary_losses') and (self.gen_auxiliary_losses - is not None) + return hasattr( + self, + 'gen_auxiliary_losses') and (self.gen_auxiliary_losses is not None) @property def with_disc_auxiliary_loss(self): diff --git a/mmgen/models/gans/singan.py b/mmgen/models/gans/singan.py index 7f87a3400..d413502bd 100644 --- a/mmgen/models/gans/singan.py +++ b/mmgen/models/gans/singan.py @@ -383,8 +383,8 @@ def train_step(self, # end of each scale # calculate noise weight for next scale - if (curr_iter % self.train_cfg['iters_per_scale'] - == 0) and (self.curr_stage < len(self.reals) - 1): + if (curr_iter % self.train_cfg['iters_per_scale'] == 0) and ( + self.curr_stage < len(self.reals) - 1): with torch.no_grad(): g_recon = self.generator( diff --git a/mmgen/ops/conv2d_gradfix.py b/mmgen/ops/conv2d_gradfix.py index ebdd70899..0eec8603e 100644 --- a/mmgen/ops/conv2d_gradfix.py +++ b/mmgen/ops/conv2d_gradfix.py @@ -121,12 +121,7 @@ def no_weight_gradients(): weight_gradients_disabled = old -def conv2d(input, - weight, - bias=None, - stride=1, - padding=0, - dilation=1, +def conv2d(input, weight, bias=None, stride=1, padding=0, dilation=1, groups=1): if _should_use_custom_op(input): return _conv2d_gradfix( diff --git a/tests/test_datasets/test_pipelines/test_crop.py b/tests/test_datasets/test_pipelines/test_crop.py index 9f6ab3e00..dc557e496 100644 --- a/tests/test_datasets/test_pipelines/test_crop.py +++ b/tests/test_datasets/test_pipelines/test_crop.py @@ -131,12 +131,12 @@ def test_fixed_crop(self): assert crop_w == results['img_b_crop_bbox'][2] assert crop_h == results['img_b_crop_bbox'][3] assert np.array_equal( - self.results['img_a'][y_offset:y_offset + crop_h, - x_offset:x_offset + crop_w, :], + self.results['img_a'][y_offset:y_offset + + crop_h, x_offset:x_offset + crop_w, :], results['img_a']) assert np.array_equal( - self.results['img_b'][y_offset:y_offset + crop_h, - x_offset:x_offset + crop_w, :], + self.results['img_b'][y_offset:y_offset + + crop_h, x_offset:x_offset + crop_w, :], results['img_b']) # test given pos crop for lager size than the original shape