{"id":26507492,"url":"https://github.com/milescb/neuralstyletransfer","last_synced_at":"2026-04-19T03:01:38.943Z","repository":{"id":122356722,"uuid":"572480825","full_name":"milescb/NeuralStyleTransfer","owner":"milescb","description":"Neural style transfer using RNN. Final project for art course!","archived":false,"fork":false,"pushed_at":"2022-12-13T14:37:41.000Z","size":6810,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-25T11:45:38.811Z","etag":null,"topics":["convolutional-neural-networks","deep-learning","neural-network","python","style-transfer"],"latest_commit_sha":null,"homepage":"","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/milescb.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,"governance":null}},"created_at":"2022-11-30T11:17:43.000Z","updated_at":"2023-02-14T01:05:29.000Z","dependencies_parsed_at":"2023-07-29T22:46:50.801Z","dependency_job_id":"cff92ce1-be9e-4bb9-8625-904d9aee0c91","html_url":"https://github.com/milescb/NeuralStyleTransfer","commit_stats":null,"previous_names":["milescb/neuralstyletransfer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/milescb/NeuralStyleTransfer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milescb%2FNeuralStyleTransfer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milescb%2FNeuralStyleTransfer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milescb%2FNeuralStyleTransfer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milescb%2FNeuralStyleTransfer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/milescb","download_url":"https://codeload.github.com/milescb/NeuralStyleTransfer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milescb%2FNeuralStyleTransfer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31992822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["convolutional-neural-networks","deep-learning","neural-network","python","style-transfer"],"created_at":"2025-03-20T23:20:02.380Z","updated_at":"2026-04-19T03:01:38.915Z","avatar_url":"https://github.com/milescb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Neural Style Transfer\n\nHere, we follow the implementation given in [this Tensorflow example](https://blog.tensorflow.org/2018/08/neural-style-transfer-creating-art-with-deep-learning.html). We had to edit this code in order to run properly following, to some extent, the implementation given [here](https://github.com/ravising-h/Neural-Style-Transfer). The main idea is to use a convolution neural network (CNN) to map the style from one picture onto the other. This is made possible with the pre-trained network `VGG19` in `Tensorflow`. This network takes as an input the pixels and RBG colors for each pixel of both an original image and a style image, thus transfering the style onto the original photo. Note that I did not write the majority of the functions in `StyleTransfer.py` but rather corrected several bugs here and collected the code into an easily useable format. See below for the methods implemented for running the code. \n\n## Subject: the City of Berlin, Styles: various from German 20th centrury art\n\nThis project is done specifically for an art class I took in Berlin while studying abroad. In the class, we discussed art styles and movements from the 20th centry in Germany. My final project was focused on using these art styles and applying them to pictures I took around Berlin. \n\n### Subject Photos\n\nI choose as my subject matter the following photos of iconic Berlin scenes:\n\n1. Haus das Lehers mit Fernsehturm in Hintergrund\n\n\u003cimg src=\"https://github.com/lvb5/NeuralStyleTransfer/blob/master/original_content/fernsehturm.jpeg\" width=300) /\u003e\n\n2. Brandenburger Tor und Pariser Platz\n\n\u003cimg src=\"https://github.com/lvb5/NeuralStyleTransfer/blob/master/original_content/pariser_platz.jpeg\" width=300) /\u003e\n\n3. Pieta in Neuewache \n\n\u003cimg src=\"https://github.com/lvb5/NeuralStyleTransfer/blob/master/original_content/neue_wache.jpeg\" width=300 /\u003e\n\n### Photos for Style\n\nI choose the following photos to apply styles\n\n1. Deutsche Expressionismus: Marianne von Werefkin. Die rote Stadt, Tempera auf Pappe, 1902. \n\n\u003cimg src=\"https://github.com/lvb5/NeuralStyleTransfer/blob/master/styles/expressionismus.png\" width=300 /\u003e\n\n2. Suprematismus von Kasimir Sewerinowitsch Malewitsch\n\n\u003cimg src=\"https://github.com/lvb5/NeuralStyleTransfer/blob/master/styles/suprematismus.jpg\" width=300 /\u003e\n\n3. Sascha Wiederhold Gemalde, _Figuren im Raum_, 1928, Öl auf Karton auf Leinwand. \n\n\u003cimg src=\"https://github.com/lvb5/NeuralStyleTransfer/blob/master/styles/wiederhold.jpeg\" width=300 /\u003e\n\n### Results of Style Transfer\n\nThe results are the style transfer are shown below for each photo and each style. Styles are arranged in the order above. \n\n1. \n\n\u003cimg class=\"image-align-left\" src=\"https://github.com/lvb5/NeuralStyleTransfer/blob/master/finished_product/tv_and_exp/final.jpeg\" width=250/\u003e\u003cimg class=\"image-align-left\" src=\"https://github.com/lvb5/NeuralStyleTransfer/blob/master/finished_product/tv_and_suprematismus/final.jpeg\" width=250\u003e\u003cimg class=\"image-align-left\" src=\"https://github.com/lvb5/NeuralStyleTransfer/blob/master/finished_product/tv_and_wiederhold/final.jpeg\" width=250\u003e\n\n2. \n\n\u003cimg class=\"image-align-left\" src=\"https://github.com/lvb5/NeuralStyleTransfer/blob/master/finished_product/bt_and_exp/final.jpeg\" width=250/\u003e\u003cimg class=\"image-align-left\" src=\"https://github.com/lvb5/NeuralStyleTransfer/blob/master/finished_product/bt_and_suprematismus/final.jpeg\" width=250\u003e\u003cimg class=\"image-align-left\" src=\"https://github.com/lvb5/NeuralStyleTransfer/blob/master/finished_product/bt_and_wiederhold/final.jpeg\" width=250\u003e\n\n3. \n\n\u003cimg class=\"image-align-left\" src=\"https://github.com/lvb5/NeuralStyleTransfer/blob/master/finished_product/nw_and_exp/final.jpeg\" width=250/\u003e\u003cimg class=\"image-align-left\" src=\"https://github.com/lvb5/NeuralStyleTransfer/blob/master/finished_product/nw_and_suprematismus/final.jpeg\" width=250\u003e\u003cimg class=\"image-align-left\" src=\"https://github.com/lvb5/NeuralStyleTransfer/blob/master/finished_product/nw_and_wiederhold/final.jpeg\" width=250\u003e\n\nAll the above photos are created with a learning rate of 10.0 over 500 epochs of training. This takes approximately 17 minutes to complete on a M1 mac with 16GB of RAM. \n\n## Running the code\n\nAll required files to run can be found in the `requirements.txt` file. To run the code, create a virtual environment and install the packages via\n\n```\npython3 -m venv \u003cpath_to_new_env\u003e\nsource \u003cpath_to_new_env\u003e/bin/activate\npip install -r requirements.txt\n```\nThe code then runs out of the box with the following commands:\n\n```\npython3 perform_transfer.py\n```\n\nPossible command-line arguments are\n\n```\npython3 perform_transfer.py --nEpochs=100 --learning_rate=10.0 --content_path=\u003cpath_to_content\u003e --style_path=\u003cpath_to_styles\u003e --save_folder=\u003cpath_to_save_folder\u003e --display_num=10\n```\n\n## Preparing Photos\n\nBoth style and content photos _must_ be the same dimension in order to run. In order to not consume too much memory / time in training, photos should be 500x500 pixels or smaller. After preparing photos as such, put them in appropriate folders and run the code!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilescb%2Fneuralstyletransfer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmilescb%2Fneuralstyletransfer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilescb%2Fneuralstyletransfer/lists"}