{"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-generate-line-drawings-that","title":"Learning to generate line drawings that convey geometry and semantics","arxiv_id":"2203.12691","date":"2022-03-23","proceeding":"CVPR 2022 1","authors":["Caroline Chan","Fredo Durand","Phillip Isola"],"abstract":"This paper presents an unpaired method for creating line drawings from photographs. Current methods often rely on high quality paired datasets to generate line drawings. However, these datasets often have limitations due to the subjects of the drawings belonging to a specific domain, or in the amount of data collected. Although recent work in unsupervised image-to-image translation has shown much progress, the latest methods still struggle to generate compelling line drawings. We observe that line drawings are encodings of scene information and seek to convey 3D shape and semantic meaning. We build these observations into a set of objectives and train an image translation to map photographs into line drawings. We introduce a geometry loss which predicts depth information from the image features of a line drawing, and a semantic loss which matches the CLIP features of a line drawing with its corresponding photograph. Our approach outperforms state-of-the-art unpaired image translation and line drawing generation methods on creating line drawings from arbitrary photographs. For code and demo visit our webpage carolineec.github.io/informative_drawings","url_abs":"https://arxiv.org/abs/2203.12691v3","url_pdf":"https://arxiv.org/pdf/2203.12691v3.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-generate-line-drawings-that","repo_url":"https://github.com/carolineec/informative-drawings","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"learning-to-generate-line-drawings-that","repo_url":"https://github.com/ubc-tea/Improving-Fairness-in-Image-Classification-via-Sketching","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"image-to-image-translation","task_name":"Image-to-Image Translation"},{"task_slug":"translation","task_name":"Translation"},{"task_slug":"unsupervised-image-to-image-translation","task_name":"Unsupervised Image-To-Image Translation"}],"methods":[{"method_slug":"clip","method_name":"CLIP"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2203.12691","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2203.12691"}},"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/ubc-tea/Improving-Fairness-in-Image-Classification-via-Sketching","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/carolineec/informative-drawings","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":3,"ran_violates":1,"unverified":14},"by_repo_kind":{"official":{"samples":18,"ran":4,"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":"430c582cd8bbb1df","entry":"gram_matrix","repo":"carolineec/informative-drawings","repo_kind":"official","path":"utils_pl.py","file_url":"https://github.com/carolineec/informative-drawings/blob/HEAD/utils_pl.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"430c582cd8bbb1df"}},{"code_sha256_prefix":"10fdae626d954364","entry":"init_net","repo":"carolineec/informative-drawings","repo_kind":"official","path":"networks.py","file_url":"https://github.com/carolineec/informative-drawings/blob/HEAD/networks.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"10fdae626d954364"}},{"code_sha256_prefix":"59848503040bbdac","entry":"is_image_file","repo":"carolineec/informative-drawings","repo_kind":"official","path":"dataset.py","file_url":"https://github.com/carolineec/informative-drawings/blob/HEAD/dataset.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"59848503040bbdac"}},{"code_sha256_prefix":"80b795d920e2967a","entry":"unpickle","repo":"carolineec/informative-drawings","repo_kind":"official","path":"dataset.py","file_url":"https://github.com/carolineec/informative-drawings/blob/HEAD/dataset.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"80b795d920e2967a"}},{"code_sha256_prefix":"2623c33654e1da14","entry":"add_margin","repo":"carolineec/informative-drawings","repo_kind":"official","path":"base_dataset.py","file_url":"https://github.com/carolineec/informative-drawings/blob/HEAD/base_dataset.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":"2623c33654e1da14"}},{"code_sha256_prefix":"c5f6a77d35d36163","entry":"channel2width","repo":"carolineec/informative-drawings","repo_kind":"official","path":"utils.py","file_url":"https://github.com/carolineec/informative-drawings/blob/HEAD/utils.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":"c5f6a77d35d36163"}},{"code_sha256_prefix":"adce554a3dd42bae","entry":"createNRandompatches","repo":"carolineec/informative-drawings","repo_kind":"official","path":"utils.py","file_url":"https://github.com/carolineec/informative-drawings/blob/HEAD/utils.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":"adce554a3dd42bae"}},{"code_sha256_prefix":"30190c576dd53b28","entry":"get_norm_layer","repo":"carolineec/informative-drawings","repo_kind":"official","path":"networks.py","file_url":"https://github.com/carolineec/informative-drawings/blob/HEAD/networks.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":"30190c576dd53b28"}},{"code_sha256_prefix":"d80e86b2b7fb857b","entry":"get_params","repo":"carolineec/informative-drawings","repo_kind":"official","path":"base_dataset.py","file_url":"https://github.com/carolineec/informative-drawings/blob/HEAD/base_dataset.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":"d80e86b2b7fb857b"}},{"code_sha256_prefix":"78865ef3023c58ad","entry":"get_scheduler","repo":"carolineec/informative-drawings","repo_kind":"official","path":"networks.py","file_url":"https://github.com/carolineec/informative-drawings/blob/HEAD/networks.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":"78865ef3023c58ad"}},{"code_sha256_prefix":"e045b7099733bf40","entry":"get_transform","repo":"carolineec/informative-drawings","repo_kind":"official","path":"base_dataset.py","file_url":"https://github.com/carolineec/informative-drawings/blob/HEAD/base_dataset.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":"e045b7099733bf40"}},{"code_sha256_prefix":"7d363fa05027abd2","entry":"load_image","repo":"carolineec/informative-drawings","repo_kind":"official","path":"utils_pl.py","file_url":"https://github.com/carolineec/informative-drawings/blob/HEAD/utils_pl.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":"7d363fa05027abd2"}},{"code_sha256_prefix":"5c701194ea1b715a","entry":"make_dataset","repo":"carolineec/informative-drawings","repo_kind":"official","path":"dataset.py","file_url":"https://github.com/carolineec/informative-drawings/blob/HEAD/dataset.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":"5c701194ea1b715a"}},{"code_sha256_prefix":"9a49c7512264eb68","entry":"normalize_batch","repo":"carolineec/informative-drawings","repo_kind":"official","path":"utils_pl.py","file_url":"https://github.com/carolineec/informative-drawings/blob/HEAD/utils_pl.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":"9a49c7512264eb68"}},{"code_sha256_prefix":"3c356092464d28e0","entry":"tensor2im","repo":"carolineec/informative-drawings","repo_kind":"official","path":"util/util.py","file_url":"https://github.com/carolineec/informative-drawings/blob/HEAD/util/util.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":"3c356092464d28e0"}},{"code_sha256_prefix":"0ee3f9ee92d8a8c6","entry":"tensor2image","repo":"carolineec/informative-drawings","repo_kind":"official","path":"utils.py","file_url":"https://github.com/carolineec/informative-drawings/blob/HEAD/utils.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":"0ee3f9ee92d8a8c6"}},{"code_sha256_prefix":"1590350b5aa06dc4","entry":"tensor2imv2","repo":"carolineec/informative-drawings","repo_kind":"official","path":"util/util.py","file_url":"https://github.com/carolineec/informative-drawings/blob/HEAD/util/util.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":"1590350b5aa06dc4"}},{"code_sha256_prefix":"60597ae0bacbcfc2","entry":"tensor2label","repo":"carolineec/informative-drawings","repo_kind":"official","path":"util/util.py","file_url":"https://github.com/carolineec/informative-drawings/blob/HEAD/util/util.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":"60597ae0bacbcfc2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}