{"id":13807011,"url":"https://github.com/SystemErrorWang/White-box-Cartoonization","last_synced_at":"2025-05-14T00:30:49.790Z","repository":{"id":37759183,"uuid":"247693225","full_name":"SystemErrorWang/White-box-Cartoonization","owner":"SystemErrorWang","description":"Official tensorflow implementation for CVPR2020 paper “Learning to Cartoonize Using White-box Cartoon Representations”","archived":false,"fork":false,"pushed_at":"2022-10-09T12:49:22.000Z","size":45679,"stargazers_count":3977,"open_issues_count":73,"forks_count":743,"subscribers_count":74,"default_branch":"master","last_synced_at":"2025-04-13T19:49:41.342Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/SystemErrorWang.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":"2020-03-16T12:11:53.000Z","updated_at":"2025-04-10T15:44:37.000Z","dependencies_parsed_at":"2022-07-12T16:44:56.099Z","dependency_job_id":null,"html_url":"https://github.com/SystemErrorWang/White-box-Cartoonization","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/SystemErrorWang%2FWhite-box-Cartoonization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SystemErrorWang%2FWhite-box-Cartoonization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SystemErrorWang%2FWhite-box-Cartoonization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SystemErrorWang%2FWhite-box-Cartoonization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SystemErrorWang","download_url":"https://codeload.github.com/SystemErrorWang/White-box-Cartoonization/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254046206,"owners_count":22005554,"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":[],"created_at":"2024-08-04T01:01:19.369Z","updated_at":"2025-05-14T00:30:44.762Z","avatar_url":"https://github.com/SystemErrorWang.png","language":"Python","readme":"\u003cimg src='paper/shinjuku.jpg' align=\"left\" width=1000\u003e\n\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\n# [CVPR2020]Learning to Cartoonize Using White-box Cartoon Representations\n[project page](https://systemerrorwang.github.io/White-box-Cartoonization/) |   [paper](https://github.com/SystemErrorWang/White-box-Cartoonization/blob/master/paper/06791.pdf) |   [twitter](https://twitter.com/IlIIlIIIllIllII/status/1243108510423896065) |   [zhihu](https://zhuanlan.zhihu.com/p/117422157) |   [bilibili](https://www.bilibili.com/video/av56708333) |  [facial model](https://github.com/SystemErrorWang/FacialCartoonization)\n\n- Tensorflow implementation for CVPR2020 paper “Learning to Cartoonize Using White-box Cartoon Representations”.\n- Improved method for facial images are now available:\n- https://github.com/SystemErrorWang/FacialCartoonization\n\n\u003cimg src=\"images/method.jpg\" width=\"1000px\"/\u003e\n\u003cimg src=\"images/use_cases.jpg\" width=\"1000px\"/\u003e\n\n## Use cases\n\n### Scenery\n\u003cimg src=\"images/city1.jpg\" width=\"1000px\"/\u003e\n\u003cimg src=\"images/city2.jpg\" width=\"1000px\"/\u003e\n\n### Food\n\u003cimg src=\"images/food.jpg\" width=\"1000px\"/\u003e\n\n### Indoor Scenes\n\u003cimg src=\"images/home.jpg\" width=\"1000px\"/\u003e\n\n### People\n\u003cimg src=\"images/person1.jpg\" width=\"1000px\"/\u003e\n\u003cimg src=\"images/person2.jpg\" width=\"1000px\"/\u003e\n\n### More Images Are Shown In The Supplementary Materials\n\n\n## Online demo\n\n- Some kind people made online demo for this project\n- Demo link: https://cartoonize-lkqov62dia-de.a.run.app/cartoonize\n- Code: https://github.com/experience-ml/cartoonize\n- Sample Demo: https://www.youtube.com/watch?v=GqduSLcmhto\u0026feature=emb_title\n\n## Prerequisites\n\n- Training code: Linux or Windows\n- NVIDIA GPU + CUDA CuDNN for performance\n- Inference code: Linux, Windows and MacOS\n\n\n## How To Use\n\n### Installation\n\n- Assume you already have NVIDIA GPU and CUDA CuDNN installed \n- Install tensorflow-gpu, we tested 1.12.0 and 1.13.0rc0 \n- Install scikit-image==0.14.5, other versions may cause problems\n\n\n### Inference with Pre-trained Model\n\n- Store test images in /test_code/test_images\n- Run /test_code/cartoonize.py\n- Results will be saved in /test_code/cartoonized_images\n\n\n### Train\n\n- Place your training data in corresponding folders in /dataset \n- Run pretrain.py, results will be saved in /pretrain folder\n- Run train.py, results will be saved in /train_cartoon folder\n- Codes are cleaned from production environment and untested\n- There may be minor problems but should be easy to resolve\n- Pretrained VGG_19 model can be found at following url:\nhttps://drive.google.com/file/d/1j0jDENjdwxCDb36meP6-u5xDBzmKBOjJ/view?usp=sharing\n\n\n\n### Datasets\n\n- Due to copyright issues, we cannot provide cartoon images used for training\n- However, these training datasets are easy to prepare\n- Scenery images are collected from Shinkai Makoto, Miyazaki Hayao and Hosoda Mamoru films\n- Clip films into frames and random crop and resize to 256x256\n- Portrait images are from Kyoto animations and PA Works\n- We use this repo(https://github.com/nagadomi/lbpcascade_animeface) to detect facial areas\n- Manual data cleaning will greatly increace both datasets quality\n\n## Acknowledgement\n\nWe are grateful for the help from Lvmin Zhang and Style2Paints Research\n\n## License\n- Copyright (C) Xinrui Wang All rights reserved. Licensed under the CC BY-NC-SA 4.0 \n- license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode).\n- Commercial application is prohibited, please remain this license if you clone this repo\n\n## Citation\n\nIf you use this code for your research, please cite our [paper](https://systemerrorwang.github.io/White-box-Cartoonization/):\n\n@InProceedings{Wang_2020_CVPR,\nauthor = {Wang, Xinrui and Yu, Jinze},\ntitle = {Learning to Cartoonize Using White-Box Cartoon Representations},\nbooktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},\nmonth = {June},\nyear = {2020}\n}\n\n\n# 中文社区\n\n我们有一个除了技术什么东西都聊的以技术交流为主的群。如果你一次加群失败，可以多次尝试: 816096787。\n","funding_links":[],"categories":["Models with samples","Python"],"sub_categories":["Computer vision"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSystemErrorWang%2FWhite-box-Cartoonization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSystemErrorWang%2FWhite-box-Cartoonization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSystemErrorWang%2FWhite-box-Cartoonization/lists"}