Skip to content

A new Tensorflow implementation of the Fréchet Inception Distance between two image distributions, along with a numpy interface

Notifications You must be signed in to change notification settings

Ksky001/Frechet-Inception-Distance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

Fréchet Inception Distance

A new Tensorflow implementation of the "Fréchet Inception Distance" (FID) between two image distributions, along with a numpy interface. The FID can be used to evaluate generative models by calculating the FID between real and fake data distributions (lower is better).

Prequisites

  • numpy and tensorflow-gpu

Features

  • Fast and memory-efficient
  • No prior knowledge about Tensorflow is necessary to use this code
  • Makes use of TFGAN
  • Downloads InceptionV1 automatically
  • Compatibility with both Python2 and Python3

Usage

  • Call get_fid(images1, images2), where images1, images2 are numpy arrays 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.

Links

About

A new Tensorflow implementation of the Fréchet Inception Distance between two image distributions, along with a numpy interface

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%