Skip to content

A new Tensorflow implementation of the Inception Score metric for the evaluation of generative models, along with a numpy interface

License

Notifications You must be signed in to change notification settings

nttuan8/Inception-Score

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 

Repository files navigation

Inception Score (compatible with Tensorflow 1.6+)

While the canonical OpenAI implementation of "Inception Score" for the evaluation of generative models is no longer compatible with new releases of Tensorflow, a new implementation of it is provided. Also, a bug raised in openai/improved-gan#29 is fixed.

Dependencies

  • numpy and tensorflow-gpu

Features

  • Fast, easy-to-use and memory-efficient, written in a way that is similar to the original implementation
  • No prior knowledge about Tensorflow is necessary to use this code
  • Makes use of TFGAN
  • Downloads InceptionV1 automatically
  • Compatible with both Python 2 and Python 3

Usage

  • Call get_inception_score(images, splits=10), where images is a numpy array with values ranging from 0 to 255 and shape in the form [N, 3, HEIGHT, WIDTH] where N, HEIGHT and WIDTH can be arbitrary. dtype of the images is recommended to be np.uint8 to save CPU memory.
  • A smaller BATCH_SIZE reduces GPU memory usage, but at the cost of a slight slowdown.
  • If you want to compute a general "Classifier Score" with probabilities preds from another classifier, call preds2score(preds, splits=10). preds can be a numpy array of arbitrary shape [N, num_classes].

Links

About

A new Tensorflow implementation of the Inception Score metric for the evaluation of generative models, along with a numpy interface

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%