{"id":17222866,"url":"https://github.com/cheind/py-style-transfer","last_synced_at":"2025-07-18T20:36:34.362Z","repository":{"id":66174981,"uuid":"143966850","full_name":"cheind/py-style-transfer","owner":"cheind","description":":art: Artistic neural style transfer with tweaks in PyTorch","archived":false,"fork":false,"pushed_at":"2018-08-23T10:49:35.000Z","size":114021,"stargazers_count":27,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-14T00:31:10.580Z","etag":null,"topics":["artistic","deep","generation","image","neural-networks","pytorch","style-transfer"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cheind.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-08-08T05:50:16.000Z","updated_at":"2025-04-03T14:49:13.000Z","dependencies_parsed_at":"2023-02-21T01:30:20.851Z","dependency_job_id":null,"html_url":"https://github.com/cheind/py-style-transfer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cheind/py-style-transfer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheind%2Fpy-style-transfer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheind%2Fpy-style-transfer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheind%2Fpy-style-transfer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheind%2Fpy-style-transfer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cheind","download_url":"https://codeload.github.com/cheind/py-style-transfer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheind%2Fpy-style-transfer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265829168,"owners_count":23835090,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artistic","deep","generation","image","neural-networks","pytorch","style-transfer"],"created_at":"2024-10-15T04:06:34.063Z","updated_at":"2025-07-18T20:36:34.353Z","avatar_url":"https://github.com/cheind.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## Neural style transfer\n\n![](etc/bridge_vangogh.png)\n*Style transfer applied to a picture of the Golden Gate bridge using on Vincent van Gogh's 'The Starry Night' artistic style. A result using Picasso's work can be found [here](etc/bridge_picasso.png).*\n\n**py-style-transfer** implements image style transfer as proposed by [1,4,5] using PyTorch. Given an artistic image and a content image, the method iteratively generates an image that is similar to the content but drawn in the desired artistic style. While the method is not real-time capable, it is the most flexible approach, not requiring any style pre-training expect for a readily available pre-trained convolutional architecture such as VGG. While this implementation is based on [1,4,5] we also incorporate ideas from [2,3].\n\nWe also extend the approach to two more use-cases\n - **Seamless mode** generates tiles that can be stacked vertically/horizontally without visual seams.\n - **Tiled mode** allows generation of very large images that would otherwise not fit into memory. Like [this 8192x8192 10Mb/JPEG](https://drive.google.com/file/d/1modc1iGmTUx4LGbh-ZCTZsXxjujf-eHQ/view?usp=sharing) pure Picasso artistic style image.\n\nSee the interactive [StyleTransfer.ipynb](StyleTransfer.ipynb) notebook for usage and examples.\n\n### Features\n - Various style losses such as gram-based, patch-based, semantic-based.\n - Capability to process on multiple scales.\n - Support for generating huge image sizes through tiling.\n - Support for generating images that stitch seamlessly.\n - Easily add new losses or modify the optimization through plugins.\n\n### References\n\n [1] Gatys, Leon A., Alexander S. Ecker, and Matthias Bethge. \"A neural algorithm of artistic style.\" arXiv preprint arXiv:1508.06576 (2015).\u003c/br\u003e\n [2] Johnson, Justin, Alexandre Alahi, and Li Fei-Fei. \"Perceptual losses for real-time style transfer and super-resolution.\" European Conference on Computer Vision. Springer, Cham, 2016.\u003c/br\u003e\n [3] Gatys, Leon A., et al. \"Controlling perceptual factors in neural style transfer.\" IEEE Conference on Computer Vision and Pattern Recognition (CVPR). 2017.\u003c/br\u003e\n [4] Li, Chuan, and Michael Wand. \"Combining markov random fields and convolutional neural networks for image synthesis.\" Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2016.\u003c/br\u003e\n [5] Champandard, Alex J. \"Semantic style transfer and turning two-bit doodles into fine artworks.\" arXiv preprint arXiv:1603.01768 (2016).\u003c/br\u003e\n \n\n### License\n\n```\nCopyright 2018 Christoph Heindl\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and\nassociated documentation files (the \"Software\"), to deal in the Software without restriction,\nincluding without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense\nand/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial\nportions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT\nNOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES\nOR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheind%2Fpy-style-transfer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcheind%2Fpy-style-transfer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheind%2Fpy-style-transfer/lists"}