{"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/retrieval-based-spatially-adaptive","title":"Retrieval-based Spatially Adaptive Normalization for Semantic Image Synthesis","arxiv_id":"2204.02854","date":"2022-04-06","proceeding":"CVPR 2022 1","authors":["Yupeng Shi","Xiao Liu","Yuxiang Wei","Zhongqin Wu","WangMeng Zuo"],"abstract":"Semantic image synthesis is a challenging task with many practical applications. Albeit remarkable progress has been made in semantic image synthesis with spatially-adaptive normalization and existing methods normalize the feature activations under the coarse-level guidance (e.g., semantic class). However, different parts of a semantic object (e.g., wheel and window of car) are quite different in structures and textures, making blurry synthesis results usually inevitable due to the missing of fine-grained guidance. In this paper, we propose a novel normalization module, termed as REtrieval-based Spatially AdaptIve normaLization (RESAIL), for introducing pixel level fine-grained guidance to the normalization architecture. Specifically, we first present a retrieval paradigm by finding a content patch of the same semantic class from training set with the most similar shape to each test semantic mask. Then, RESAIL is presented to use the retrieved patch for guiding the feature normalization of corresponding region, and can provide pixel level fine-grained guidance, thereby greatly mitigating blurry synthesis results. Moreover, distorted ground-truth images are also utilized as alternatives of retrieval-based guidance for feature normalization, further benefiting model training and improving visual quality of generated images. Experiments on several challenging datasets show that our RESAIL performs favorably against state-of-the-arts in terms of quantitative metrics, visual quality, and subjective evaluation. The source code and pre-trained models will be publicly available.","url_abs":"https://arxiv.org/abs/2204.02854v1","url_pdf":"https://arxiv.org/pdf/2204.02854v1.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":"retrieval-based-spatially-adaptive","repo_url":"https://github.com/shi-yupeng/resail-for-sis","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"retrieval","task_name":"Retrieval"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2204.02854","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2204.02854"}},"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/shi-yupeng/resail-for-sis","reach":null}],"summary":{"ran":2,"unverified":3},"by_repo_kind":{"official":{"samples":5,"ran":2,"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":5,"samples":[{"code_sha256_prefix":"4f7ae2ede535f9fe","entry":"SyncMaster","repo":"shi-yupeng/resail-for-sis","repo_kind":"official","path":"models/networks/normalization.py","file_url":"https://github.com/shi-yupeng/resail-for-sis/blob/HEAD/models/networks/normalization.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4f7ae2ede535f9fe"}},{"code_sha256_prefix":"85ca13666fb5fe8f","entry":"_SynchronizedBatchNorm","repo":"shi-yupeng/resail-for-sis","repo_kind":"official","path":"models/networks/normalization.py","file_url":"https://github.com/shi-yupeng/resail-for-sis/blob/HEAD/models/networks/normalization.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"85ca13666fb5fe8f"}},{"code_sha256_prefix":"64c6c1d58eeac707","entry":"ACE","repo":"shi-yupeng/resail-for-sis","repo_kind":"official","path":"models/networks/normalization.py","file_url":"https://github.com/shi-yupeng/resail-for-sis/blob/HEAD/models/networks/normalization.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"64c6c1d58eeac707"}},{"code_sha256_prefix":"2b7b6bae0e4dd550","entry":"SPADE","repo":"shi-yupeng/resail-for-sis","repo_kind":"official","path":"models/networks/normalization.py","file_url":"https://github.com/shi-yupeng/resail-for-sis/blob/HEAD/models/networks/normalization.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2b7b6bae0e4dd550"}},{"code_sha256_prefix":"eb7e3705a0a2551f","entry":"SynchronizedBatchNorm2d","repo":"shi-yupeng/resail-for-sis","repo_kind":"official","path":"models/networks/normalization.py","file_url":"https://github.com/shi-yupeng/resail-for-sis/blob/HEAD/models/networks/normalization.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"eb7e3705a0a2551f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}