{"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/transeditor-transformer-based-dual-space-gan","title":"TransEditor: Transformer-Based Dual-Space GAN for Highly Controllable Facial Editing","arxiv_id":"2203.17266","date":"2022-03-31","proceeding":"CVPR 2022 1","authors":["Yanbo Xu","Yueqin Yin","Liming Jiang","Qianyi Wu","Chengyao Zheng","Chen Change Loy","Bo Dai","Wayne Wu"],"abstract":"Recent advances like StyleGAN have promoted the growth of controllable facial editing. To address its core challenge of attribute decoupling in a single latent space, attempts have been made to adopt dual-space GAN for better disentanglement of style and content representations. Nonetheless, these methods are still incompetent to obtain plausible editing results with high controllability, especially for complicated attributes. In this study, we highlight the importance of interaction in a dual-space GAN for more controllable editing. We propose TransEditor, a novel Transformer-based framework to enhance such interaction. Besides, we develop a new dual-space editing and inversion strategy to provide additional editing flexibility. Extensive experiments demonstrate the superiority of the proposed framework in image quality and editing capability, suggesting the effectiveness of TransEditor for highly controllable facial editing.","url_abs":"https://arxiv.org/abs/2203.17266v1","url_pdf":"https://arxiv.org/pdf/2203.17266v1.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":"transeditor-transformer-based-dual-space-gan","repo_url":"https://github.com/billyxyb/transeditor","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"attribute","task_name":"Attribute"},{"task_slug":"disentanglement","task_name":"Disentanglement"},{"task_slug":"facial-editing","task_name":"Facial Editing"}],"methods":[{"method_slug":"adaptive-instance-normalization","method_name":"Adaptive Instance Normalization"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"feedforward-network","method_name":"Feedforward Network"},{"method_slug":"r1-regularization","method_name":"R1 Regularization"},{"method_slug":"stylegan","method_name":"StyleGAN"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2203.17266","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2203.17266"}},"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/billyxyb/transeditor","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":2,"ran_fixture":1,"ran_honours":2,"ran_violates":1,"unverified":9},"by_repo_kind":{"official":{"samples":15,"ran":6,"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":"3651db4e5ae8d189","entry":"d_logistic_loss","repo":"billyxyb/transeditor","repo_kind":"official","path":"train_spatial_query.py","file_url":"https://github.com/billyxyb/transeditor/blob/HEAD/train_spatial_query.py","link_basis":"harvester_set","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":"3651db4e5ae8d189"}},{"code_sha256_prefix":"0693ac46c6c25e65","entry":"d_r1_loss","repo":"billyxyb/transeditor","repo_kind":"official","path":"train_spatial_query.py","file_url":"https://github.com/billyxyb/transeditor/blob/HEAD/train_spatial_query.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0693ac46c6c25e65"}},{"code_sha256_prefix":"dbb756dcd778f52f","entry":"data_sampler","repo":"billyxyb/transeditor","repo_kind":"official","path":"train_spatial_query.py","file_url":"https://github.com/billyxyb/transeditor/blob/HEAD/train_spatial_query.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"dbb756dcd778f52f"}},{"code_sha256_prefix":"ea6c82ed6a138df9","entry":"get_lr","repo":"billyxyb/transeditor","repo_kind":"official","path":"projector_optimization.py","file_url":"https://github.com/billyxyb/transeditor/blob/HEAD/projector_optimization.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ea6c82ed6a138df9"}},{"code_sha256_prefix":"0c45399f3741921e","entry":"lerp","repo":"billyxyb/transeditor","repo_kind":"official","path":"metrics/evaluate_query.py","file_url":"https://github.com/billyxyb/transeditor/blob/HEAD/metrics/evaluate_query.py","link_basis":"harvester_set","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":"0c45399f3741921e"}},{"code_sha256_prefix":"6f65e378a4313f87","entry":"make_kernel","repo":"billyxyb/transeditor","repo_kind":"official","path":"model_spatial_query.py","file_url":"https://github.com/billyxyb/transeditor/blob/HEAD/model_spatial_query.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6f65e378a4313f87"}},{"code_sha256_prefix":"1c866428bf6d7397","entry":"calculate_cos_score","repo":"billyxyb/transeditor","repo_kind":"official","path":"our_interfaceGAN/calculate_score.py","file_url":"https://github.com/billyxyb/transeditor/blob/HEAD/our_interfaceGAN/calculate_score.py","link_basis":"harvester_set","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":"1c866428bf6d7397"}},{"code_sha256_prefix":"7c8d373cfb107087","entry":"calculate_cos_score","repo":"billyxyb/transeditor","repo_kind":"official","path":"our_interfaceGAN/calculate_score_id.py","file_url":"https://github.com/billyxyb/transeditor/blob/HEAD/our_interfaceGAN/calculate_score_id.py","link_basis":"harvester_set","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":"7c8d373cfb107087"}},{"code_sha256_prefix":"8893c21111af14ff","entry":"extract_feature_from_samples","repo":"billyxyb/transeditor","repo_kind":"official","path":"metrics/calc_prdc.py","file_url":"https://github.com/billyxyb/transeditor/blob/HEAD/metrics/calc_prdc.py","link_basis":"harvester_set","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":"8893c21111af14ff"}},{"code_sha256_prefix":"826a4bfd8b5cb2fc","entry":"extract_features","repo":"billyxyb/transeditor","repo_kind":"official","path":"metrics/calc_inception.py","file_url":"https://github.com/billyxyb/transeditor/blob/HEAD/metrics/calc_inception.py","link_basis":"harvester_set","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":"826a4bfd8b5cb2fc"}},{"code_sha256_prefix":"c32f2d047465748d","entry":"latent_noise","repo":"billyxyb/transeditor","repo_kind":"official","path":"projector_optimization.py","file_url":"https://github.com/billyxyb/transeditor/blob/HEAD/projector_optimization.py","link_basis":"harvester_set","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":"c32f2d047465748d"}},{"code_sha256_prefix":"c8b61cfc5c049356","entry":"noise_regularize_","repo":"billyxyb/transeditor","repo_kind":"official","path":"projector_optimization.py","file_url":"https://github.com/billyxyb/transeditor/blob/HEAD/projector_optimization.py","link_basis":"harvester_set","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":"c8b61cfc5c049356"}},{"code_sha256_prefix":"bfd30ba25798287e","entry":"normalize","repo":"billyxyb/transeditor","repo_kind":"official","path":"metrics/evaluate_query.py","file_url":"https://github.com/billyxyb/transeditor/blob/HEAD/metrics/evaluate_query.py","link_basis":"harvester_set","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":"bfd30ba25798287e"}},{"code_sha256_prefix":"b1dd6bc053e429d5","entry":"set_test_options","repo":"billyxyb/transeditor","repo_kind":"official","path":"dual_space_encoder.py","file_url":"https://github.com/billyxyb/transeditor/blob/HEAD/dual_space_encoder.py","link_basis":"harvester_set","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":"b1dd6bc053e429d5"}},{"code_sha256_prefix":"904ef2c2720850a0","entry":"slerp","repo":"billyxyb/transeditor","repo_kind":"official","path":"metrics/evaluate_query.py","file_url":"https://github.com/billyxyb/transeditor/blob/HEAD/metrics/evaluate_query.py","link_basis":"harvester_set","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":"904ef2c2720850a0"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}