{"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/neural-painters-a-learned-differentiable","title":"Neural Painters: A learned differentiable constraint for generating brushstroke paintings","arxiv_id":"1904.08410","date":"2019-04-17","proceeding":null,"authors":["Reiichiro Nakano"],"abstract":"We explore neural painters, a generative model for brushstrokes learned from\na real non-differentiable and non-deterministic painting program. We show that\nwhen training an agent to \"paint\" images using brushstrokes, using a\ndifferentiable neural painter leads to much faster convergence. We propose a\nmethod for encouraging this agent to follow human-like strokes when\nreconstructing digits. We also explore the use of a neural painter as a\ndifferentiable image parameterization. By directly optimizing brushstrokes to\nactivate neurons in a pre-trained convolutional network, we can directly\nvisualize ImageNet categories and generate \"ideal\" paintings of each class.\nFinally, we present a new concept called intrinsic style transfer. By\nminimizing only the content loss from neural style transfer, we allow the\nartistic medium, in this case, brushstrokes, to naturally dictate the resulting\nstyle.","url_abs":"http://arxiv.org/abs/1904.08410v2","url_pdf":"http://arxiv.org/pdf/1904.08410v2.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":"neural-painters-a-learned-differentiable","repo_url":"https://github.com/reiinakano/neural-painters-pytorch","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"neural-painters-a-learned-differentiable","repo_url":"https://github.com/libreai/neural-painters-x","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"neural-painters-a-learned-differentiable","repo_url":"https://github.com/shauray8/Neural-Painter","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"neural-painters-a-learned-differentiable","repo_url":"https://github.com/t04glovern/neural-painters","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok"}}],"tasks":[{"task_slug":"style-transfer","task_name":"Style Transfer"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1904.08410","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1904.08410"}},"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/t04glovern/neural-painters","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/reiinakano/neural-painters-pytorch","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/shauray8/Neural-Painter","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/libreai/neural-painters-x","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"unverified":11},"by_repo_kind":{"official":{"samples":9,"ran":0,"repositories":1},"listed":{"samples":3,"ran":1,"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":"1090950b58e9358b","entry":"gram_matrix","repo":"shauray8/Neural-Painter","repo_kind":"listed","path":"stylized_NP/utils.py","file_url":"https://github.com/shauray8/Neural-Painter/blob/HEAD/stylized_NP/utils.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1090950b58e9358b"}},{"code_sha256_prefix":"fd23c3d880c3e469","entry":"calc_gradient_penalty","repo":"reiinakano/neural-painters-pytorch","repo_kind":"official","path":"neural_painters/gan_painter.py","file_url":"https://github.com/reiinakano/neural-painters-pytorch/blob/HEAD/neural_painters/gan_painter.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":"fd23c3d880c3e469"}},{"code_sha256_prefix":"55ada60f4f779fd9","entry":"get_style_model_and_losses","repo":"shauray8/Neural-Painter","repo_kind":"listed","path":"stylized_NP/utils.py","file_url":"https://github.com/shauray8/Neural-Painter/blob/HEAD/stylized_NP/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":"55ada60f4f779fd9"}},{"code_sha256_prefix":"2de30093c7a77a03","entry":"img_loader","repo":"shauray8/Neural-Painter","repo_kind":"listed","path":"stylized_NP/utils.py","file_url":"https://github.com/shauray8/Neural-Painter/blob/HEAD/stylized_NP/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":"2de30093c7a77a03"}},{"code_sha256_prefix":"cd6fdf76fd433706","entry":"kl_loss_function","repo":"reiinakano/neural-painters-pytorch","repo_kind":"official","path":"neural_painters/vae_painter.py","file_url":"https://github.com/reiinakano/neural-painters-pytorch/blob/HEAD/neural_painters/vae_painter.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":"cd6fdf76fd433706"}},{"code_sha256_prefix":"80a2288104dbb177","entry":"load_from_latest_checkpoint","repo":"reiinakano/neural-painters-pytorch","repo_kind":"official","path":"neural_painters/gan_painter.py","file_url":"https://github.com/reiinakano/neural-painters-pytorch/blob/HEAD/neural_painters/gan_painter.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":"80a2288104dbb177"}},{"code_sha256_prefix":"480c317886270e1d","entry":"load_from_latest_checkpoint","repo":"reiinakano/neural-painters-pytorch","repo_kind":"official","path":"neural_painters/vae_painter.py","file_url":"https://github.com/reiinakano/neural-painters-pytorch/blob/HEAD/neural_painters/vae_painter.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":"480c317886270e1d"}},{"code_sha256_prefix":"d30ffba968994297","entry":"paint_over_canvas","repo":"reiinakano/neural-painters-pytorch","repo_kind":"official","path":"neural_painters/canvas.py","file_url":"https://github.com/reiinakano/neural-painters-pytorch/blob/HEAD/neural_painters/canvas.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":"d30ffba968994297"}},{"code_sha256_prefix":"1b08e1e68fe24bfe","entry":"point_on_curve_1","repo":"reiinakano/neural-painters-pytorch","repo_kind":"official","path":"neural_painters/mypaint_env.py","file_url":"https://github.com/reiinakano/neural-painters-pytorch/blob/HEAD/neural_painters/mypaint_env.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":"1b08e1e68fe24bfe"}},{"code_sha256_prefix":"943d47ec94e2ef34","entry":"point_on_curve_2","repo":"reiinakano/neural-painters-pytorch","repo_kind":"official","path":"neural_painters/mypaint_env.py","file_url":"https://github.com/reiinakano/neural-painters-pytorch/blob/HEAD/neural_painters/mypaint_env.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":"943d47ec94e2ef34"}},{"code_sha256_prefix":"3ce4d1fe2505363f","entry":"reconstruction_loss_function","repo":"reiinakano/neural-painters-pytorch","repo_kind":"official","path":"neural_painters/common.py","file_url":"https://github.com/reiinakano/neural-painters-pytorch/blob/HEAD/neural_painters/common.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":"3ce4d1fe2505363f"}},{"code_sha256_prefix":"fd1539c7b1eb5b85","entry":"starting_point_for_ellipse","repo":"reiinakano/neural-painters-pytorch","repo_kind":"official","path":"neural_painters/mypaint_env.py","file_url":"https://github.com/reiinakano/neural-painters-pytorch/blob/HEAD/neural_painters/mypaint_env.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":"fd1539c7b1eb5b85"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}