{"id":18663770,"url":"https://github.com/mukosame/aoda","last_synced_at":"2025-10-20T06:38:44.986Z","repository":{"id":65925504,"uuid":"358447360","full_name":"Mukosame/AODA","owner":"Mukosame","description":"Official implementation of \"Adversarial Open Domain Adaptation for Sketch-to-Photo Synthesis\"(WACV 2022/CVPRW 2021)","archived":false,"fork":false,"pushed_at":"2021-12-26T04:11:42.000Z","size":9921,"stargazers_count":82,"open_issues_count":6,"forks_count":11,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-25T19:11:18.786Z","etag":null,"topics":["computer-vision","cvpr","cvpr2021","deep-learning","gan","gans","image-generation","image-manipulation","image2image","open-domain","pytorch","sketch","wacv","wacv2022"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","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}},"created_at":"2021-04-16T02:04:08.000Z","updated_at":"2025-03-16T17:49:47.000Z","dependencies_parsed_at":"2023-02-16T15:46:29.720Z","dependency_job_id":null,"html_url":"https://github.com/Mukosame/AODA","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%2FAODA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mukosame%2FAODA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mukosame%2FAODA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mukosame%2FAODA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mukosame","download_url":"https://codeload.github.com/Mukosame/AODA/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248483125,"owners_count":21111429,"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","cvpr","cvpr2021","deep-learning","gan","gans","image-generation","image-manipulation","image2image","open-domain","pytorch","sketch","wacv","wacv2022"],"created_at":"2024-11-07T08:19:43.073Z","updated_at":"2025-10-20T06:38:39.945Z","avatar_url":"https://github.com/Mukosame.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AODA\n\nBy [Xiaoyu Xiang](https://engineering.purdue.edu/people/xiaoyu.xiang.1), [Ding Liu](https://scholar.google.com/citations?user=PGtHUI0AAAAJ), [Xiao Yang](https://scholar.google.com/citations?user=_MAKSLkAAAAJ\u0026hl=en), [Yiheng Zhu](https://www.etc.cmu.edu/blog/author/yihengz/), [Xiaohui Shen](https://xiaohuishen.github.io/), [Jan P. Allebach](https://engineering.purdue.edu/~allebach/)\n\nThis is the official Pytorch implementation of _Adversarial Open Domain Adaptation for Sketch-to-Photo Synthesis_.\n\n#### [Paper](https://arxiv.org/abs/2104.05703) | [10-min Video (10 min)](https://www.youtube.com/watch?v=9PUO55s4kRQ) | [5-min Video](https://www.bilibili.com/video/BV1DY411x7Pu)\n\n![aoda](./dump/aoda.png)\n\n## Updates\n\n- **Our paper will be presented on WACV-2022 on Jan 5, 19:30 pm GMT-10. Welcome to come and ask questions!**\n- 2021.12.26: Edit some comments of the code.\n- 2021.12.25: Upload all codes. Merry Christmas!\n- 2021.12.21: Update the LICENSE and repo contents.\n- 2021.4.15: Create the repo\n\n## Contents\n\n0. [Introduction](#introduction)\n1. [Prerequisites](#Prerequisites)\n2. [Get Started](#Get-Started)\n   - [Installation](#Installation)\n   - [Data Preparation](#data-preparation)\n   - [Training](#Training)\n   - [Testing](#Testing)\n3. [Contact](#Contact)\n4. [License](#License)\n5. [Citations](#citations)\n6. [Acknowledgments](#Acknowledgments)\n\n## Introduction\n\nThe repository contains the entire project (including all the util scripts) for our open domain sketch-to-photo synthesis network, AODA.\n\nAODA aims to synthesize a realistic photo from a freehand sketch with its class label, even if the sketches of that class are missing in the training data. It is accepted by [WACV-2022](https://wacv2022.thecvf.com/home) and [CVPR Workshop-2021](https://l2id.github.io/). The most updated paper with supplementary materials can be found at [arXiv](https://arxiv.org/abs/2104.05703).\n\nIn AODA, we propose a simple yet effective open-domain sampling and optimization strategy to \"fool\" the generator into treating fake sketches as real ones. To achieve this goal, we adopt a framework that jointly learns sketch-to-photo and photo-to-sketch generation. Our approach shows impressive results in synthesizing realistic color, texture, and maintaining the geometric composition for various categories of open-domain sketches.\n\nIf our proposed architectures also help your research, please consider [citing our paper](#Citations).\n\n![framework](./dump/framework.png)\n\n## Prerequisites\n\n- Linux or macOS\n- Python 3 (Recommend to use [Anaconda](https://www.anaconda.com/download/#linux))\n- CPU or NVIDIA GPU + CUDA CuDNN\n\n## Get Started\n\n### Installation\n\nFirst, clone this repository:\n\n```Shell\ngit clone https://github.com/Mukosame/AODA.git\n```\n\nInstall the required packages: `pip install -r requirements.txt`.\n\n### Data Preparation\n\nThere are three datasets used in this paper: Scribble, SketchyCOCO, and QMUL-Sketch:\n\n**Scribble**:\n\n```Shell\nwget -N \"http://www.robots.ox.ac.uk/~arnabg/scribble_dataset.zip\"\n```\n\n**SketchyCOCO**:\n\nDownload from [Google Drive](https://drive.google.com/file/d/1P2kb1SCqnZrK_P32Vmcf5FShjbC9kN7e/view).\n\n**QMUL-Sketch**:\n\nThis dataset includes three datasets: handbags with 400 photos and sketches, ShoeV2 with 2000 photos and 6648 sketches, and ChairV2 with 400 photos and 1297 sketches. The complete dataset can be downloaded through [Google Drive](https://drive.google.com/file/d/18jWDOUr5zfFQphLzAxeWx0H50GigZ7l3/view?usp=sharing).\n\n### Training\n\nTrain an AODA model:\n\n```Shell\npython train.py --dataroot ./dataset/scribble_10class_open/ \\\n                --name scribble_aoda \\\n                --model aoda_gan \\\n                --gan_mode vanilla \\\n                --no_dropout \\\n                --n_classes 10 \\\n                --direction BtoA \\\n                --load_size 260\n```\n\nAfter training, your models `models/latest_net_G_A.pth`, `models/latest_net_G_B.pth` and its training states `states/latest.state`, and a corresponding log file `train_scribble_aoda_xxx` are placed in the directory of `./checkpoints/scribble_aoda/`.\n\n### Testing\n\nPlease download the weights from [GoogleDrive], and put it into the [weights/](weights/) folder.\n\nYou can switch the `--model_suffix` to control the direction of sketch-to-photo or photo-to-sketch synthesis. For different datasets, you need to change the `--name` and the corresponding `--n_classes`:\n\n```Shell\npython test.py --model_suffix _B --dataroot ./dataset/scribble/testA --name scribble_aoda --model test --phase test --no_dropout --n_classes 10\n```\n\nYour test results will be saved at `./results/test_latest/`.\n\n## Contact\n\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\n\nThis project is released under the [BSD-3 Clause License](LICENSE).\n\n## Citations\n\n```BibTex\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\n## Acknowledgments\n\nThis project is based on the [CycleGAN PyTorch](https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmukosame%2Faoda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmukosame%2Faoda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmukosame%2Faoda/lists"}