{"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/text-driven-image-editing-via-learnable","title":"Text-Driven Image Editing via Learnable Regions","arxiv_id":"2311.16432","date":"2023-11-28","proceeding":"CVPR 2024 1","authors":["Yuanze Lin","Yi-Wen Chen","Yi-Hsuan Tsai","Lu Jiang","Ming-Hsuan Yang"],"abstract":"Language has emerged as a natural interface for image editing. In this paper, we introduce a method for region-based image editing driven by textual prompts, without the need for user-provided masks or sketches. Specifically, our approach leverages an existing pre-trained text-to-image model and introduces a bounding box generator to identify the editing regions that are aligned with the textual prompts. We show that this simple approach enables flexible editing that is compatible with current image generation models, and is able to handle complex prompts featuring multiple objects, complex sentences, or lengthy paragraphs. We conduct an extensive user study to compare our method against state-of-the-art methods. The experiments demonstrate the competitive performance of our method in manipulating images with high fidelity and realism that correspond to the provided language descriptions. Our project webpage can be found at: https://yuanze-lin.me/LearnableRegions_page.","url_abs":"https://arxiv.org/abs/2311.16432v2","url_pdf":"https://arxiv.org/pdf/2311.16432v2.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":"text-driven-image-editing-via-learnable","repo_url":"https://github.com/yuanze-lin/Learnable_Regions","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"}],"methods":[{"method_slug":"align","method_name":"ALIGN"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2311.16432","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2311.16432"}},"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/yuanze-lin/Learnable_Regions","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":11,"ran_honours":1,"ran_fixture":1,"unverified":2},"by_repo_kind":{"official":{"samples":15,"ran":13,"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":"c19231378e41dc5a","entry":"bool_flag","repo":"yuanze-lin/Learnable_Regions","repo_kind":"official","path":"models/dino_utils.py","file_url":"https://github.com/yuanze-lin/Learnable_Regions/blob/HEAD/models/dino_utils.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":"c19231378e41dc5a"}},{"code_sha256_prefix":"2b5489053b222e00","entry":"clip_gradients","repo":"yuanze-lin/Learnable_Regions","repo_kind":"official","path":"models/dino_utils.py","file_url":"https://github.com/yuanze-lin/Learnable_Regions/blob/HEAD/models/dino_utils.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":"2b5489053b222e00"}},{"code_sha256_prefix":"361a6b24f11fc50a","entry":"cosine_scheduler","repo":"yuanze-lin/Learnable_Regions","repo_kind":"official","path":"models/dino_utils.py","file_url":"https://github.com/yuanze-lin/Learnable_Regions/blob/HEAD/models/dino_utils.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":"361a6b24f11fc50a"}},{"code_sha256_prefix":"453cb98d3d856ead","entry":"draw_image_with_bbox_new","repo":"yuanze-lin/Learnable_Regions","repo_kind":"official","path":"models/utils.py","file_url":"https://github.com/yuanze-lin/Learnable_Regions/blob/HEAD/models/utils.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":"453cb98d3d856ead"}},{"code_sha256_prefix":"55120f2026b56aa2","entry":"drop_path","repo":"yuanze-lin/Learnable_Regions","repo_kind":"official","path":"models/vision_transformer.py","file_url":"https://github.com/yuanze-lin/Learnable_Regions/blob/HEAD/models/vision_transformer.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"55120f2026b56aa2"}},{"code_sha256_prefix":"e4c34a449c58f4b7","entry":"generate","repo":"yuanze-lin/Learnable_Regions","repo_kind":"official","path":"engine.py","file_url":"https://github.com/yuanze-lin/Learnable_Regions/blob/HEAD/engine.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":"e4c34a449c58f4b7"}},{"code_sha256_prefix":"ffc38a27fd9393ba","entry":"get_hyper","repo":"yuanze-lin/Learnable_Regions","repo_kind":"official","path":"models/configs/base_config.py","file_url":"https://github.com/yuanze-lin/Learnable_Regions/blob/HEAD/models/configs/base_config.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":"ffc38a27fd9393ba"}},{"code_sha256_prefix":"7dfd4d71b4b83843","entry":"get_hyper","repo":"yuanze-lin/Learnable_Regions","repo_kind":"official","path":"models/configs/maskgit_class_cond_config.py","file_url":"https://github.com/yuanze-lin/Learnable_Regions/blob/HEAD/models/configs/maskgit_class_cond_config.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":"7dfd4d71b4b83843"}},{"code_sha256_prefix":"093d16a618f12c98","entry":"get_mask_imgs","repo":"yuanze-lin/Learnable_Regions","repo_kind":"official","path":"vis.py","file_url":"https://github.com/yuanze-lin/Learnable_Regions/blob/HEAD/vis.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":"093d16a618f12c98"}},{"code_sha256_prefix":"cdb9ed47e9d99d77","entry":"inpaint","repo":"yuanze-lin/Learnable_Regions","repo_kind":"official","path":"engine.py","file_url":"https://github.com/yuanze-lin/Learnable_Regions/blob/HEAD/engine.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":"cdb9ed47e9d99d77"}},{"code_sha256_prefix":"0204b4ac0f24e7da","entry":"map_cooridates","repo":"yuanze-lin/Learnable_Regions","repo_kind":"official","path":"vis.py","file_url":"https://github.com/yuanze-lin/Learnable_Regions/blob/HEAD/vis.py","link_basis":"first_harvest_node","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":"0204b4ac0f24e7da"}},{"code_sha256_prefix":"282a17731f89f0e7","entry":"read_image","repo":"yuanze-lin/Learnable_Regions","repo_kind":"official","path":"models/utils.py","file_url":"https://github.com/yuanze-lin/Learnable_Regions/blob/HEAD/models/utils.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":"282a17731f89f0e7"}},{"code_sha256_prefix":"efd2201f1bea3f5a","entry":"read_image_from_url","repo":"yuanze-lin/Learnable_Regions","repo_kind":"official","path":"models/utils.py","file_url":"https://github.com/yuanze-lin/Learnable_Regions/blob/HEAD/models/utils.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":"efd2201f1bea3f5a"}},{"code_sha256_prefix":"7ecaa1ab867d461d","entry":"build_model","repo":"yuanze-lin/Learnable_Regions","repo_kind":"official","path":"CLIP/clip_explainability/model.py","file_url":"https://github.com/yuanze-lin/Learnable_Regions/blob/HEAD/CLIP/clip_explainability/model.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":"7ecaa1ab867d461d"}},{"code_sha256_prefix":"ab2f38ac891c8d2e","entry":"build_model","repo":"yuanze-lin/Learnable_Regions","repo_kind":"official","path":"CLIP/clip/model.py","file_url":"https://github.com/yuanze-lin/Learnable_Regions/blob/HEAD/CLIP/clip/model.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":"ab2f38ac891c8d2e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}