[Paper Review] On Aliased Resizing and Surprising Subtleties in GAN Evaluation
This paper identifies that aliased image resizing and JPEG compression—commonly used in GAN evaluation—introduce significant, unintended biases in metrics like Fréchet Inception Distance (FID), leading to inconsistent and misleading comparisons. The authors propose Clean-FID, a standardized implementation that adapts prefilter width to downsampling ratios and avoids lossy compression, demonstrating that these low-level preprocessing choices can artificially improve FID scores by up to 1.5 points, undermining fair model evaluation.
Metrics for evaluating generative models aim to measure the discrepancy between real and generated images. The often-used Frechet Inception Distance (FID) metric, for example, extracts "high-level" features using a deep network from the two sets. However, we find that the differences in "low-level" preprocessing, specifically image resizing and compression, can induce large variations and have unforeseen consequences. For instance, when resizing an image, e.g., with a bilinear or bicubic kernel, signal processing principles mandate adjusting prefilter width depending on the downsampling factor, to antialias to the appropriate bandwidth. However, commonly-used implementations use a fixed-width prefilter, resulting in aliasing artifacts. Such aliasing leads to corruptions in the feature extraction downstream. Next, lossy compression, such as JPEG, is commonly used to reduce the file size of an image. Although designed to minimally degrade the perceptual quality of an image, the operation also produces variations downstream. Furthermore, we show that if compression is used on real training images, FID can actually improve if the generated images are also subsequently compressed. This paper shows that choices in low-level image processing have been an underappreciated aspect of generative modeling. We identify and characterize variations in generative modeling development pipelines, provide recommendations based on signal processing principles, and release a reference implementation to facilitate future comparisons.
Motivation & Objective
- To investigate how low-level image processing steps—specifically resizing and compression—affect the reliability of GAN evaluation metrics like FID, KID, and IS.
- To identify that commonly used libraries (e.g., PyTorch, TensorFlow) apply fixed-width prefiltering during resizing, causing aliasing artifacts that corrupt downstream feature extraction.
- To demonstrate that JPEG compression of real images can artificially improve FID scores when generated images are also compressed, even if the model does not learn the compression artifacts.
- To propose a standardized, signal-processing-compliant evaluation pipeline to ensure fair and reproducible comparisons across GAN models.
- To release Clean-FID, a reference implementation that enforces correct antialiasing and avoids lossy compression in FID computation.
Proposed method
- Propose a signal-processing-compliant resizing method that dynamically adjusts the prefilter kernel width based on the downsampling factor, preventing aliasing.
- Implement Clean-FID as a library that enforces correct antialiasing in all resizing steps (data preprocessing, FID computation, and generated image resizing).
- Use standard image processing libraries (e.g., PIL) with adaptive filters for resizing, contrasting with fixed-width bilinear/bicubic filters in PyTorch and TensorFlow.
- Apply controlled JPEG compression at various quality levels to real and generated images to measure its impact on FID and KID scores.
- Compare FID scores across different model checkpoints and training protocols using both aliased and antialiased resizing to assess model selection bias.
- Pre-compute and release Inception feature statistics for common datasets (e.g., FFHQ, LSUN) to enable consistent evaluation using Clean-FID.
Experimental results
Research questions
- RQ1How do different image resizing implementations—especially those with fixed vs. adaptive prefilter widths—affect FID scores in GAN evaluation?
- RQ2To what extent does JPEG compression of real training images or generated images alter FID scores, and can this lead to artificial performance gains?
- RQ3Can the use of aliased resizing lead to different model selection outcomes when comparing checkpoints or methods?
- RQ4Does the failure of GANs to model low-level compression artifacts result in misleading FID improvements when both real and generated images are compressed?
- RQ5What is the impact of inconsistent preprocessing (e.g., compression, resizing) on the comparability of FID scores across published GAN models?
Key findings
- Aliased resizing using fixed-width prefiltering in PyTorch and TensorFlow introduces visible aliasing artifacts, especially at high downsampling ratios, which corrupt feature extraction and distort FID scores.
- Using an adaptive prefilter that scales with the downsampling factor reduces FID score discrepancies and leads to more reliable metric computation.
- When real training images are compressed with JPEG, FID scores can improve by up to 1.52 points if generated images are also compressed, even though the model does not learn the compression artifacts.
- On the LSUN Church dataset (collected as JPEG-75), a StyleGAN2 model achieved a best FID of 3.48 when generated images were compressed at quality 87, compared to 4.00 for PNG, indicating artificial metric gains from post-processing.
- Model selection can be significantly affected by resizing method: using aliased vs. antialiased resizing can lead to the selection of different model checkpoints as 'best'.
- The FID metric is highly sensitive to low-level image processing details, and inconsistent preprocessing renders comparisons across models invalid.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.