{"id":13467576,"url":"https://github.com/fzliu/style-transfer","last_synced_at":"2025-04-08T15:04:37.516Z","repository":{"id":44339325,"uuid":"42167613","full_name":"fzliu/style-transfer","owner":"fzliu","description":"An implementation of \"A Neural Algorithm of Artistic Style\" by L. Gatys, A. Ecker, and M. Bethge. http://arxiv.org/abs/1508.06576.","archived":false,"fork":false,"pushed_at":"2017-08-30T05:57:48.000Z","size":1754,"stargazers_count":1539,"open_issues_count":29,"forks_count":385,"subscribers_count":104,"default_branch":"master","last_synced_at":"2025-04-01T13:08:15.286Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fzliu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-09T08:59:20.000Z","updated_at":"2025-03-10T21:32:19.000Z","dependencies_parsed_at":"2022-09-05T03:00:51.273Z","dependency_job_id":null,"html_url":"https://github.com/fzliu/style-transfer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fzliu%2Fstyle-transfer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fzliu%2Fstyle-transfer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fzliu%2Fstyle-transfer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fzliu%2Fstyle-transfer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fzliu","download_url":"https://codeload.github.com/fzliu/style-transfer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247867353,"owners_count":21009240,"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":[],"created_at":"2024-07-31T15:00:58.066Z","updated_at":"2025-04-08T15:04:37.491Z","avatar_url":"https://github.com/fzliu.png","language":"Python","funding_links":[],"categories":["Python","\u003ca name=\"Vision\"\u003e\u003c/a\u003e2. Vision"],"sub_categories":[],"readme":"# style-transfer\n\n## Introduction\n\nThis repository contains a pyCaffe-based implementation of \"A Neural Algorithm of Artistic Style\" by L. Gatys, A. Ecker, and M. Bethge, which presents a method for transferring the artistic style of one input image onto another. You can read the paper here: http://arxiv.org/abs/1508.06576. \n\nNeural net operations are handled by Caffe, while loss minimization and other miscellaneous matrix operations are performed using numpy and scipy. L-BFGS is used for minimization.\n\n## Requirements\n\n - Python \u003e= 2.7\n - CUDA \u003e= 6.5 (highly recommended)\n - Caffe\n\nCUDA will enable GPU-based computation in Caffe.\n\n## Download\n\nTo run the code, you must have Caffe installed and the appropriate Python bindings in your `PYTHONPATH` environment variable. Detailed installation instructions for Caffe can be found [here](http://caffe.berkeleyvision.org/installation.html).\n\nAll of the necessary code is contained in the file `style.py`. You can try it on your own style and content image by running the following command:\n\n```\npython style.py -s \u003cstyle_image\u003e -c \u003ccontent_image\u003e -m \u003cmodel_name\u003e -g 0\n```\n\nThe prototxts which come with the vanilla Caffe install aren't quite compatible with this code - working ones have already been added to this repository as a result of this. To get the pretrained models, simply run:\n\n```\nbash scripts/download_models.sh\n```\n\nThis will grab the convnet models from the links provided in the [Caffe Model Zoo](https://github.com/BVLC/caffe/wiki/Model-Zoo). You may also specify the exact model you'd like to download by running:\n\n```\nbash scripts/download_models.sh \u003cmodel_name\u003e\n```\n\nHere, `\u003cmodel_name\u003e` must be one of `vgg16`, `vgg19`, `googlenet`, or `caffenet`.\n\n## Sample\n\nOriginal images: [San Francisco](https://www.flickr.com/photos/anhgemus-photography/15377047497) by Anh Dinh, [Nanjing in winter snow, 2008](https://www.flickr.com/photos/emmajg/3199018106) by Emma Gawen, and [Blade Runner's Johannesburg](https://www.flickr.com/photos/andryn2006/19114016482) by Andrew Moore. All images were released under the Creative Comments license. Each output image was initialized with the content image, and 500 BFGS iterations under the VGG model were performed in each instance.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/fzliu/style-transfer/master/images/style/starry_night.jpg\" width=\"50%\"/\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/fzliu/style-transfer/master/images/content/sanfrancisco.jpg\" width=\"40%\"/\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/fzliu/style-transfer/master/images/results/starry_sanfrancisco.jpg\" width=\"40%\"/\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/fzliu/style-transfer/master/images/content/nanjing.jpg\" width=\"40%\"/\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/fzliu/style-transfer/master/images/results/starry_nanjing.jpg\" width=\"40%\"/\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/fzliu/style-transfer/master/images/content/johannesburg.jpg\" width=\"40%\"/\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/fzliu/style-transfer/master/images/results/starry_johannesburg.jpg\" width=\"40%\"/\u003e\n\u003c/p\u003e\n\nThese results can also be found in the `images` folder in the repository root.\n\nA more in-depth set of examples can be found [here](http://frankzliu.com/artistic-style-transfer/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffzliu%2Fstyle-transfer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffzliu%2Fstyle-transfer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffzliu%2Fstyle-transfer/lists"}