B1ueber2y / CAFD

Class-Aware Frechet Distance (CAFD) for GANs in Tensorflow. Source code for "An Improved Evaluation Framework for Generative Adversarial Networks".

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CAFD

Class-Aware Frechet Distance (CAFD) for GANs in Tensorflow. Source code for "An Improved Evaluation Framework for Generative Adversarial Networks" [pdf].

Dependencies

  • python >= 3.5.0
  • Tensorflow >= 1.4.0

Download

You can manually download the domain-specific encoder and assign its path in cafd.py.

Precalculated features for CAFD calculation are made available.

Usage

Different GAN models should be compared under the same encoder.

To use CAFD, you can download the .pb model and assign its paths in cafd.py. Then, you can use

python cafd.py input1 input2

The input can be the path of either a folder containing generated images or a precalculated .csv features.

You may use the precalculated features to test your model (take mnist for example):

python cafd.py mnist.csv path-to-your-folder

The folder contains the images generated by your GAN model.

Experiments

  • The folder celebA contains the code for Fig. 3 in the paper.

  • The folder mnist contains the code for Fig. 5 in the paper.

Citation

If you find this code useful in your research, please cite:

@article{cafd2018,
  title        = {An Improved Evaluation Framework for Generative Adversarial Networks},
  author       = {Liu, Shaohui and Wei, Yi and Lu, Jiwen and Zhou, Jie},
  Journal      = {arXiv preprint arXiv:1803.07474},
  year         = {2018},
}

The first two authors share equal contributions.

About

Class-Aware Frechet Distance (CAFD) for GANs in Tensorflow. Source code for "An Improved Evaluation Framework for Generative Adversarial Networks".


Languages

Language:Python 97.2%Language:R 2.8%