Fréchet inception distance

Also known as: FID score

On this page 6

Fréchet inception distance (FID) is a metric that measures how similar a set of generated images is to a set of real images by comparing the mean and covariance of their feature embeddings from a pretrained Inception-v3 network. In model evaluation for generative artificial intelligence, it is the most widely reported single number for image quality and diversity of GANs, diffusion models and other image generators, and a lower score means closer distributions.

The metric, often called the FID score, was introduced in 2017 as an improvement over the Inception score because it compares generated images against real data rather than judging them in isolation. It captures both fidelity (whether samples look realistic) and diversity (whether they cover the variety of the real data), but it compresses both into one value and depends heavily on implementation details.

How the Fréchet inception distance is computed

FID is computed in three steps: extract features, fit a Gaussian to each set and measure the distance between the two Gaussians. Each image is resized to the network input size and passed through Inception-v3, and the 2048-dimensional activations of the final pooling layer serve as its feature vector.

For the real and generated sets, the procedure estimates a mean vector and a covariance matrix. The score is the Fréchet distance, also known as the 2-Wasserstein distance, between the two multivariate Gaussians: FID = ||mu_r - mu_g||^2 + Tr(S_r + S_g - 2 (S_r S_g)^(1/2)). The first term measures how far the centers of the distributions lie apart; the trace term measures differences in spread and correlation.

The table below summarizes the elements of the calculation and what each one contributes.

ElementWhat it representsEffect on the score
Feature extractorInception-v3 pool layer, 2048 dimensionsDefines what similarity means
Mean vectorAverage feature of each image setShift in content or style raises FID
Covariance matrixVariation and correlation of featuresLow diversity or mode collapse raises FID
Matrix square rootCouples both covariancesNumerically sensitive for small samples
Sample sizeNumber of images per setSmaller sets bias FID upward
Elements of the FID calculation

Interpreting FID values

FID has no fixed scale or universal threshold; a value is meaningful only when compared with other values computed on the same dataset, resolution, sample size and implementation. A score of zero would mean identical feature statistics, which even two independent samples of real images do not reach.

The following ranges are rough orientation for common benchmarks such as unconditional generation on standard face or object datasets. They shift considerably with the dataset, and values from different papers are often not directly comparable.

FID rangeTypical interpretationUsual situation
Below about 5Very close to real data statisticsState-of-the-art models on mature benchmarks
About 5 to 20Strong quality with visible gapsCompetitive research models
About 20 to 50Noticeable artifacts or reduced diversityEarly training or smaller models
Above about 50Clearly different from real imagesBroken training, mode collapse, wrong preprocessing
Approximate meaning of FID ranges on common image benchmarks

Because the estimate is biased by sample size, published results usually use 50,000 generated images compared against the full training set or a fixed reference set. Reporting the number of samples and the reference statistics is essential for reproducibility.

FID compared with other generative metrics

FID belongs to a family of distribution-level metrics for generative models, and each member trades off different properties. The Inception score rewards confident and varied class predictions but ignores real data entirely, while kernel inception distance (KID) uses an unbiased estimator that behaves better with small samples.

MetricWhat it comparesStrengthWeakness
FIDGaussian fit of real and generated featuresStandard, captures quality and diversityBiased for small samples, Gaussian assumption
Inception scoreClass predictions of generated images onlyNo reference set neededIgnores real data, ImageNet-centric
KIDKernel statistics of featuresUnbiased, stable on small setsLess widely reported
Precision and recallManifold overlap of feature setsSeparates fidelity from diversitySensitive to neighborhood size
CLIPScoreImage and text embedding similarityMeasures prompt alignmentSays little about realism
FD with other encodersFréchet distance on DINOv2 or CLIP featuresBetter match with human judgmentNot comparable with classic FID
FID and related metrics for image generation

Text-to-image systems are therefore usually evaluated with several complementary metrics and with human evaluation, because a low FID does not guarantee that images follow the prompt.

Pitfalls and limitations

FID is highly sensitive to implementation details that have nothing to do with model quality. Different image resizing filters, JPEG compression, color handling and Inception weights can change the score by several points, which is often larger than the gap between competing models.

PitfallConsequenceMitigation
Inconsistent resizingScores differ across librariesUse one reference implementation for all models
Too few samplesInflated, noisy scoreUse a fixed, large sample count
Different reference setResults not comparablePublish the reference statistics used
Training set as reference onlyMemorization looks excellentCheck nearest neighbors and held-out data
Domain far from ImageNetFeatures miss relevant detailsAdd domain-specific encoders or human review
Common FID pitfalls and how to avoid them
  • Gaussian assumption: real feature distributions are not Gaussian, so two different distributions can share means and covariances.
  • ImageNet bias: Inception features emphasize object categories and may ignore texture, faces or medical details that matter in a given domain.
  • Single number: FID does not reveal whether a poor score comes from low fidelity or from low diversity.
  • Weak human alignment: at high quality levels, improvements in FID often stop matching what people perceive as better images.

Explained without jargon

Imagine two large piles of photos. One pile is real. The other was made by an AI model. FID asks a simple question: do the two piles look alike overall?

A trained image network describes every photo with a list of numbers. FID then compares the average and the variety of those numbers in both piles. A small number means the piles are similar in content and variety. A large number means the fake pile looks different or too repetitive. It judges the piles as a whole, not each single picture.

A typical use case

A machine learning team is training a diffusion model that generates product photos at 256 by 256 pixels for an online catalog. Every 10,000 training steps, the pipeline generates 50,000 images and computes FID against precomputed statistics of 200,000 real product photos, always with the same resizing code and Inception weights.

Over training, FID falls from about 60 to about 9 and then flattens. When the team tests a faster sampler with fewer steps, FID rises only slightly, so the faster sampler is adopted. A later experiment produces a lower FID but visibly repetitive backgrounds, which the team detects through precision and recall metrics and a short human review.

The outcome is a reproducible checkpoint selection process: FID serves as the main tracking metric, while complementary metrics and human checks guard against the cases that a single distribution score cannot reveal.