{"id":13740743,"url":"https://github.com/Mukosame/Anime2Sketch","last_synced_at":"2025-05-08T20:32:50.815Z","repository":{"id":37440780,"uuid":"356085273","full_name":"Mukosame/Anime2Sketch","owner":"Mukosame","description":"A sketch extractor for anime/illustration.","archived":false,"fork":false,"pushed_at":"2023-08-16T06:44:46.000Z","size":17663,"stargazers_count":2012,"open_issues_count":7,"forks_count":169,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-04-07T20:11:11.187Z","etag":null,"topics":["anime","comic","computer-vision","deep-learning","gan","gans","generative-adversarial-network","gradio","image-generation","manga","pytorch","sketch","wacv"],"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/Mukosame.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}},"created_at":"2021-04-09T00:26:49.000Z","updated_at":"2025-04-04T01:10:56.000Z","dependencies_parsed_at":"2024-01-07T18:09:52.877Z","dependency_job_id":null,"html_url":"https://github.com/Mukosame/Anime2Sketch","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/Mukosame%2FAnime2Sketch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mukosame%2FAnime2Sketch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mukosame%2FAnime2Sketch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mukosame%2FAnime2Sketch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mukosame","download_url":"https://codeload.github.com/Mukosame/Anime2Sketch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253145079,"owners_count":21861184,"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":["anime","comic","computer-vision","deep-learning","gan","gans","generative-adversarial-network","gradio","image-generation","manga","pytorch","sketch","wacv"],"created_at":"2024-08-03T04:00:51.796Z","updated_at":"2025-05-08T20:32:45.796Z","avatar_url":"https://github.com/Mukosame.png","language":"Python","funding_links":[],"categories":["Image Generation","人像\\姿势\\3D人脸","Python"],"sub_categories":["网络服务_其他"],"readme":"# Anime2Sketch\n*Anime2Sketch: A sketch extractor for illustration, anime art, manga*\n\nBy [Xiaoyu Xiang](https://engineering.purdue.edu/people/xiaoyu.xiang.1)\n\n![teaser demo](demos/vinland_saga.gif)\n\n\n## Updates\n- 2022.1.14: Add Docker environment by [**kitoria**](https://github.com/kitoriaaa)\n- 2021.12.25: Update README. Merry Christmas!\n- 2021.5.24: Fix an interpolation error and a GPU inference error.\n- 2021.5.12: [Web Demo](https://gradio.app/g/AK391/Anime2Sketch) by [**AK391**](https://github.com/AK391)\n![gradio_web_demo](figures/gradiodemo.png)\n- 2021.5.2: Upload more example results of anime video.\n- 2021.4.30: Upload the test scripts. Now our repo is ready to run!\n- 2021.4.11: Upload the pretrained weights, and more test results.\n- 2021.4.8: Create the repo.\n\n## Introduction\nThe repository contains the testing codes and pretrained weights for Anime2Sketch.\n\nAnime2Sketch is a sketch extractor that works well on illustration, anime art, and manga. It is an application based on the paper [\"Adversarial Open Domain Adaption for Sketch-to-Photo Synthesis\"](https://arxiv.org/abs/2104.05703).\n\n## Prerequisites\n- Linux, macOS, Docker\n- Python 3 (Recommend to use [Anaconda](https://www.anaconda.com/download/#linux))\n- CPU or NVIDIA GPU + CUDA CuDNN\n- [Pillow](https://pillow.readthedocs.io/en/stable/), [PyTorch](https://pytorch.org/)\n\n\n## Get Started\n### Installation \nInstall the required packages: ```pip install -r requirements.txt```\n\n### Download Pretrained Weights\nPlease download the weights from [GoogleDrive](https://drive.google.com/drive/folders/1Srf-WYUixK0wiUddc9y3pNKHHno5PN6R?usp=sharing), and put it into the [weights/](weights/) folder.\n\nWe also have an **artifact-free** version of the model which works with dark / low contrast images. You can download the weights from [GoogleDrive](https://drive.google.com/file/d/1cf90_fPW-elGOKu5mTXT5N1dum-XY_46/view?usp=sharing), and put it into [weights/](weights/) folder.\n\n### Test\n```Shell\npython3 test.py --dataroot /your_input/dir --load_size 512 --output_dir /your_output/dir\n```\nThe above command includes three arguments:\n- dataroot: your test file or directory\n- load_size: due to the memory limit, we need to resize the input image before processing. By default, we resize it to `512x512`.\n- output_dir: path of the output directory\n\nRun our example:\n```Shell\npython3 test.py --dataroot test_samples/madoka.jpg --load_size 512 --output_dir results/\n```\n\n### Docker\nIf you want to run on Docker, you can easily do so by customizing the input/output images directory.  \nBuild docker image  \n```Shell\nmake docker-build\n```\n\nSetting input/output directory  \nYou can customize mount volumes for input/output images by Makefile. Please setting your target directory.  \n```\ndocker run -it --rm --gpus all -v `pwd`:/workspace -v {your_input_dir}:/input -v {your_output_dir}:/output anime2sketch\n```\n\nexample:  \n```\ndocker run -it --rm --gpus all -v `pwd`:/workspace -v `pwd`/test_samples:/input -v `pwd`/output:/output anime2sketch\n```\n\nRun  \n```Shell\nmake docker-run\n```\n\nif you want to run **cpu only**, you will need to fix two things (remove gpu options).\n- Dockerfile CMD line to ```CMD [ \"python\", \"test.py\", \"--dataroot\", \"/input\", \"--load_size\", \"512\", \"--output_dir\", \"/output\" ]``` \n- Makefile docker-run line to ```docker run -it --rm -v `pwd`:/workspace -v `pwd`/images/input:/input -v `pwd`/images/output:/output anime2sketch```\n\n### Train\nThis project is a sub-branch of [AODA](https://github.com/Mukosame/AODA). Please check it for the training instructions.\n\n## More Results\nOur model works well on illustration arts:\n![madoka demo](demos/madoka_in_out.png)\n![demo1](demos/demo1_in_out.png)\nTurn handrawn photos to clean linearts:\n![demo2](demos/demo2_in_out.png)\nSimplify freehand sketches:\n![demo3](demos/demo3_in_out.png)\nAnd more anime results:\n![demo4](demos/vinland_3.gif)\n![demo5](demos/vinland_1.gif)\n\n## Contact\n[Xiaoyu Xiang](https://engineering.purdue.edu/people/xiaoyu.xiang.1).\n\nYou can also leave your questions as issues in the repository. I will be glad to answer them!\n\n## License\nThis project is released under the [MIT License](LICENSE).\n\n## Citations\n```BibTex\n@misc{Anime2Sketch,\n  author = {Xiaoyu Xiang, Ding Liu, Xiao Yang, Yiheng Zhu, Xiaohui Shen},\n  title = {Anime2Sketch: A Sketch Extractor for Anime Arts with Deep Networks},\n  year = {2021},\n  publisher = {GitHub},\n  journal = {GitHub repository},\n  howpublished = {\\url{https://github.com/Mukosame/Anime2Sketch}}\n}\n\n@inproceedings{xiang2022adversarial,\n  title={Adversarial Open Domain Adaptation for Sketch-to-Photo Synthesis},\n  author={Xiang, Xiaoyu and Liu, Ding and Yang, Xiao and Zhu, Yiheng and Shen, Xiaohui and Allebach, Jan P},\n  booktitle={Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision},\n  year={2022}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMukosame%2FAnime2Sketch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMukosame%2FAnime2Sketch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMukosame%2FAnime2Sketch/lists"}