{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/on-buggy-resizing-libraries-and-surprising","title":"On Aliased Resizing and Surprising Subtleties in GAN Evaluation","arxiv_id":"2104.11222","date":"2021-04-22","proceeding":"CVPR 2022 1","authors":["Gaurav Parmar","Richard Zhang","Jun-Yan Zhu"],"abstract":"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.","url_abs":"https://arxiv.org/abs/2104.11222v3","url_pdf":"https://arxiv.org/pdf/2104.11222v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"on-buggy-resizing-libraries-and-surprising","repo_url":"https://github.com/GaParmar/clean-fid","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"on-buggy-resizing-libraries-and-surprising","repo_url":"https://github.com/SUPERSHOPxyz/stylegan3-gradient","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"on-buggy-resizing-libraries-and-surprising","repo_url":"https://github.com/clovaai/stargan-v2","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}}],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2104.11222","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2104.11222"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/GaParmar/clean-fid","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/clovaai/stargan-v2","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/SUPERSHOPxyz/stylegan3-gradient","reach":{"status":"ok","spdx":"NOASSERTION"}}],"summary":{"ran_violates":1,"ran_draft_wrong":1,"ran_fixture":1},"by_repo_kind":{"official":{"samples":3,"ran":3,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"cab0d4dcf7cc64f1","entry":"frechet_distance","repo":"GaParmar/clean-fid","repo_kind":"official","path":"cleanfid/fid.py","file_url":"https://github.com/GaParmar/clean-fid/blob/HEAD/cleanfid/fid.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cab0d4dcf7cc64f1"}},{"code_sha256_prefix":"b0b417eecb2cb428","entry":"get_batch_features","repo":"GaParmar/clean-fid","repo_kind":"official","path":"cleanfid/fid.py","file_url":"https://github.com/GaParmar/clean-fid/blob/HEAD/cleanfid/fid.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b0b417eecb2cb428"}},{"code_sha256_prefix":"fe73a842636d97b7","entry":"kernel_distance","repo":"GaParmar/clean-fid","repo_kind":"official","path":"cleanfid/fid.py","file_url":"https://github.com/GaParmar/clean-fid/blob/HEAD/cleanfid/fid.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fe73a842636d97b7"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}