{"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-a-sketch-tensor-space-for-image","title":"Learning a Sketch Tensor Space for Image Inpainting of Man-made Scenes","arxiv_id":"2103.15087","date":"2021-03-28","proceeding":"ICCV 2021 10","authors":["Chenjie Cao","Yanwei Fu"],"abstract":"This paper studies the task of inpainting man-made scenes. It is very challenging due to the difficulty in preserving the visual patterns of images, such as edges, lines, and junctions. Especially, most previous works are failed to restore the object/building structures for images of man-made scenes. To this end, this paper proposes learning a Sketch Tensor (ST) space for inpainting man-made scenes. Such a space is learned to restore the edges, lines, and junctions in images, and thus makes reliable predictions of the holistic image structures. To facilitate the structure refinement, we propose a Multi-scale Sketch Tensor inpainting (MST) network, with a novel encoder-decoder structure. The encoder extracts lines and edges from the input images to project them into an ST space. From this space, the decoder is learned to restore the input images. Extensive experiments validate the efficacy of our model. Furthermore, our model can also achieve competitive performance in inpainting general nature images over the competitors.","url_abs":"https://arxiv.org/abs/2103.15087v2","url_pdf":"https://arxiv.org/pdf/2103.15087v2.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-a-sketch-tensor-space-for-image","repo_url":"https://github.com/ewrfcas/MST_inpainting","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"image-inpainting","task_name":"Image Inpainting"}],"methods":[{"method_slug":"pixel-prediction","method_name":"Inpainting"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2103.15087","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2103.15087"}},"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/ewrfcas/MST_inpainting","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":11},"by_repo_kind":{"official":{"samples":11,"ran":0,"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":"a5839bdbb6b4c613","entry":"build_hg","repo":"ewrfcas/MST_inpainting","repo_kind":"official","path":"src/lsm_hawp/detector.py","file_url":"https://github.com/ewrfcas/MST_inpainting/blob/HEAD/src/lsm_hawp/detector.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":"a5839bdbb6b4c613"}},{"code_sha256_prefix":"1c2fb75a32c87a57","entry":"calculate_activation_statistics","repo":"ewrfcas/MST_inpainting","repo_kind":"official","path":"src/metrics.py","file_url":"https://github.com/ewrfcas/MST_inpainting/blob/HEAD/src/metrics.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":"1c2fb75a32c87a57"}},{"code_sha256_prefix":"d059051e90165ebe","entry":"calculate_frechet_distance","repo":"ewrfcas/MST_inpainting","repo_kind":"official","path":"src/metrics.py","file_url":"https://github.com/ewrfcas/MST_inpainting/blob/HEAD/src/metrics.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":"d059051e90165ebe"}},{"code_sha256_prefix":"18bfc140d0a26202","entry":"get_activations","repo":"ewrfcas/MST_inpainting","repo_kind":"official","path":"src/metrics.py","file_url":"https://github.com/ewrfcas/MST_inpainting/blob/HEAD/src/metrics.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":"18bfc140d0a26202"}},{"code_sha256_prefix":"ae550cddf3be9db4","entry":"get_junctions","repo":"ewrfcas/MST_inpainting","repo_kind":"official","path":"src/lsm_hawp/detector.py","file_url":"https://github.com/ewrfcas/MST_inpainting/blob/HEAD/src/lsm_hawp/detector.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":"ae550cddf3be9db4"}},{"code_sha256_prefix":"8bd71ae13cacd1a7","entry":"image_combine","repo":"ewrfcas/MST_inpainting","repo_kind":"official","path":"src/training.py","file_url":"https://github.com/ewrfcas/MST_inpainting/blob/HEAD/src/training.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":"8bd71ae13cacd1a7"}},{"code_sha256_prefix":"f93fa196a0539bce","entry":"load_model","repo":"ewrfcas/MST_inpainting","repo_kind":"official","path":"src/training.py","file_url":"https://github.com/ewrfcas/MST_inpainting/blob/HEAD/src/training.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":"f93fa196a0539bce"}},{"code_sha256_prefix":"c972983944d63a38","entry":"non_maximum_suppression","repo":"ewrfcas/MST_inpainting","repo_kind":"official","path":"src/lsm_hawp/detector.py","file_url":"https://github.com/ewrfcas/MST_inpainting/blob/HEAD/src/lsm_hawp/detector.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":"c972983944d63a38"}},{"code_sha256_prefix":"efc17d7d22e7bdcf","entry":"resize","repo":"ewrfcas/MST_inpainting","repo_kind":"official","path":"src/model_inference.py","file_url":"https://github.com/ewrfcas/MST_inpainting/blob/HEAD/src/model_inference.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":"efc17d7d22e7bdcf"}},{"code_sha256_prefix":"b189ed0149b76880","entry":"spectral_norm","repo":"ewrfcas/MST_inpainting","repo_kind":"official","path":"src/layers.py","file_url":"https://github.com/ewrfcas/MST_inpainting/blob/HEAD/src/layers.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":"b189ed0149b76880"}},{"code_sha256_prefix":"3e96ae3d0522cbeb","entry":"to_device","repo":"ewrfcas/MST_inpainting","repo_kind":"official","path":"lsm_hawp_inference.py","file_url":"https://github.com/ewrfcas/MST_inpainting/blob/HEAD/lsm_hawp_inference.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":"3e96ae3d0522cbeb"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}