{"id":31750528,"url":"https://github.com/emla2805/fast-style-transfer","last_synced_at":"2025-10-09T15:52:52.738Z","repository":{"id":39736858,"uuid":"194511977","full_name":"emla2805/fast-style-transfer","owner":"emla2805","description":"Fast Style Transfer using Tensorflow 2","archived":false,"fork":false,"pushed_at":"2023-03-25T00:18:29.000Z","size":157930,"stargazers_count":9,"open_issues_count":3,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-08-21T15:11:55.664Z","etag":null,"topics":["fast-neural-style","style-transfer","tensorflow"],"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/emla2805.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":"2019-06-30T12:12:02.000Z","updated_at":"2022-10-10T01:25:30.000Z","dependencies_parsed_at":"2022-08-28T06:40:09.843Z","dependency_job_id":null,"html_url":"https://github.com/emla2805/fast-style-transfer","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/emla2805/fast-style-transfer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emla2805%2Ffast-style-transfer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emla2805%2Ffast-style-transfer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emla2805%2Ffast-style-transfer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emla2805%2Ffast-style-transfer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emla2805","download_url":"https://codeload.github.com/emla2805/fast-style-transfer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emla2805%2Ffast-style-transfer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001642,"owners_count":26083147,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"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":["fast-neural-style","style-transfer","tensorflow"],"created_at":"2025-10-09T15:52:50.657Z","updated_at":"2025-10-09T15:52:52.727Z","avatar_url":"https://github.com/emla2805.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fast Style Transfer\n\nTensorflow 2 implementation of Fast Style Transfer which merges the style of one picture with the content of another.\n\nThe algorithm is based on [Perceptual Losses for Real-Time Style Transfer and Super-Resolution](https://arxiv.org/abs/1603.08155) \nwith the addition of [Instance Normalization](https://arxiv.org/pdf/1607.08022.pdf).\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"images/content/amber.jpg\" height=\"200px\"\u003e\n    \u003cimg src=\"images/style/wave.jpg\" height=\"200px\"\u003e\n    \u003cimg src=\"images/output/wave-styled.png\" height=\"440px\"\u003e\n\u003c/p\u003e\n\n## Requirements\n\nCreate a Python 3.7 virtual environment and activate it:\n\n```bash\nvirtualenv -p python3.7 venv\nsource ./venv/bin/activate\n```\n\nNext, install the required dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\n## Usage\n\nTo style an image using a pre-trained model specify the input and output image paths and the log directory containing model checkpoints.\n\n### Style image\n\n```bash\npython style.py \\\n    --image-path images/content/amber.jpg \\\n    --log-dir models/mosaic/lr=0.001_bs=16_sw=10.0_cw=10.0/ \\\n    --output-path images/output/output-image.png\n```\n\n### Train model\n\n```bash\npython train.py \\\n    --log-dir models/mosaic/ \\\n    --style-image images/style/mosaic.jpg \\\n    --test-image images/content/amber.jpg\n```\n\nTraining, which uses the COCO 2014 train dataset, takes about 1-2 hours on a Tesla P100 GPU.\n\nTo track metrics, start `Tensorboard`\n\n```bash\ntensorboard --logdir models/\n```\n\nand navigate to [localhost:6006](localhost:6006).\n\n## Example models\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"images/content/amber.jpg\" height=\"174px\"\u003e\t\t\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"images/style/mosaic.jpg\" height=\"174px\"\u003e\n  \u003cimg src=\"images/output/mosaic-styled.png\" height=\"174px\"\u003e\n  \u003cimg src=\"images/output/wave-styled.png\" height=\"174px\"\u003e\n  \u003cimg src=\"images/style/wave.jpg\" height=\"174px\" width=\"174px\"\u003e\n  \u003cbr\u003e\n  \u003cimg src=\"images/style/the-scream.jpg\" height=\"174px\"\u003e\n  \u003cimg src=\"images/output/the-scream-styled.png\" height=\"174px\"\u003e\n  \u003cimg src=\"images/output/udnie-styled.png\" height=\"174px\"\u003e\n  \u003cimg src=\"images/style/udnie.jpg\" height=\"174px\"\u003e\n\u003c/div\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femla2805%2Ffast-style-transfer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femla2805%2Ffast-style-transfer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femla2805%2Ffast-style-transfer/lists"}