{"id":16568099,"url":"https://github.com/imfing/sketch-to-art","last_synced_at":"2025-04-13T04:26:03.561Z","repository":{"id":44121648,"uuid":"136407341","full_name":"imfing/sketch-to-art","owner":"imfing","description":"🖼 Create artwork from your casual sketch with GAN and style transfer","archived":false,"fork":false,"pushed_at":"2023-05-14T18:58:34.000Z","size":1873,"stargazers_count":204,"open_issues_count":0,"forks_count":50,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-06T06:11:51.755Z","etag":null,"topics":["computer-vision","deep-learning","gan","pix2pix","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imfing.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}},"created_at":"2018-06-07T01:52:02.000Z","updated_at":"2025-03-07T18:23:43.000Z","dependencies_parsed_at":"2024-10-26T20:28:53.530Z","dependency_job_id":"3b749b06-cc8c-48b8-b9fc-ab4d89073a12","html_url":"https://github.com/imfing/sketch-to-art","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imfing%2Fsketch-to-art","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imfing%2Fsketch-to-art/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imfing%2Fsketch-to-art/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imfing%2Fsketch-to-art/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imfing","download_url":"https://codeload.github.com/imfing/sketch-to-art/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248662576,"owners_count":21141597,"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":["computer-vision","deep-learning","gan","pix2pix","style-transfer"],"created_at":"2024-10-11T21:08:20.861Z","updated_at":"2025-04-13T04:26:03.542Z","avatar_url":"https://github.com/imfing.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/5097752/41201696-1c1fe926-6cef-11e8-8972-b22e89dba68c.jpg\" width=\"300px\" alt=\"\"\u003e\n\u003c/p\u003e\n\n# Sketch to Art :art:\n\n\u003e You could be an artist with AI\n\n[**[Live Demo]**](https://dip.imfing.com) *Note: Only frontend is available now*\n\nOr you can [**Run with Docker**](#run-with-docker) in minutes \n\n\n* [Introduction](#introduction)\n* [Run with Docker](#run-with-docker)\n* [Theories](#theories)\n  + [Sketch Reconstruction](#sketch-reconstruction)\n  + [Style Transfer](#style-transfer)\n* [Manual Installation](#manual-installation)\n  + [Backend](#backend)\n  + [Frontend](#frontend)\n* [Acknowledgments](#acknowledgments)\n* [Authors](#authors)\n* [License](#license)\n\n\n## Introduction\n\nThis project can transform your casual sketch to beautiful painting/artwork using modern AI technology.\n\n### Screenshots\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/5097752/41201770-a6b9f35a-6cf0-11e8-8711-916f769c1c9d.jpg\" alt=\"\"\u003e\n\u003c/p\u003e\n\n## Run with Docker\n\nWith **[Docker](https://www.docker.com)**, you can quickly build and run the entire application in minutes :whale:\n\n```bash\n# 1. First, clone the repo\ngit clone https://github.com/mtobeiyf/sketch-to-art.git\ncd sketch-to-art\n\n# 2. Build Docker image\ndocker build -t sketch-to-art:dev .\n\n# 3. Run!\ndocker run -it --rm -p 8080:8080 -p 5001:5001 -p 5002:5002 sketch-to-art:dev\n```\n\nThen, go to **localhost:8080** and play with the demo! :tada:\n\n## Theories\n\nTo achieve the goal, there are mainly two steps in the pipeline:\n\n- Reconstruct and generate *real* image from the sketch\n- Arbitary style transfer to beautify the result with given result\n\n### Sketch Reconstruction\n\nThe principle behind this is called **Conditional Adversarial Networks**, known as [pix2pix](https://phillipi.github.io/pix2pix/), which is able to generate image based on the given image.\n\n![](https://user-images.githubusercontent.com/5097752/41201879-ca11fd6e-6cf2-11e8-91c3-f0cf0f1ac50d.jpg)\n\n### Style Transfer\n\nIt became known to us with the appearance of [Prisma](https://prisma-ai.com/) app. Typically, we generate an individual model for each pre-defined style. Here, we want to go further by using any new picture as the style. So, we adopted the method, [**Universal Style Transfer via Feature Transforms**](https://arxiv.org/abs/1705.08086) proposed in NIPS2017, which enables us to perform arbitary style transfer.\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/5097752/41201821-f40a5cb6-6cf1-11e8-917f-779f4055ffc5.jpg\" width=\"400px\" alt=\"\"\u003e\n\u003c/p\u003e\n\n## Manual Installation\n\n### Backend\n\nThe server side is powered by Python and Flask. You can see this [simpler example](https://github.com/mtobeiyf/keras-flask-deploy-webapp).\nNavigate to the `server` directory and all the files concerning the service and neural networks are there. The two main files:\n\n- `app_pix.py` for pix2pix translation\n- `app_stylize.py` for arbitrary style transfer\n\n#### Prerequisites\n\nMake sure you have Python installed, and some packages are needed: tensorflow, keras, pillow, flask, gevent.\nYou can use pip to install them:\n\n```bash\npip install -r server/requirements.txt\n```\n\n#### Run\n\n```bash\n# Simply run with python\npython app_xxx.py\n```\n\nAnd you could see the output indicating the port it's listening (5001 and 5002). Go to `http://localhost:5001` and you should see the returned information.\n\n### Frontend\n\nYou should installed:\n\n- [Node.js](https://nodejs.org)\n- [Yarn](https://yarnpkg.com)\n\n```\n# Clone the repo\ngit clone git@github.com:mtobeiyf/sketch-to-art.git\ncd sketch-to-art\n\n# Install dependencies\nyarn  # or npm install\n\n# Run\nyarn dev  # or npm run dev\n```\n\nOpen your favorite browser at `http://localhost:8080`, the site is there.\n\n\n## Acknowledgments\n\nThis is the final project of *Digital Image Processing* instructed by Prof. Jia Yan.\n\n* [WCT-TF](https://github.com/eridgd/WCT-TF)\n* [pix2pix-tensorflow](https://github.com/affinelayer/pix2pix-tensorflow)\n* [pytorch-CycleGAN-and-pix2pix](https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix)\n* [Neural-Style-Transfer-Papers](https://github.com/ycjing/Neural-Style-Transfer-Papers)\n* [Vue.js](https://vuejs.org/)\n\n## Authors\n\nXin Fu, Shuaibin Zhang, Tangbo Liu, Haoran Su\n\n## License\nCopyright © 2018, Fing\n\nReleased under the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimfing%2Fsketch-to-art","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimfing%2Fsketch-to-art","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimfing%2Fsketch-to-art/lists"}