{"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/rewriting-geometric-rules-of-a-gan","title":"Rewriting Geometric Rules of a GAN","arxiv_id":"2207.14288","date":"2022-07-28","proceeding":null,"authors":["Sheng-Yu Wang","David Bau","Jun-Yan Zhu"],"abstract":"Deep generative models make visual content creation more accessible to novice users by automating the synthesis of diverse, realistic content based on a collected dataset. However, the current machine learning approaches miss a key element of the creative process -- the ability to synthesize things that go far beyond the data distribution and everyday experience. To begin to address this issue, we enable a user to \"warp\" a given model by editing just a handful of original model outputs with desired geometric changes. Our method applies a low-rank update to a single model layer to reconstruct edited examples. Furthermore, to combat overfitting, we propose a latent space augmentation method based on style-mixing. Our method allows a user to create a model that synthesizes endless objects with defined geometric changes, enabling the creation of a new generative model without the burden of curating a large-scale dataset. We also demonstrate that edited models can be composed to achieve aggregated effects, and we present an interactive interface to enable users to create new models through composition. Empirical measurements on multiple test cases suggest the advantage of our method against recent GAN fine-tuning methods. Finally, we showcase several applications using the edited models, including latent space interpolation and image editing.","url_abs":"https://arxiv.org/abs/2207.14288v1","url_pdf":"https://arxiv.org/pdf/2207.14288v1.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":"rewriting-geometric-rules-of-a-gan","repo_url":"https://github.com/peterwang512/ganwarping","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[{"method_slug":"test","method_name":"Test"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2207.14288","atlas_url":"https://app.syntology.ai/?focus=2207.14288","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2207.14288"}},"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/peterwang512/ganwarping","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":9,"unverified":5},"by_repo_kind":{"official":{"samples":14,"ran":9,"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":"3c4d5221760e1639","entry":"double_threshold_hysteresis","repo":"peterwang512/ganwarping","repo_kind":"official","path":"evaluation/chamfer_evaluator.py","file_url":"https://github.com/peterwang512/ganwarping/blob/HEAD/evaluation/chamfer_evaluator.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3c4d5221760e1639"}},{"code_sha256_prefix":"a863abfc6030da1b","entry":"edge_predict","repo":"peterwang512/ganwarping","repo_kind":"official","path":"evaluation/chamfer_evaluator.py","file_url":"https://github.com/peterwang512/ganwarping/blob/HEAD/evaluation/chamfer_evaluator.py","link_basis":"harvester_set","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":"a863abfc6030da1b"}},{"code_sha256_prefix":"4b1b60cde93137bd","entry":"fspecial_gauss","repo":"peterwang512/ganwarping","repo_kind":"official","path":"lib/quality_assess.py","file_url":"https://github.com/peterwang512/ganwarping/blob/HEAD/lib/quality_assess.py","link_basis":"harvester_set","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":"4b1b60cde93137bd"}},{"code_sha256_prefix":"1a099aed69e16116","entry":"get_transform","repo":"peterwang512/ganwarping","repo_kind":"official","path":"datasets/base_dataset.py","file_url":"https://github.com/peterwang512/ganwarping/blob/HEAD/datasets/base_dataset.py","link_basis":"harvester_set","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":"1a099aed69e16116"}},{"code_sha256_prefix":"e2b9823fa3580f26","entry":"mls_affine_deformation_1pt","repo":"peterwang512/ganwarping","repo_kind":"official","path":"lib/mls.py","file_url":"https://github.com/peterwang512/ganwarping/blob/HEAD/lib/mls.py","link_basis":"harvester_set","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":"e2b9823fa3580f26"}},{"code_sha256_prefix":"8c4d44d0f576b44b","entry":"mls_similarity_deformation","repo":"peterwang512/ganwarping","repo_kind":"official","path":"lib/mls.py","file_url":"https://github.com/peterwang512/ganwarping/blob/HEAD/lib/mls.py","link_basis":"harvester_set","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":"8c4d44d0f576b44b"}},{"code_sha256_prefix":"f96cfe5e20ab9852","entry":"mse","repo":"peterwang512/ganwarping","repo_kind":"official","path":"lib/quality_assess.py","file_url":"https://github.com/peterwang512/ganwarping/blob/HEAD/lib/quality_assess.py","link_basis":"harvester_set","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":"f96cfe5e20ab9852"}},{"code_sha256_prefix":"f377d184b49df220","entry":"non_maximum_suppression","repo":"peterwang512/ganwarping","repo_kind":"official","path":"evaluation/chamfer_evaluator.py","file_url":"https://github.com/peterwang512/ganwarping/blob/HEAD/evaluation/chamfer_evaluator.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f377d184b49df220"}},{"code_sha256_prefix":"af4bf9f37117d224","entry":"psnr","repo":"peterwang512/ganwarping","repo_kind":"official","path":"lib/quality_assess.py","file_url":"https://github.com/peterwang512/ganwarping/blob/HEAD/lib/quality_assess.py","link_basis":"harvester_set","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":"af4bf9f37117d224"}},{"code_sha256_prefix":"3d1c086af5cfb609","entry":"ganspace_edit","repo":"peterwang512/ganwarping","repo_kind":"official","path":"ganspace_edit.py","file_url":"https://github.com/peterwang512/ganwarping/blob/HEAD/ganspace_edit.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":"3d1c086af5cfb609"}},{"code_sha256_prefix":"c0d08a481f4674ea","entry":"generate","repo":"peterwang512/ganwarping","repo_kind":"official","path":"sample.py","file_url":"https://github.com/peterwang512/ganwarping/blob/HEAD/sample.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":"c0d08a481f4674ea"}},{"code_sha256_prefix":"d80e86b2b7fb857b","entry":"get_params","repo":"peterwang512/ganwarping","repo_kind":"official","path":"datasets/base_dataset.py","file_url":"https://github.com/peterwang512/ganwarping/blob/HEAD/datasets/base_dataset.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":"d80e86b2b7fb857b"}},{"code_sha256_prefix":"39a9a2e448bc9caf","entry":"load_model","repo":"peterwang512/ganwarping","repo_kind":"official","path":"ganspace_edit.py","file_url":"https://github.com/peterwang512/ganwarping/blob/HEAD/ganspace_edit.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":"39a9a2e448bc9caf"}},{"code_sha256_prefix":"bd54d6319eb06e4f","entry":"mls_affine_deformation","repo":"peterwang512/ganwarping","repo_kind":"official","path":"lib/mls.py","file_url":"https://github.com/peterwang512/ganwarping/blob/HEAD/lib/mls.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":"bd54d6319eb06e4f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}