All Projects → clovaai → Generative Evaluation Prdc

clovaai / Generative Evaluation Prdc

Licence: mit
Code base for the precision, recall, density, and coverage metrics for generative models. ICML 2020.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Generative Evaluation Prdc

py-msa-kdenlive
Python script to load a Kdenlive (OSS NLE video editor) project file, and conform the edit on video or numpy arrays.
Stars: ✭ 25 (-78.63%)
Mutual labels:  generative-adversarial-network, generative-model
Alae
[CVPR2020] Adversarial Latent Autoencoders
Stars: ✭ 3,178 (+2616.24%)
Mutual labels:  generative-adversarial-network, generative-model
TriangleGAN
TriangleGAN, ACM MM 2019.
Stars: ✭ 28 (-76.07%)
Mutual labels:  generative-adversarial-network, generative-model
GraphCNN-GAN
Graph-convolutional GAN for point cloud generation. Code from ICLR 2019 paper Learning Localized Generative Models for 3D Point Clouds via Graph Convolution
Stars: ✭ 50 (-57.26%)
Mutual labels:  generative-adversarial-network, generative-model
Conditional Animegan
Conditional GAN for Anime face generation.
Stars: ✭ 70 (-40.17%)
Mutual labels:  generative-adversarial-network, generative-model
favorite-research-papers
Listing my favorite research papers 📝 from different fields as I read them.
Stars: ✭ 12 (-89.74%)
Mutual labels:  generative-adversarial-network, generative-model
Generative models tutorial with demo
Generative Models Tutorial with Demo: Bayesian Classifier Sampling, Variational Auto Encoder (VAE), Generative Adversial Networks (GANs), Popular GANs Architectures, Auto-Regressive Models, Important Generative Model Papers, Courses, etc..
Stars: ✭ 276 (+135.9%)
Mutual labels:  generative-adversarial-network, generative-model
MMD-GAN
Improving MMD-GAN training with repulsive loss function
Stars: ✭ 82 (-29.91%)
Mutual labels:  generative-adversarial-network, generative-model
Mnist inception score
Training a MNIST classifier, and use it to compute inception score (ICP)
Stars: ✭ 25 (-78.63%)
Mutual labels:  generative-adversarial-network, generative-model
Cadgan
ICML 2019. Turn a pre-trained GAN model into a content-addressable model without retraining.
Stars: ✭ 19 (-83.76%)
Mutual labels:  generative-adversarial-network, generative-model
simplegan
Tensorflow-based framework to ease training of generative models
Stars: ✭ 19 (-83.76%)
Mutual labels:  generative-adversarial-network, generative-model
Lggan
[CVPR 2020] Local Class-Specific and Global Image-Level Generative Adversarial Networks for Semantic-Guided Scene Generation
Stars: ✭ 97 (-17.09%)
Mutual labels:  generative-adversarial-network, generative-model
pytorch-GAN
My pytorch implementation for GAN
Stars: ✭ 12 (-89.74%)
Mutual labels:  generative-adversarial-network, generative-model
pytorch-CycleGAN
Pytorch implementation of CycleGAN.
Stars: ✭ 39 (-66.67%)
Mutual labels:  generative-adversarial-network, generative-model
coursera-gan-specialization
Programming assignments and quizzes from all courses within the GANs specialization offered by deeplearning.ai
Stars: ✭ 277 (+136.75%)
Mutual labels:  generative-adversarial-network, generative-model
celeba-gan-pytorch
Generative Adversarial Networks in PyTorch
Stars: ✭ 35 (-70.09%)
Mutual labels:  generative-adversarial-network, generative-model
Sgan
Stacked Generative Adversarial Networks
Stars: ✭ 240 (+105.13%)
Mutual labels:  generative-adversarial-network, generative-model
precision-recall-distributions
Assessing Generative Models via Precision and Recall (official repository)
Stars: ✭ 80 (-31.62%)
Mutual labels:  evaluation, generative-adversarial-network
Seqgan
A simplified PyTorch implementation of "SeqGAN: Sequence Generative Adversarial Nets with Policy Gradient." (Yu, Lantao, et al.)
Stars: ✭ 502 (+329.06%)
Mutual labels:  generative-adversarial-network, generative-model
Markov Chain Gan
Code for "Generative Adversarial Training for Markov Chains" (ICLR 2017 Workshop)
Stars: ✭ 76 (-35.04%)
Mutual labels:  generative-adversarial-network, generative-model

PyPI version PyPI download month PyPI license

Reliable Fidelity and Diversity Metrics for Generative Models (ICML 2020)

Paper: Reliable Fidelity and Diversity Metrics for Generative Models

Muhammad Ferjad Naeem 1,3*, Seong Joon Oh2*, Yunjey Choi1, Youngjung Uh1, Jaejun Yoo1,4

Work done at Clova AI Research

* Equal contribution 1 Clova AI Research, NAVER Corp. 2 Clova AI Research, LINE Plus Corp. 3 Technische Universität München 4 EPFL

Devising indicative evaluation metrics for the image generation task remains an open problem. The most widely used metric for measuring the similarity between real and generated images has been the Fréchet Inception Distance (FID) score. Because it does not differentiate the fidelity and diversity aspects of the generated images, recent papers have introduced variants of precision and recall metrics to diagnose those properties separately. In this paper, we show that even the latest version of the precision and recall (Kynkäänniemi et al., 2019) metrics are not reliable yet. For example, they fail to detect the match between two identical distributions, they are not robust against outliers, and the evaluation hyperparameters are selected arbitrarily. We propose density and coverage metrics that solve the above issues. We analytically and experimentally show that density and coverage provide more interpretable and reliable signals for practitioners than the existing metrics.

VIDEO

Updates

  • 1 June 2020: Paper accepted at ICML 2020.

1. Background

Precision and recall metrics

Precision and recall are defined below:

where the manifold is the defined as

is the ball around the point x with radius r.

is the distance to the kth-nearest neighbour.

Density and coverage metrics

Density and coverage are defined below:

Why are DC better than PR?

Precision versus density.

Precision versus Density. Because of the real outlier sample, the manifold is overestimated. Generating many fake samples around the real outlier is enough to increase the precision measure. The problem of overestimating precision (100%) is resolved using the density estimate (60%).

Recall versus coverage.

Recall versus Coverage. The real and fake samples are identical across left and right. Since models often generate many unrealistic yet diverse samples, the fake manifold is often an overestimation of the true fake distribution. In the figure above, while the fake samples are generally far from the modes in real samples, the recall measure is rewarded by the fact that real samples are contained in the overestimated fake manifold.

2. Usage

Installation

pip3 install prdc

Example

Test 10000 real and fake samples form the standard normal distribution N(0,I) in 1000-dimensional Euclidean space. Set the nearest neighbour k=5. We compute precision, recall, density, and coverage estimates below.

import numpy as np
from prdc import compute_prdc


num_real_samples = num_fake_samples = 10000
feature_dim = 1000
nearest_k = 5
real_features = np.random.normal(loc=0.0, scale=1.0,
                                 size=[num_real_samples, feature_dim])

fake_features = np.random.normal(loc=0.0, scale=1.0,
                                 size=[num_fake_samples, feature_dim])

metrics = compute_prdc(real_features=real_features,
                       fake_features=fake_features,
                       nearest_k=nearest_k)

print(metrics)

Above test code will result in the following estimates (may fluctuate due to randomness).

{'precision': 0.4772,
 'recall': 0.4705,
 'density': 1.0555,
 'coverage': 0.9735}

3. Miscellaneous

References

Kynkäänniemi et al., 2019. Improved precision and recall metric for assessing generative models. Neurips 2019.

License

Copyright (c) 2020-present NAVER Corp.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Cite this work

@article{ferjad2020icml,
  title = {Reliable Fidelity and Diversity Metrics for Generative Models},
  author = {Naeem, Muhammad Ferjad and Oh, Seong Joon and Uh, Youngjung and Choi, Yunjey and Yoo, Jaejun},
  year = {2020},
  booktitle = {International Conference on Machine Learning},
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].