{"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-to-incorporate-structure-knowledge","title":"Learning to Incorporate Structure Knowledge for Image Inpainting","arxiv_id":"2002.04170","date":"2020-02-11","proceeding":null,"authors":["Jie Yang","Zhiquan Qi","Yong Shi"],"abstract":"This paper develops a multi-task learning framework that attempts to incorporate the image structure knowledge to assist image inpainting, which is not well explored in previous works. The primary idea is to train a shared generator to simultaneously complete the corrupted image and corresponding structures --- edge and gradient, thus implicitly encouraging the generator to exploit relevant structure knowledge while inpainting. In the meantime, we also introduce a structure embedding scheme to explicitly embed the learned structure features into the inpainting process, thus to provide possible preconditions for image completion. Specifically, a novel pyramid structure loss is proposed to supervise structure learning and embedding. Moreover, an attention mechanism is developed to further exploit the recurrent structures and patterns in the image to refine the generated structures and contents. Through multi-task learning, structure embedding besides with attention, our framework takes advantage of the structure knowledge and outperforms several state-of-the-art methods on benchmark datasets quantitatively and qualitatively.","url_abs":"https://arxiv.org/abs/2002.04170v2","url_pdf":"https://arxiv.org/pdf/2002.04170v2.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-to-incorporate-structure-knowledge","repo_url":"https://github.com/YoungGod/sturcture-inpainting","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"tf","reach":null}],"tasks":[{"task_slug":"image-inpainting","task_name":"Image Inpainting"},{"task_slug":"multi-task-learning","task_name":"Multi-Task Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2002.04170","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2002.04170"}},"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":"deterministic:regex_extraction","url":"https://github.com/YoungGod/sturcture-inpainting","reach":null}],"summary":{"ran_fixture":2,"ran":1,"unverified":1},"by_repo_kind":{"official":{"samples":4,"ran":3,"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":4,"samples":[{"code_sha256_prefix":"5b99466bbc94e984","entry":"canny_edge","repo":"YoungGod/sturcture-inpainting","repo_kind":"official","path":"src/loss.py","file_url":"https://github.com/YoungGod/sturcture-inpainting/blob/HEAD/src/loss.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5b99466bbc94e984"}},{"code_sha256_prefix":"31f8b44a1cf47d81","entry":"gaussian_kernel_2d_opencv","repo":"YoungGod/sturcture-inpainting","repo_kind":"official","path":"src/loss.py","file_url":"https://github.com/YoungGod/sturcture-inpainting/blob/HEAD/src/loss.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"DEP_MISSING","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"31f8b44a1cf47d81"}},{"code_sha256_prefix":"69a17533d6a2a610","entry":"priority_loss_mask","repo":"YoungGod/sturcture-inpainting","repo_kind":"official","path":"src/loss.py","file_url":"https://github.com/YoungGod/sturcture-inpainting/blob/HEAD/src/loss.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":"69a17533d6a2a610"}},{"code_sha256_prefix":"1e7c9afc41c4aa48","entry":"pyramid_structure_loss","repo":"YoungGod/sturcture-inpainting","repo_kind":"official","path":"src/loss.py","file_url":"https://github.com/YoungGod/sturcture-inpainting/blob/HEAD/src/loss.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":"1e7c9afc41c4aa48"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}