Regularizing Generative Adversarial Networks under Limited Data (CVPR 2021)

Overview

Regularizing Generative Adversarial Networks under Limited Data

[Project Page][Paper]

Implementation for our GAN regularization method. The proposed regularization 1) improves the performance of GANs under limited training data, and 2) complements the exisiting data augmentation approches.

Please note that this is not an officially supported Google product.

Paper

Please cite our paper if you find the code or dataset useful for your research.

Regularizing Generative Adversarial Networks under Limited Data
Hung-Yu Tseng, Lu Jiang, Ce Liu, Ming-Hsuan Yang, Weilong Yang
Computer Vision and Pattern Recognition (CVPR), 2021

@inproceedings{lecamgan,
  author = {Tseng, Hung-Yu and Jiang, Lu and Liu, Ce and Yang, Ming-Hsuan and Yang, Weilong},
  title = {Regularing Generative Adversarial Networks under Limited Data},
  booktitle = {CVPR},
  year = {2021}
}

Installation and Usage

We provide three implementations: biggan_cifar, biggan_imagenet, and stylegan2. Plesase refer to the README.md file under each sub-folder for the installation and usage guides.

Comments
  • Training stylegan 2

    Training stylegan 2

    Hello!

    Thanks for the great paper and code!

    Unfortunately I am having some issues with integrating the lecam_loss.py with the original stylegan2-ada repo.

    I tried hardcoding the functionality of the lecam_loss.py function into the stylegan2 loss in here. It trains but it starts producing aliens and in it quite quickly turns into green images.

    Could you please clarify how it is done in more detail?

    opened by KasparPeterson 2
  • Decay factor is 0.99 in the paper but 0.9 in the code

    Decay factor is 0.99 in the paper but 0.9 in the code

    Hello, thanks for sharing this helpful repo! I found that in your code the decay factor is 0.9 which is reported as 0.99 in the paper. Although this is not a critical problem, which value should I exactly use to better reproduce the performance in the paper?

    Paper:

    We fix the decay factor γ to 0.99 in all experiments.

    Code: https://github.com/google/lecam-gan/blob/f9af9485eda4637b25e694c142ce8e6992eb7243/third_party/utils.py#L638

    Best.

    opened by edward3862 2
  • ReLU on Discriminator activations?

    ReLU on Discriminator activations?

    Thank you for making your implementation available, I'm quite excited to apply the regularizer to ongoing projects.

    There was some discussion online recently about a possible mismatch between Eqn 4 in a public preprint of the paper (available here) and the code implementation at these lines: {tf, pytorch}.

    Could you please clarify if there's supposed to be a ReLU (present in the code but not the preprint) in Eqn. 4 as well? Thanks again!

    opened by neel-dey 2
  • Implementation for StyleGAN2

    Implementation for StyleGAN2

    Hi I noticed there is only the code for Lecam regularizer in the StyleGAN2 folder. Is the full implementation not available in the repo? Are we supposed to manually add the regularizer to the official StyleGAN2 code ourselves?

    opened by mshahbazi72 1
  • The formula in the paper

    The formula in the paper

    The formula (4) in the paper is R_{LC}= E_{x∼T}[||D(x)−\alpha_{F}||^2]+ E_{z∼p_z}[||D(G(z))−\alpha_R||^2] but according to my understanding, this will not make the result converge to a certain point stably, but will cause the result to oscillate, and this does not conform to the legend (2) in the paper, is this a clerical error?

    opened by faduo 1
  • Results in Cifar10

    Results in Cifar10

    Hi,

    It seems like the baseline results in your paper are different from the results in ADA/DA. For example, FID reported for Cifar10 is 5.33 in ADA and 2.68 in your paper. Please advise.

    opened by cuikaiwen18 1
  • Paper link in README is not working

    Paper link in README is not working

    Hi!

    The paper link in the readme points to https://github.com/google/lecam-gan/blob/master, which I assume is a mistake. My first thought was that this was maybe by design since CVPR2021 is in June and so the paper isn't public yet, but then I found it here, so I guess this is not the case.

    Thanks for your work btw!

    opened by ouhenio 1
  • Unable to run demo file in imagenet folder

    Unable to run demo file in imagenet folder

    The model file is not accessible and call to model file raises the following exception.

    model_path=gs://robust-gan/lc-biggan-imagenet128-100/240000 batch_size=2 rm: cannot remove '/tmp/models/*': No such file or directory ServiceException: 401 Anonymous caller does not have storage.objects.list access to the Google Cloud Storage bucket. CommandException: 1 file/object could not be transferred. download model file to :

    Can you please provide the file or share where can I get it?

    opened by immkapoor 1
Owner
Google
Google ❤️ Open Source
Google
Pytorch implementation for "Adversarial Robustness under Long-Tailed Distribution" (CVPR 2021 Oral)

Adversarial Long-Tail This repository contains the PyTorch implementation of the paper: Adversarial Robustness under Long-Tailed Distribution, CVPR 20

Tong WU 89 Dec 15, 2022
[ICLR 2021, Spotlight] Large Scale Image Completion via Co-Modulated Generative Adversarial Networks

Large Scale Image Completion via Co-Modulated Generative Adversarial Networks, ICLR 2021 (Spotlight) Demo | Paper [NEW!] Time to play with our interac

Shengyu Zhao 373 Jan 2, 2023
PrimitiveNet: Primitive Instance Segmentation with Local Primitive Embedding under Adversarial Metric (ICCV 2021)

PrimitiveNet Source code for the paper: Jingwei Huang, Yanfeng Zhang, Mingwei Sun. [PrimitiveNet: Primitive Instance Segmentation with Local Primitive

Jingwei Huang 47 Dec 6, 2022
The source codes for ACL 2021 paper 'BoB: BERT Over BERT for Training Persona-based Dialogue Models from Limited Personalized Data'

BoB: BERT Over BERT for Training Persona-based Dialogue Models from Limited Personalized Data This repository provides the implementation details for

null 124 Dec 27, 2022
[NeurIPS 2021] Deceive D: Adaptive Pseudo Augmentation for GAN Training with Limited Data

Deceive D: Adaptive Pseudo Augmentation for GAN Training with Limited Data (NeurIPS 2021) This repository provides the official PyTorch implementation

Liming Jiang 155 Nov 30, 2021
Official code for the paper: Deep Graph Matching under Quadratic Constraint (CVPR 2021)

QC-DGM This is the official PyTorch implementation and models for our CVPR 2021 paper: Deep Graph Matching under Quadratic Constraint. It also contain

Quankai Gao 55 Nov 14, 2022
This is the repository for the NeurIPS-21 paper [Contrastive Graph Poisson Networks: Semi-Supervised Learning with Extremely Limited Labels].

CGPN This is the repository for the NeurIPS-21 paper [Contrastive Graph Poisson Networks: Semi-Supervised Learning with Extremely Limited Labels]. Req

null 10 Sep 12, 2022
Minimal PyTorch implementation of Generative Latent Optimization from the paper "Optimizing the Latent Space of Generative Networks"

Minimal PyTorch implementation of Generative Latent Optimization This is a reimplementation of the paper Piotr Bojanowski, Armand Joulin, David Lopez-

Thomas Neumann 117 Nov 27, 2022
(under submission) Bayesian Integration of a Generative Prior for Image Restoration

BIGPrior: Towards Decoupling Learned Prior Hallucination and Data Fidelity in Image Restoration Authors: Majed El Helou, and Sabine Süsstrunk {Note: p

Majed El Helou 22 Dec 17, 2022
StudioGAN is a Pytorch library providing implementations of representative Generative Adversarial Networks (GANs) for conditional/unconditional image generation.

StudioGAN is a Pytorch library providing implementations of representative Generative Adversarial Networks (GANs) for conditional/unconditional image generation.

null 3k Jan 8, 2023
NR-GAN: Noise Robust Generative Adversarial Networks

NR-GAN: Noise Robust Generative Adversarial Networks (CVPR 2020) This repository provides PyTorch implementation for noise robust GAN (NR-GAN). NR-GAN

Takuhiro Kaneko 59 Dec 11, 2022
HiFi-GAN: Generative Adversarial Networks for Efficient and High Fidelity Speech Synthesis

HiFi-GAN: Generative Adversarial Networks for Efficient and High Fidelity Speech Synthesis Jungil Kong, Jaehyeon Kim, Jaekyoung Bae In our paper, we p

Rishikesh (ऋषिकेश) 31 Dec 8, 2022
Generating Anime Images by Implementing Deep Convolutional Generative Adversarial Networks paper

AnimeGAN - Deep Convolutional Generative Adverserial Network PyTorch implementation of DCGAN introduced in the paper: Unsupervised Representation Lear

Rohit Kukreja 23 Jul 21, 2022
π-GAN: Periodic Implicit Generative Adversarial Networks for 3D-Aware Image Synthesis

π-GAN: Periodic Implicit Generative Adversarial Networks for 3D-Aware Image Synthesis Project Page | Paper | Data Eric Ryan Chan*, Marco Monteiro*, Pe

null 375 Dec 31, 2022
Unofficial implementation of Alias-Free Generative Adversarial Networks. (https://arxiv.org/abs/2106.12423) in PyTorch

alias-free-gan-pytorch Unofficial implementation of Alias-Free Generative Adversarial Networks. (https://arxiv.org/abs/2106.12423) This implementation

Kim Seonghyeon 502 Jan 3, 2023
PyTorch implementations of Generative Adversarial Networks.

This repository has gone stale as I unfortunately do not have the time to maintain it anymore. If you would like to continue the development of it as

Erik Linder-Norén 13.4k Jan 8, 2023
Image Deblurring using Generative Adversarial Networks

DeblurGAN arXiv Paper Version Pytorch implementation of the paper DeblurGAN: Blind Motion Deblurring Using Conditional Adversarial Networks. Our netwo

Orest Kupyn 2.2k Jan 1, 2023
Code for the paper "TadGAN: Time Series Anomaly Detection Using Generative Adversarial Networks"

TadGAN: Time Series Anomaly Detection Using Generative Adversarial Networks This is a Python3 / Pytorch implementation of TadGAN paper. The associated

Arun 92 Dec 3, 2022
Partial implementation of ODE-GAN technique from the paper Training Generative Adversarial Networks by Solving Ordinary Differential Equations

ODE GAN (Prototype) in PyTorch Partial implementation of ODE-GAN technique from the paper Training Generative Adversarial Networks by Solving Ordinary

Somshubra Majumdar 15 Feb 10, 2022