{"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/region-aware-adaptive-instance-normalization","title":"Region-aware Adaptive Instance Normalization for Image Harmonization","arxiv_id":"2106.02853","date":"2021-06-05","proceeding":"CVPR 2021 1","authors":["Jun Ling","Han Xue","Li Song","Rong Xie","Xiao Gu"],"abstract":"Image composition plays a common but important role in photo editing. To acquire photo-realistic composite images, one must adjust the appearance and visual style of the foreground to be compatible with the background. Existing deep learning methods for harmonizing composite images directly learn an image mapping network from the composite to the real one, without explicit exploration on visual style consistency between the background and the foreground images. To ensure the visual style consistency between the foreground and the background, in this paper, we treat image harmonization as a style transfer problem. In particular, we propose a simple yet effective Region-aware Adaptive Instance Normalization (RAIN) module, which explicitly formulates the visual style from the background and adaptively applies them to the foreground. With our settings, our RAIN module can be used as a drop-in module for existing image harmonization networks and is able to bring significant improvements. Extensive experiments on the existing image harmonization benchmark datasets show the superior capability of the proposed method. Code is available at {https://github.com/junleen/RainNet}.","url_abs":"https://arxiv.org/abs/2106.02853v1","url_pdf":"https://arxiv.org/pdf/2106.02853v1.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":"region-aware-adaptive-instance-normalization","repo_url":"https://github.com/junleen/RainNet","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"image-harmonization","task_name":"Image Harmonization"},{"task_slug":"style-transfer","task_name":"Style Transfer"}],"methods":[{"method_slug":"adaptive-instance-normalization","method_name":"Adaptive Instance Normalization"},{"method_slug":"instance-normalization","method_name":"Instance Normalization"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/image-harmonization-on-hadobe5k-1024-times","task":"Image Harmonization","dataset":"HAdobe5k(1024$\\times$1024)","model":"RainNet","rank_in_archive_order":4,"of":7,"metrics":{"MSE":"42.56","PSNR":"36.61","SSIM":"0.9844","fMSE":"305.17"},"uses_additional_data":false},{"leaderboard":"/sota/image-harmonization-on-iharmony4","task":"Image Harmonization","dataset":"iHarmony4","model":"RainNet","rank_in_archive_order":15,"of":16,"metrics":{"MSE":"40.29","PSNR":"36.12","fMSE":"469.60"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2106.02853","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2106.02853"}},"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":"deterministic:regex_extraction","url":"https://github.com/junleen/RainNet","reach":null}],"summary":{"ran":1},"by_repo_kind":{"official":{"samples":1,"ran":1,"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":"ba16261c100c88b0","entry":"RAIN","repo":"junleen/RainNet","repo_kind":"official","path":"models/normalize.py","file_url":"https://github.com/junleen/RainNet/blob/HEAD/models/normalize.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ba16261c100c88b0"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}