{"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/masked-and-adaptive-transformer-for-exemplar","title":"Masked and Adaptive Transformer for Exemplar Based Image Translation","arxiv_id":"2303.17123","date":"2023-03-30","proceeding":"CVPR 2023 1","authors":["Chang Jiang","Fei Gao","Biao Ma","YuHao Lin","Nannan Wang","Gang Xu"],"abstract":"We present a novel framework for exemplar based image translation. Recent advanced methods for this task mainly focus on establishing cross-domain semantic correspondence, which sequentially dominates image generation in the manner of local style control. Unfortunately, cross-domain semantic matching is challenging; and matching errors ultimately degrade the quality of generated images. To overcome this challenge, we improve the accuracy of matching on the one hand, and diminish the role of matching in image generation on the other hand. To achieve the former, we propose a masked and adaptive transformer (MAT) for learning accurate cross-domain correspondence, and executing context-aware feature augmentation. To achieve the latter, we use source features of the input and global style codes of the exemplar, as supplementary information, for decoding an image. Besides, we devise a novel contrastive style learning method, for acquire quality-discriminative style representations, which in turn benefit high-quality image generation. Experimental results show that our method, dubbed MATEBIT, performs considerably better than state-of-the-art methods, in diverse image translation tasks. The codes are available at \\url{https://github.com/AiArt-HDU/MATEBIT}.","url_abs":"https://arxiv.org/abs/2303.17123v1","url_pdf":"https://arxiv.org/pdf/2303.17123v1.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":"masked-and-adaptive-transformer-for-exemplar","repo_url":"https://github.com/aiart-hdu/matebit","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"semantic-correspondence","task_name":"Semantic correspondence"},{"task_slug":"translation","task_name":"Translation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2303.17123","atlas_url":"https://app.syntology.ai/?focus=2303.17123","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2303.17123"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/aiart-hdu/matebit","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/AiArt-HDU/MATEBIT","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":7,"ran_draft_wrong":1,"ran_fixture":1,"ran_honours":1,"unverified":1},"by_repo_kind":{"official":{"samples":11,"ran":10,"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":"46185d38c66d915f","entry":"AdaBlock","repo":"AiArt-HDU/MATEBIT","repo_kind":"official","path":"models/networks/dynast_transformer.py","file_url":"https://github.com/AiArt-HDU/MATEBIT/blob/HEAD/models/networks/dynast_transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"46185d38c66d915f"}},{"code_sha256_prefix":"a364013be1afea2e","entry":"CoordAtt","repo":"AiArt-HDU/MATEBIT","repo_kind":"official","path":"models/networks/dynast_transformer.py","file_url":"https://github.com/AiArt-HDU/MATEBIT/blob/HEAD/models/networks/dynast_transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a364013be1afea2e"}},{"code_sha256_prefix":"91d27ae48f10c634","entry":"LayerNorm","repo":"AiArt-HDU/MATEBIT","repo_kind":"official","path":"models/networks/dynast_transformer.py","file_url":"https://github.com/AiArt-HDU/MATEBIT/blob/HEAD/models/networks/dynast_transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"91d27ae48f10c634"}},{"code_sha256_prefix":"cabca479cad0531f","entry":"PositionalNorm2d","repo":"AiArt-HDU/MATEBIT","repo_kind":"official","path":"models/networks/dynast_transformer.py","file_url":"https://github.com/AiArt-HDU/MATEBIT/blob/HEAD/models/networks/dynast_transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cabca479cad0531f"}},{"code_sha256_prefix":"93da98f4f6845b01","entry":"SPADE","repo":"AiArt-HDU/MATEBIT","repo_kind":"official","path":"models/networks/dynast_transformer.py","file_url":"https://github.com/AiArt-HDU/MATEBIT/blob/HEAD/models/networks/dynast_transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"93da98f4f6845b01"}},{"code_sha256_prefix":"70bbb1a234bbec73","entry":"SignWithSigmoidGrad","repo":"AiArt-HDU/MATEBIT","repo_kind":"official","path":"models/networks/dynast_transformer.py","file_url":"https://github.com/AiArt-HDU/MATEBIT/blob/HEAD/models/networks/dynast_transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"70bbb1a234bbec73"}},{"code_sha256_prefix":"fd6117bfc579efa5","entry":"dynamic_attention","repo":"AiArt-HDU/MATEBIT","repo_kind":"official","path":"models/networks/dynast_transformer.py","file_url":"https://github.com/AiArt-HDU/MATEBIT/blob/HEAD/models/networks/dynast_transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fd6117bfc579efa5"}},{"code_sha256_prefix":"2ab25c1da9832507","entry":"feature_normalize","repo":"AiArt-HDU/MATEBIT","repo_kind":"official","path":"models/networks/dynast_transformer.py","file_url":"https://github.com/AiArt-HDU/MATEBIT/blob/HEAD/models/networks/dynast_transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2ab25c1da9832507"}},{"code_sha256_prefix":"7e179a91bb50201f","entry":"h_sigmoid","repo":"AiArt-HDU/MATEBIT","repo_kind":"official","path":"models/networks/dynast_transformer.py","file_url":"https://github.com/AiArt-HDU/MATEBIT/blob/HEAD/models/networks/dynast_transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7e179a91bb50201f"}},{"code_sha256_prefix":"5e356c9d5f8f95df","entry":"h_swish","repo":"AiArt-HDU/MATEBIT","repo_kind":"official","path":"models/networks/dynast_transformer.py","file_url":"https://github.com/AiArt-HDU/MATEBIT/blob/HEAD/models/networks/dynast_transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5e356c9d5f8f95df"}},{"code_sha256_prefix":"77eb59f07e359be1","entry":"DynamicTransformerBlock","repo":"AiArt-HDU/MATEBIT","repo_kind":"official","path":"models/networks/dynast_transformer.py","file_url":"https://github.com/AiArt-HDU/MATEBIT/blob/HEAD/models/networks/dynast_transformer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"77eb59f07e359be1"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}