{"id":17025999,"url":"https://github.com/mtli/PhotoSketch","last_synced_at":"2026-04-13T00:30:21.634Z","repository":{"id":44380273,"uuid":"163802639","full_name":"mtli/PhotoSketch","owner":"mtli","description":"Code for Photo-Sketching: Inferring Contour Drawings from Images :dog:","archived":false,"fork":false,"pushed_at":"2023-05-10T02:44:03.000Z","size":206,"stargazers_count":477,"open_issues_count":5,"forks_count":89,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-02-19T10:12:02.424Z","etag":null,"topics":["ai","computer-vision","graphics","sketch"],"latest_commit_sha":null,"homepage":"http://www.cs.cmu.edu/~mengtial/proj/sketch/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mtli.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":"2019-01-02T06:25:26.000Z","updated_at":"2025-01-25T10:32:07.000Z","dependencies_parsed_at":"2024-10-14T07:31:45.027Z","dependency_job_id":"e178135c-bc24-41c4-9584-27d33b39f3c4","html_url":"https://github.com/mtli/PhotoSketch","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/mtli%2FPhotoSketch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtli%2FPhotoSketch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtli%2FPhotoSketch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtli%2FPhotoSketch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mtli","download_url":"https://codeload.github.com/mtli/PhotoSketch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239997240,"owners_count":19731372,"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":["ai","computer-vision","graphics","sketch"],"created_at":"2024-10-14T07:30:19.787Z","updated_at":"2026-04-13T00:30:21.486Z","avatar_url":"https://github.com/mtli.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Photo-Sketching: Inferring Contour Drawings from Images\r\n\r\n\u003cp align=\"center\"\u003e\u003cimg alt=\"Teaser\" src=\"doc/teaser.jpg\"\u003e\u003c/p\u003e\r\n\r\nThis repo contains the training \u0026 testing code for our sketch generator. We also provide a [[pre-trained model]](https://drive.google.com/file/d/1TQf-LyS8rRDDapdcTnEgWzYJllPgiXdj/view).\r\n\r\nFor technical details and the dataset, please refer to the [**[paper]**](https://arxiv.org/abs/1901.00542) and the [**[project page]**](http://www.cs.cmu.edu/~mengtial/proj/sketch/).\r\n\r\n# Setting up\r\n\r\nThe code is now updated to use PyTorch 0.4 and runs on Windows, Mac and Linux. For the obsolete version with PyTorch 0.3 (Linux only), please check out the branch [pytorch-0.3-obsolete](../../tree/pytorch-0.3-obsolete).\r\n\r\nWindows users should find the corresponding `.cmd` files instead of `.sh` files mentioned below.\r\n\r\n## One-line installation (with Conda environments)\r\n`conda env create -f environment.yml`\r\n\r\nThen activate the environment (sketch) and you are ready to go!\r\n\r\nSee [here](https://conda.io/docs/user-guide/tasks/manage-environments.html) for more information about conda environments.\r\n\r\n## Manual installation\r\nSee `environment.yml` for a list of dependencies.\r\n\r\n# Using the pre-trained model\r\n\r\n- Download the [pre-trained model](https://drive.google.com/file/d/1TQf-LyS8rRDDapdcTnEgWzYJllPgiXdj/view)\r\n- Modify the path in `scripts/test_pretrained.sh`\r\n- From the repo's **root directory**, run `scripts/test_pretrained.sh`\r\n\r\nIt supports a folder of images as input.\r\n\r\n# Train \u0026 test on our contour drawing dataset\r\n\r\n- Download the images and the rendered sketch from the [project page](http://www.cs.cmu.edu/~mengtial/proj/sketch/)\r\n- Unzip and organize them into the following structure:\r\n\u003cp align=\"center\"\u003e\u003cimg alt=\"File structure\" src=\"doc/file_structure.png\"\u003e\u003c/p\u003e\r\n\r\n- Modify the path in `scripts/train.sh` and `scripts/test.sh`\r\n- From the repo's **root directory**, run `scripts/train.sh` to train the model\r\n- From the repo's **root directory**, run `scripts/test.sh` to test on the val set or the test set (specified by the phase flag)\r\n\r\n## Citation\r\nIf you use the code or the data for your research, please cite the paper:\r\n\r\n```\r\n@article{LIPS2019,\r\n  title={Photo-Sketching: Inferring Contour Drawings from Images},\r\n  author={Li, Mengtian and Lin, Zhe and M\\v ech, Radom\\'ir and and Yumer, Ersin and Ramanan, Deva},\r\n  journal={WACV},\r\n  year={2019}\r\n}\r\n```\r\n\r\n## Acknowledgement\r\nThis code is based on an old version of [pix2pix](https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix/).\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtli%2FPhotoSketch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmtli%2FPhotoSketch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtli%2FPhotoSketch/lists"}