{"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/rethinking-the-training-and-evaluation-of","title":"Rethinking The Training And Evaluation of Rich-Context Layout-to-Image Generation","arxiv_id":"2409.04847","date":"2024-09-07","proceeding":null,"authors":["Jiaxin Cheng","Zixu Zhao","Tong He","Tianjun Xiao","Yicong Zhou","Zheng Zhang"],"abstract":"Recent advancements in generative models have significantly enhanced their capacity for image generation, enabling a wide range of applications such as image editing, completion and video editing. A specialized area within generative modeling is layout-to-image (L2I) generation, where predefined layouts of objects guide the generative process. In this study, we introduce a novel regional cross-attention module tailored to enrich layout-to-image generation. This module notably improves the representation of layout regions, particularly in scenarios where existing methods struggle with highly complex and detailed textual descriptions. Moreover, while current open-vocabulary L2I methods are trained in an open-set setting, their evaluations often occur in closed-set environments. To bridge this gap, we propose two metrics to assess L2I performance in open-vocabulary scenarios. Additionally, we conduct a comprehensive user study to validate the consistency of these metrics with human preferences.","url_abs":"https://arxiv.org/abs/2409.04847v2","url_pdf":"https://arxiv.org/pdf/2409.04847v2.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":"rethinking-the-training-and-evaluation-of","repo_url":"https://github.com/cplusx/rich_context_l2i","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"layout-to-image-generation","task_name":"Layout-to-Image Generation"},{"task_slug":"video-editing","task_name":"Video Editing"}],"methods":[{"method_slug":"concatenated-skip-connection","method_name":"Concatenated Skip Connection"},{"method_slug":"softmax","method_name":"Softmax"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2409.04847","atlas_url":"https://app.syntology.ai/?focus=2409.04847","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2409.04847"}},"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/cplusx/rich_context_l2i","reach":{"status":"ok"}}],"summary":{"ran":8,"ran_violates":1,"ran_draft_wrong":1,"unverified":3},"by_repo_kind":{"official":{"samples":13,"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":13,"samples":[{"code_sha256_prefix":"43749669b9801ca6","entry":"clip_image","repo":"cplusx/rich_context_l2i","repo_kind":"official","path":"callbacks/common.py","file_url":"https://github.com/cplusx/rich_context_l2i/blob/HEAD/callbacks/common.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"43749669b9801ca6"}},{"code_sha256_prefix":"608e364a9d2376a3","entry":"exists","repo":"cplusx/rich_context_l2i","repo_kind":"official","path":"misc_utils/model_utils.py","file_url":"https://github.com/cplusx/rich_context_l2i/blob/HEAD/misc_utils/model_utils.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"608e364a9d2376a3"}},{"code_sha256_prefix":"43cc14973f357339","entry":"format_dtype_and_shape","repo":"cplusx/rich_context_l2i","repo_kind":"official","path":"callbacks/common.py","file_url":"https://github.com/cplusx/rich_context_l2i/blob/HEAD/callbacks/common.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"43cc14973f357339"}},{"code_sha256_prefix":"862ce6b655ad9e1f","entry":"get_coco_id_mapping","repo":"cplusx/rich_context_l2i","repo_kind":"official","path":"diffusion_dataset/COCOStuff.py","file_url":"https://github.com/cplusx/rich_context_l2i/blob/HEAD/diffusion_dataset/COCOStuff.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"862ce6b655ad9e1f"}},{"code_sha256_prefix":"221b2d116fdf1032","entry":"get_obj_from_str","repo":"cplusx/rich_context_l2i","repo_kind":"official","path":"misc_utils/model_utils.py","file_url":"https://github.com/cplusx/rich_context_l2i/blob/HEAD/misc_utils/model_utils.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"221b2d116fdf1032"}},{"code_sha256_prefix":"47ed05cc10ac81e2","entry":"load_boxdiff_image","repo":"cplusx/rich_context_l2i","repo_kind":"official","path":"evaluation.py","file_url":"https://github.com/cplusx/rich_context_l2i/blob/HEAD/evaluation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"47ed05cc10ac81e2"}},{"code_sha256_prefix":"59fdc706e1142dc3","entry":"load_gligen_image","repo":"cplusx/rich_context_l2i","repo_kind":"official","path":"evaluation.py","file_url":"https://github.com/cplusx/rich_context_l2i/blob/HEAD/evaluation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"59fdc706e1142dc3"}},{"code_sha256_prefix":"8e721c9b6023bbf1","entry":"load_instdiff_image","repo":"cplusx/rich_context_l2i","repo_kind":"official","path":"evaluation.py","file_url":"https://github.com/cplusx/rich_context_l2i/blob/HEAD/evaluation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8e721c9b6023bbf1"}},{"code_sha256_prefix":"41527b34aedeb1bb","entry":"rename_duplicated_label_with_index","repo":"cplusx/rich_context_l2i","repo_kind":"official","path":"diffusion_dataset/LAION_synthetic.py","file_url":"https://github.com/cplusx/rich_context_l2i/blob/HEAD/diffusion_dataset/LAION_synthetic.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"41527b34aedeb1bb"}},{"code_sha256_prefix":"5639833613f1f408","entry":"unnorm","repo":"cplusx/rich_context_l2i","repo_kind":"official","path":"callbacks/common.py","file_url":"https://github.com/cplusx/rich_context_l2i/blob/HEAD/callbacks/common.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5639833613f1f408"}},{"code_sha256_prefix":"cf2e00fe902bb93e","entry":"get_cocostuff_caption_dataset","repo":"cplusx/rich_context_l2i","repo_kind":"official","path":"diffusion_dataset/COCOStuff.py","file_url":"https://github.com/cplusx/rich_context_l2i/blob/HEAD/diffusion_dataset/COCOStuff.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cf2e00fe902bb93e"}},{"code_sha256_prefix":"b8024f9ffe4b18f6","entry":"get_cocostuff_dataset","repo":"cplusx/rich_context_l2i","repo_kind":"official","path":"diffusion_dataset/COCOStuff.py","file_url":"https://github.com/cplusx/rich_context_l2i/blob/HEAD/diffusion_dataset/COCOStuff.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b8024f9ffe4b18f6"}},{"code_sha256_prefix":"f0ac78b4e05be194","entry":"instantiate_from_config","repo":"cplusx/rich_context_l2i","repo_kind":"official","path":"misc_utils/model_utils.py","file_url":"https://github.com/cplusx/rich_context_l2i/blob/HEAD/misc_utils/model_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f0ac78b4e05be194"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}