{ "info": { "author": "Daniel Steinberg", "author_email": "ds@dannyadam.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX :: Linux", "Operating System :: Unix", "Programming Language :: Python :: 3", "Topic :: Artistic Software", "Topic :: Scientific/Engineering" ], "description": "pastiche\n========\n\nA PyTorch-based Python implementation of Neural Style Transfer [1].\n\n
\n \n \n
\n \n
\n\nFeatures\n--------\n\n- Support for saving intermediate images during optimization\n- An option for preserving colors from the content image\n\nInstallation\n------------\n\n#### Requirements\n\n- Python 3.5 or greater\n\n#### Install\n\n```sh\n$ pip3 install pastiche\n```\n\n#### Update\n\n```sh\n$ pip3 install --upgrade pastiche\n```\n\nUsage\n-----\n\nThe program is intended to be used from the command line.\n\nThe general command line usage is shown below.\n\n```sh\n$ pastiche CONTENT STYLE OUTPUT\n```\n\n`CONTENT` is the path to the content image, `STYLE` is the path to the style image, and `OUTPUT` is the path to save\nthe synthesized pastiche PNG file.\n\nThere are various options, including but not limited to:\n- Device (CPU versus GPU)\n- Number of optimization iterations\n- VGG layers to utilize\n- Loss function term weights\n\nFor the full list of options and the corresponding documentation, see the source code or use `--help`.\n\n```sh\n$ pastiche --help\n```\n\nExample\n-------\n\n\n\nThe image above was generated by applying the style from Vincent van Gogh's `The Starry Night` to a photo I took in\nBoston in 2015. The high-resolution image was generated incrementally, with increasing resolution, using the\ncoarse-to-fine approach described in [2]. The commands are shown below. Depending on GPU memory availability, the\ncommands may necessitate execution on a CPU (`--device cpu`).\n\n```sh\n$ pastiche \\\n --num-steps 2000 \\\n boston.jpg \\\n vangogh_starry_night.jpg \\\n pastiche0.png\n\n$ pastiche \\\n --size 1024 \\\n --num-steps 1000 \\\n --init pastiche0.png \\\n boston.jpg \\\n vangogh_starry_night.jpg \\\n pastiche1.png\n\n$ pastiche \\\n --size 2048 \\\n --num-steps 500 \\\n --init pastiche1.png \\\n boston.jpg \\\n vangogh_starry_night.jpg \\\n pastiche2.png\n\n$ pastiche \\\n --size 4096 \\\n --num-steps 100 \\\n --init pastiche2.png \\\n boston.jpg \\\n vangogh_starry_night.jpg \\\n pastiche3.png\n\n$ convert pastiche3.png pastiche.jpg # requires ImageMagick\n```\n\nThe `--preserve-color` option can be used to retain colors from the content image. The image below was generated\nusing the same commands as above (up to `--size 2048`), with the addition of `--preserve-color`.\n\n\n\nLicense\n-------\n\nThe source code has an [MIT License](https://en.wikipedia.org/wiki/MIT_License).\n\nSee [LICENSE](https://github.com/dstein64/pastiche/blob/master/LICENSE).\n\nReferences\n----------\n\n[1] Gatys, Leon A., Alexander S. Ecker, and Matthias Bethge. \"A Neural Algorithm of Artistic Style.\"\nArXiv:1508.06576 [Cs, q-Bio], August 26, 2015. http://arxiv.org/abs/1508.06576.\n\n[2] Gatys, Leon A., Alexander S. Ecker, Matthias Bethge, Aaron Hertzmann, and Eli Shechtman.\n\"Controlling Perceptual Factors in Neural Style Transfer.\" ArXiv:1611.07865 [Cs], November 23, 2016.\nhttp://arxiv.org/abs/1611.07865.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dstein64/pastiche", "keywords": "gatys,style-transfer,neural-style-transfer", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pastiche", "package_url": "https://pypi.org/project/pastiche/", "platform": "", "project_url": "https://pypi.org/project/pastiche/", "project_urls": { "Homepage": "https://github.com/dstein64/pastiche" }, "release_url": "https://pypi.org/project/pastiche/0.2.0/", "requires_dist": null, "requires_python": ">=3.5", "summary": "A PyTorch implementation of Neural Style Transfer (NST)", "version": "0.2.0" }, "last_serial": 5510039, "releases": { "0.1.5": [ { "comment_text": "", "digests": { "md5": "47a830ea77e73d74ec9138990f0854ed", "sha256": "355c4547711c064445f1dd20253ab7d77757556fb73e891ead2876458825b4c5" }, "downloads": -1, "filename": "pastiche-0.1.5.tar.gz", "has_sig": false, "md5_digest": "47a830ea77e73d74ec9138990f0854ed", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 74501717, "upload_time": "2019-06-21T03:55:53", "url": "https://files.pythonhosted.org/packages/38/e5/4c78f4f430f67c9945c7955b1620ffa70984a6d789d91afdeb94dbd8cff2/pastiche-0.1.5.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "a4ed279e7b6e74705bfdd820996efc44", "sha256": "b578c6b5f513df70ef6a11dade4a95ad55452b04c60cc42e53ba7a0d658e7422" }, "downloads": -1, "filename": "pastiche-0.2.0.tar.gz", "has_sig": false, "md5_digest": "a4ed279e7b6e74705bfdd820996efc44", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 18520865, "upload_time": "2019-07-10T03:20:37", "url": "https://files.pythonhosted.org/packages/9a/e6/75be04ff175ea01ea9bf42abaa533a1a9b8b9535eccebaea5edf13639522/pastiche-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a4ed279e7b6e74705bfdd820996efc44", "sha256": "b578c6b5f513df70ef6a11dade4a95ad55452b04c60cc42e53ba7a0d658e7422" }, "downloads": -1, "filename": "pastiche-0.2.0.tar.gz", "has_sig": false, "md5_digest": "a4ed279e7b6e74705bfdd820996efc44", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 18520865, "upload_time": "2019-07-10T03:20:37", "url": "https://files.pythonhosted.org/packages/9a/e6/75be04ff175ea01ea9bf42abaa533a1a9b8b9535eccebaea5edf13639522/pastiche-0.2.0.tar.gz" } ] }