{"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-style-transfer-from-pixels-to","title":"Rethinking Style Transfer: From Pixels to Parameterized Brushstrokes","arxiv_id":"2103.17185","date":"2021-03-31","proceeding":"CVPR 2021 1","authors":["Dmytro Kotovenko","Matthias Wright","Arthur Heimbrecht","Björn Ommer"],"abstract":"There have been many successful implementations of neural style transfer in recent years. In most of these works, the stylization process is confined to the pixel domain. However, we argue that this representation is unnatural because paintings usually consist of brushstrokes rather than pixels. We propose a method to stylize images by optimizing parameterized brushstrokes instead of pixels and further introduce a simple differentiable rendering mechanism. Our approach significantly improves visual quality and enables additional control over the stylization process such as controlling the flow of brushstrokes through user input. We provide qualitative and quantitative evaluations that show the efficacy of the proposed parameterized representation.","url_abs":"https://arxiv.org/abs/2103.17185v1","url_pdf":"https://arxiv.org/pdf/2103.17185v1.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-style-transfer-from-pixels-to","repo_url":"https://github.com/CompVis/brushstroke-parameterized-style-transfer","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"rethinking-style-transfer-from-pixels-to","repo_url":"https://github.com/justanhduc/brushstroke-parameterized-style-transfer","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"style-transfer","task_name":"Style Transfer"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2103.17185","atlas_url":"https://app.syntology.ai/?focus=2103.17185","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2103.17185"}},"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/CompVis/brushstroke-parameterized-style-transfer","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/justanhduc/brushstroke-parameterized-style-transfer","reach":{"status":"ok"}}],"summary":{"ran":1,"ran_fixture":1,"unverified":14},"by_repo_kind":{"official":{"samples":16,"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":"6f0ac111ae4ae336","entry":"VGG","repo":"CompVis/brushstroke-parameterized-style-transfer","repo_kind":"official","path":"model.py","file_url":"https://github.com/CompVis/brushstroke-parameterized-style-transfer/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6f0ac111ae4ae336"}},{"code_sha256_prefix":"fadf566cf66fcbbf","entry":"initialize_brushstrokes","repo":"CompVis/brushstroke-parameterized-style-transfer","repo_kind":"official","path":"model.py","file_url":"https://github.com/CompVis/brushstroke-parameterized-style-transfer/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fadf566cf66fcbbf"}},{"code_sha256_prefix":"738f825697601e72","entry":"BrushstrokeOptimizer","repo":"CompVis/brushstroke-parameterized-style-transfer","repo_kind":"official","path":"model.py","file_url":"https://github.com/CompVis/brushstroke-parameterized-style-transfer/blob/HEAD/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":"738f825697601e72"}},{"code_sha256_prefix":"aa723ef48d78c84a","entry":"clusters_to_strokes","repo":"CompVis/brushstroke-parameterized-style-transfer","repo_kind":"official","path":"model.py","file_url":"https://github.com/CompVis/brushstroke-parameterized-style-transfer/blob/HEAD/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":"aa723ef48d78c84a"}},{"code_sha256_prefix":"11b86db023656ede","entry":"content_loss","repo":"CompVis/brushstroke-parameterized-style-transfer","repo_kind":"official","path":"model.py","file_url":"https://github.com/CompVis/brushstroke-parameterized-style-transfer/blob/HEAD/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":"11b86db023656ede"}},{"code_sha256_prefix":"8fb99ce0ede1ac50","entry":"curviture_loss","repo":"CompVis/brushstroke-parameterized-style-transfer","repo_kind":"official","path":"model.py","file_url":"https://github.com/CompVis/brushstroke-parameterized-style-transfer/blob/HEAD/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":"8fb99ce0ede1ac50"}},{"code_sha256_prefix":"d0a44dffd791518a","entry":"download_weights","repo":"CompVis/brushstroke-parameterized-style-transfer","repo_kind":"official","path":"model.py","file_url":"https://github.com/CompVis/brushstroke-parameterized-style-transfer/blob/HEAD/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":"d0a44dffd791518a"}},{"code_sha256_prefix":"eaaca87d3d35ace6","entry":"draw_projection_loss","repo":"CompVis/brushstroke-parameterized-style-transfer","repo_kind":"official","path":"model.py","file_url":"https://github.com/CompVis/brushstroke-parameterized-style-transfer/blob/HEAD/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":"eaaca87d3d35ace6"}},{"code_sha256_prefix":"85360c429d1aca56","entry":"get_gram_matrices","repo":"CompVis/brushstroke-parameterized-style-transfer","repo_kind":"official","path":"model.py","file_url":"https://github.com/CompVis/brushstroke-parameterized-style-transfer/blob/HEAD/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":"85360c429d1aca56"}},{"code_sha256_prefix":"4decbae4c04176d8","entry":"get_nn_idxs","repo":"CompVis/brushstroke-parameterized-style-transfer","repo_kind":"official","path":"model.py","file_url":"https://github.com/CompVis/brushstroke-parameterized-style-transfer/blob/HEAD/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":"4decbae4c04176d8"}},{"code_sha256_prefix":"8fb69f821ee3a813","entry":"norm","repo":"CompVis/brushstroke-parameterized-style-transfer","repo_kind":"official","path":"model.py","file_url":"https://github.com/CompVis/brushstroke-parameterized-style-transfer/blob/HEAD/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":"8fb69f821ee3a813"}},{"code_sha256_prefix":"00a501f8bebc184e","entry":"preprocess_img","repo":"CompVis/brushstroke-parameterized-style-transfer","repo_kind":"official","path":"model.py","file_url":"https://github.com/CompVis/brushstroke-parameterized-style-transfer/blob/HEAD/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":"00a501f8bebc184e"}},{"code_sha256_prefix":"5457d2c906d82b7e","entry":"renderer","repo":"CompVis/brushstroke-parameterized-style-transfer","repo_kind":"official","path":"model.py","file_url":"https://github.com/CompVis/brushstroke-parameterized-style-transfer/blob/HEAD/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":"5457d2c906d82b7e"}},{"code_sha256_prefix":"e0a52f21c9ffce5a","entry":"sample_quadratic_bezier_curve","repo":"CompVis/brushstroke-parameterized-style-transfer","repo_kind":"official","path":"model.py","file_url":"https://github.com/CompVis/brushstroke-parameterized-style-transfer/blob/HEAD/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":"e0a52f21c9ffce5a"}},{"code_sha256_prefix":"3bc3bc04c01ea4bb","entry":"style_loss","repo":"CompVis/brushstroke-parameterized-style-transfer","repo_kind":"official","path":"model.py","file_url":"https://github.com/CompVis/brushstroke-parameterized-style-transfer/blob/HEAD/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":"3bc3bc04c01ea4bb"}},{"code_sha256_prefix":"0ff29180d1bf839d","entry":"total_variation_loss","repo":"CompVis/brushstroke-parameterized-style-transfer","repo_kind":"official","path":"model.py","file_url":"https://github.com/CompVis/brushstroke-parameterized-style-transfer/blob/HEAD/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":"0ff29180d1bf839d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}