{"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/learning-canonical-representations-for-scene","title":"Learning Canonical Representations for Scene Graph to Image Generation","arxiv_id":"1912.07414","date":"2019-12-16","proceeding":"ECCV 2020 8","authors":["Roei Herzig","Amir Bar","Huijuan Xu","Gal Chechik","Trevor Darrell","Amir Globerson"],"abstract":"Generating realistic images of complex visual scenes becomes challenging when one wishes to control the structure of the generated images. Previous approaches showed that scenes with few entities can be controlled using scene graphs, but this approach struggles as the complexity of the graph (the number of objects and edges) increases. In this work, we show that one limitation of current methods is their inability to capture semantic equivalence in graphs. We present a novel model that addresses these issues by learning canonical graph representations from the data, resulting in improved image generation for complex visual scenes. Our model demonstrates improved empirical performance on large scene graphs, robustness to noise in the input scene graph, and generalization on semantically equivalent graphs. Finally, we show improved performance of the model on three different benchmarks: Visual Genome, COCO, and CLEVR.","url_abs":"https://arxiv.org/abs/1912.07414v5","url_pdf":"https://arxiv.org/pdf/1912.07414v5.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":"learning-canonical-representations-for-scene","repo_url":"https://github.com/roeiherz/CanonicalSg2Im","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"learning-canonical-representations-for-scene","repo_url":"https://github.com/roeiherz/AG2Video","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"layout-to-image-generation","task_name":"Layout-to-Image Generation"},{"task_slug":"scene-generation","task_name":"Scene Generation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/layout-to-image-generation-on-coco-stuff-4","task":"Layout-to-Image Generation","dataset":"COCO-Stuff 256x256","model":"AttSPADE","rank_in_archive_order":5,"of":5,"metrics":{"FID":"54.7","Inception Score":"15.6","LPIPS":"0.44"},"uses_additional_data":false},{"leaderboard":"/sota/layout-to-image-generation-on-visual-genome-4","task":"Layout-to-Image Generation","dataset":"Visual Genome 256x256","model":"AttSPADE","rank_in_archive_order":3,"of":4,"metrics":{"FID":"36.4","Inception Score":"11","LPIPS":"0.51"},"uses_additional_data":false}],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=1912.07414","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1912.07414"}},"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/roeiherz/CanonicalSg2Im","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/roeiherz/AG2Video","reach":null}],"summary":{"ran_draft_wrong":2,"unverified":15},"by_repo_kind":{"official":{"samples":17,"ran":2,"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":"a193f189a7547b8b","entry":"build_mlp","repo":"roeiherz/CanonicalSg2Im","repo_kind":"official","path":"sg2im/layers.py","file_url":"https://github.com/roeiherz/CanonicalSg2Im/blob/HEAD/sg2im/layers.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a193f189a7547b8b"}},{"code_sha256_prefix":"6adb3b06f471b25d","entry":"get_activation","repo":"roeiherz/CanonicalSg2Im","repo_kind":"official","path":"sg2im/layers.py","file_url":"https://github.com/roeiherz/CanonicalSg2Im/blob/HEAD/sg2im/layers.py","link_basis":"plan_row","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":"6adb3b06f471b25d"}},{"code_sha256_prefix":"ae92b5ed5c527664","entry":"bce_loss","repo":"roeiherz/CanonicalSg2Im","repo_kind":"official","path":"sg2im/losses.py","file_url":"https://github.com/roeiherz/CanonicalSg2Im/blob/HEAD/sg2im/losses.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":"ae92b5ed5c527664"}},{"code_sha256_prefix":"d03b87199703534d","entry":"build_cnn","repo":"roeiherz/CanonicalSg2Im","repo_kind":"official","path":"sg2im/layers.py","file_url":"https://github.com/roeiherz/CanonicalSg2Im/blob/HEAD/sg2im/layers.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":"d03b87199703534d"}},{"code_sha256_prefix":"6917ffcb1214d74f","entry":"calculate_activation_statistics","repo":"roeiherz/CanonicalSg2Im","repo_kind":"official","path":"evaluation/fid_tf.py","file_url":"https://github.com/roeiherz/CanonicalSg2Im/blob/HEAD/evaluation/fid_tf.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":"6917ffcb1214d74f"}},{"code_sha256_prefix":"94ea5856a1451de8","entry":"calculate_activation_statistics","repo":"roeiherz/CanonicalSg2Im","repo_kind":"official","path":"evaluation/fid/fid_score.py","file_url":"https://github.com/roeiherz/CanonicalSg2Im/blob/HEAD/evaluation/fid/fid_score.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":"94ea5856a1451de8"}},{"code_sha256_prefix":"0def50a351111624","entry":"calculate_frechet_distance","repo":"roeiherz/CanonicalSg2Im","repo_kind":"official","path":"evaluation/fid/fid_score.py","file_url":"https://github.com/roeiherz/CanonicalSg2Im/blob/HEAD/evaluation/fid/fid_score.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0def50a351111624"}},{"code_sha256_prefix":"f82d43c86ff154eb","entry":"calculate_frechet_distance","repo":"roeiherz/CanonicalSg2Im","repo_kind":"official","path":"evaluation/fid_tf.py","file_url":"https://github.com/roeiherz/CanonicalSg2Im/blob/HEAD/evaluation/fid_tf.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":"f82d43c86ff154eb"}},{"code_sha256_prefix":"590d417a313b8256","entry":"confusion_matrix","repo":"roeiherz/CanonicalSg2Im","repo_kind":"official","path":"evaluation/fid.py","file_url":"https://github.com/roeiherz/CanonicalSg2Im/blob/HEAD/evaluation/fid.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":"590d417a313b8256"}},{"code_sha256_prefix":"bea7eab39b0f3e75","entry":"gan_g_loss","repo":"roeiherz/CanonicalSg2Im","repo_kind":"official","path":"sg2im/losses.py","file_url":"https://github.com/roeiherz/CanonicalSg2Im/blob/HEAD/sg2im/losses.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":"bea7eab39b0f3e75"}},{"code_sha256_prefix":"e69fcd6206886931","entry":"get_activations","repo":"roeiherz/CanonicalSg2Im","repo_kind":"official","path":"evaluation/fid_tf.py","file_url":"https://github.com/roeiherz/CanonicalSg2Im/blob/HEAD/evaluation/fid_tf.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":"e69fcd6206886931"}},{"code_sha256_prefix":"868290905012e985","entry":"get_activations","repo":"roeiherz/CanonicalSg2Im","repo_kind":"official","path":"evaluation/fid/fid_score.py","file_url":"https://github.com/roeiherz/CanonicalSg2Im/blob/HEAD/evaluation/fid/fid_score.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":"868290905012e985"}},{"code_sha256_prefix":"b117e70083ba7cf4","entry":"get_conv_converse","repo":"roeiherz/CanonicalSg2Im","repo_kind":"official","path":"sg2im/model.py","file_url":"https://github.com/roeiherz/CanonicalSg2Im/blob/HEAD/sg2im/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":"b117e70083ba7cf4"}},{"code_sha256_prefix":"ee94d6adfea70511","entry":"get_gan_losses","repo":"roeiherz/CanonicalSg2Im","repo_kind":"official","path":"sg2im/losses.py","file_url":"https://github.com/roeiherz/CanonicalSg2Im/blob/HEAD/sg2im/losses.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":"ee94d6adfea70511"}},{"code_sha256_prefix":"c1b8c34d251f28dd","entry":"get_predicates_weights","repo":"roeiherz/CanonicalSg2Im","repo_kind":"official","path":"sg2im/graph.py","file_url":"https://github.com/roeiherz/CanonicalSg2Im/blob/HEAD/sg2im/graph.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":"c1b8c34d251f28dd"}},{"code_sha256_prefix":"df860a11dd4c724c","entry":"kl","repo":"roeiherz/CanonicalSg2Im","repo_kind":"official","path":"evaluation/fid.py","file_url":"https://github.com/roeiherz/CanonicalSg2Im/blob/HEAD/evaluation/fid.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":"df860a11dd4c724c"}},{"code_sha256_prefix":"83ba89f8767e1931","entry":"quant","repo":"roeiherz/CanonicalSg2Im","repo_kind":"official","path":"evaluation/fid.py","file_url":"https://github.com/roeiherz/CanonicalSg2Im/blob/HEAD/evaluation/fid.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":"83ba89f8767e1931"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}