{"id":17225667,"url":"https://github.com/chaofengc/face-sketch-wild","last_synced_at":"2025-10-15T09:59:00.316Z","repository":{"id":109750303,"uuid":"112451216","full_name":"chaofengc/Face-Sketch-Wild","owner":"chaofengc","description":"Semi-Supervised Learning for Face Sketch Synthesis in the Wild, ACCV2018","archived":false,"fork":false,"pushed_at":"2024-07-10T01:40:12.000Z","size":1487,"stargazers_count":88,"open_issues_count":1,"forks_count":24,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-26T12:46:37.628Z","etag":null,"topics":[],"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/chaofengc.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":"2017-11-29T08:58:28.000Z","updated_at":"2024-09-18T11:53:28.000Z","dependencies_parsed_at":"2024-07-10T05:05:00.665Z","dependency_job_id":null,"html_url":"https://github.com/chaofengc/Face-Sketch-Wild","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/chaofengc%2FFace-Sketch-Wild","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaofengc%2FFace-Sketch-Wild/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaofengc%2FFace-Sketch-Wild/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaofengc%2FFace-Sketch-Wild/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chaofengc","download_url":"https://codeload.github.com/chaofengc/Face-Sketch-Wild/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248611391,"owners_count":21133103,"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-10-15T04:14:10.985Z","updated_at":"2025-10-15T09:58:55.273Z","avatar_url":"https://github.com/chaofengc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Face Sketch Synthesis in the Wild\n\nPyTorch implementation for face sketch synthesis in the wild through semi-supervised learning. Here is an example:\n\n![](example_img.png)\n\n[**Semi-Supervised Learning for Face Sketch Synthesis in the Wild.**](https://arxiv.org/abs/1812.04929)  \n[Chaofeng Chen](https://chaofengc.github.io), [Wei Liu](http://www.visionlab.cs.hku.hk/people.html), [Xiao Tan](http://www.xtan.org/), [Kwan-Yee K. Wong](http://i.cs.hku.hk/~kykwong/).   \n\n# Getting Started\n\n## Prerequisite\n- Pytorch 0.3\n- torchvision 0.2\n- opencv-python\n- matlab_wrapper\n- Matlab (For FSIM evaluation)\n\n## Datasets\n- We use [CUFS](http://mmlab.ie.cuhk.edu.hk/archive/facesketch.html) and [CUFSF](http://mmlab.ie.cuhk.edu.hk/archive/cufsf/) dataset provided by Chinese University of Hong Kong (CUHK) to train our networks. You can also download them from [HERE](http://www.ihitworld.com/RSLCR.html).\n- For the training of in the wild images, we use a subset of VGG-Face.\n\n## Usage\n\n### Download.\nDownload the datasets and pretrained models using the following scripts.\n```\nbash download_data_models.sh\n```\nDownload the precalculated features for fast patch matching.\n```\nbash download_feature.sh\n```\nIf the server is not available, you can also download the resources from [BaiduYun](https://pan.baidu.com/s/1pKpSVj7trJhxXVp7MoECaA) or [GoogleDrive](https://drive.google.com/drive/folders/1CxURCNxV1MbfYRNLq3PFcQkBouP0MSUX?usp=sharing), and then extract the files to the corresponding directory according to the download scripts above.\n\n### Quick Test\nAfter download the datasets and pretrain models, use the provided script to test the model\n```\npython test.py 1  # Test on CUFS test set\npython test.py 2  # Test on CUFSF test set\npython test.py 3  # Test on CUHK_Student test set\npython test.py 4  # Test on VGG test set\n```\nYou can also test on your own test dataset. Simply change the `--test_dir` and `--test_weight_path`. If you have ground truth images, you can also specify `--test_gt_dir`.\n\n### Train\n1. Configure training process.\n- `vgg_select_num [0 or 10]`. `0`: no extra images in training. `10`: extra VGG-Face in training. **Only the largest vgg10 is provided here**.  \n- `train_style [cufs, cufsf]`. use `cufs` or `cufsf` as the reference style.  \n\n**The models in the paper are trained under 3 configurations**:\n- `--vgg_select_num 0 --train_style cufs`. Model evaluated on CUFS. \n- `--vgg_select_num 0 --train_style cufsf`. Model evaluated on CUFSF. \n- `--vgg_select_num 10 --train_style cufs`. Model evaluated on VGG-Face. \n\n2. Train the model.\n```\npython train.py\n```\n\n# Citation\n\nIf you find this code or the provided data useful in your research, please consider cite:\n```\n@inproceedings{chen2018face-sketch-wild,\n    title={Semi-Supervised Learning for Face Sketch Synthesis in the Wild},\n    author={Chen, Chaofeng and Liu, Wei and Tan, Xiao and Wong, Kwan-Yee~K.},\n    booktitle={Asian Conference on Computer Vision (ACCV)},\n    year={2018},\n}\n```\n\n# Resources\n\n[1] [Random Sampling and Locality Constraint for Face Sketch Synthesis](http://www.ihitworld.com/RSLCR.html)  \n[2] [Real-Time Exemplar-Based Face Sketch Synthesis](https://ybsong00.github.io/eccv14/index.html)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaofengc%2Fface-sketch-wild","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchaofengc%2Fface-sketch-wild","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaofengc%2Fface-sketch-wild/lists"}