On Buggy Resizing Libraries and Surprising Subtleties in FID Calculation

by   Gaurav Parmar, et al.

We investigate the sensitivity of the Fréchet Inception Distance (FID) score to inconsistent and often incorrect implementations across different image processing libraries. FID score is widely used to evaluate generative models, but each FID implementation uses a different low-level image processing process. Image resizing functions in commonly-used deep learning libraries often introduce aliasing artifacts. We observe that numerous subtle choices need to be made for FID calculation and a lack of consistencies in these choices can lead to vastly different FID scores. In particular, we show that the following choices are significant: (1) selecting what image resizing library to use, (2) choosing what interpolation kernel to use, (3) what encoding to use when representing images. We additionally outline numerous common pitfalls that should be avoided and provide recommendations for computing the FID score accurately. We provide an easy-to-use optimized implementation of our proposed recommendations in the accompanying code.


page 3

page 4

page 5


MILJS : Brand New JavaScript Libraries for Matrix Calculation and Machine Learning

MILJS is a collection of state-of-the-art, platform-independent, scalabl...

A Hitchhiker's Guide to Structural Similarity

The Structural Similarity (SSIM) Index is a very widely used image/video...

MIPROT: A Medical Image Processing Toolbox for MATLAB

This paper presents a Matlab toolbox to perform basic image processing a...

Functional Design of Computation Graph

Representing the control flow of a computer program as a computation gra...

Implementation of a Practical Distributed Calculation System with Browsers and JavaScript, and Application to Distributed Deep Learning

Deep learning can achieve outstanding results in various fields. However...

The Behavioral Diversity of Java JSON Libraries

JSON is a popular file and data format that is precisely specified by th...

Deep Generative Models for Library Augmentation in Multiple Endmember Spectral Mixture Analysis

Multiple Endmember Spectral Mixture Analysis (MESMA) is one of the leadi...

Code Repositories


StarGAN v2 - Official PyTorch Implementation (CVPR 2020)

view repo


PyTorch - FID calculation with proper image resizing and quantization steps

view repo