{"id":18396922,"url":"https://github.com/williamyang1991/tet-gan","last_synced_at":"2025-04-13T05:39:21.052Z","repository":{"id":59662147,"uuid":"163782300","full_name":"williamyang1991/TET-GAN","owner":"williamyang1991","description":"[AAAI 2019] TET-GAN: Text Effects Transfer via Stylization and Destylization","archived":false,"fork":false,"pushed_at":"2024-07-07T03:16:14.000Z","size":2650,"stargazers_count":97,"open_issues_count":4,"forks_count":25,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-26T22:12:53.705Z","etag":null,"topics":["aaai2019","gan","style-transfer","text-effect","text-effects"],"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/williamyang1991.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-02T01:57:17.000Z","updated_at":"2025-02-15T13:07:06.000Z","dependencies_parsed_at":"2024-12-16T12:29:59.447Z","dependency_job_id":"a436c862-13e3-47b0-afd8-d3eed9be2962","html_url":"https://github.com/williamyang1991/TET-GAN","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/williamyang1991%2FTET-GAN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamyang1991%2FTET-GAN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamyang1991%2FTET-GAN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamyang1991%2FTET-GAN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/williamyang1991","download_url":"https://codeload.github.com/williamyang1991/TET-GAN/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248670506,"owners_count":21142897,"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":["aaai2019","gan","style-transfer","text-effect","text-effects"],"created_at":"2024-11-06T02:15:16.055Z","updated_at":"2025-04-13T05:39:20.859Z","avatar_url":"https://github.com/williamyang1991.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://github.com/williamyang1991/TET-GAN/blob/master/imgs/teaser.png\" width=\"80%\" height=\"80%\"\u003e\n\n# TET-GAN\n\nThis is a pytorch implementation of the paper.\n\nShuai Yang, Jiaying Liu, Wenjing Wang and Zongming Guo.\nTET-GAN: Text Effects Transfer via Stylization and Destylization, \nAccepted by AAAI Conference on Artificial Intelligence (AAAI), 2019.\n\n[[Project]](http://www.icst.pku.edu.cn/struct/Projects/TETGAN.html) | [[Paper]](https://arxiv.org/abs/1812.06384) | [[Dataset]](https://williamyang1991.github.io/projects/AAAI2019/TETGAN.html)\n\nIt is provided for educational/research purpose only. Please consider citing our paper if you find the software useful for your work.\n\n\n## Usage: \n\n#### Prerequisites\n- Python 2.7\n- Pytorch 0.4.1\n- matplotlib\n- scipy\n- opencv-python\n- Pillow\n\n#### Install\n- Clone this repo:\n```\ngit clone https://github.com/williamyang1991/TET-GAN.git\ncd TET-GAN/src\n```\n## Testing Example\n\n- Download a pre-trained model from [[Google Drive]](https://drive.google.com/file/d/1pNOE4COeoXp_-N4IogNS-GavCBbZJtw1/view?usp=sharing) or [[Baidu Cloud]](https://pan.baidu.com/s/1yK6wM0famUwu25s1v92Emw) to `../save/`\n- Style Transfer with default parameters\n  - Results can be found in `../output/`\n\n\u003cimg src=\"https://github.com/williamyang1991/TET-GAN/blob/master/imgs/example.jpg\" width=\"50%\" height=\"50%\"\u003e\n\n```\npython test.py\n```\n- Destylization with default parameters\n```\npython test.py --c2s 0\n```\n- Transfer the style of `26.jpg` onto the text image `2.png` and save the result as `26_2.png`\n```\npython test.py --style_name ../data/style/26.png --content_name ../data/content/2.png --name 26_2.png\n```\n- For black and white text images, use option `--content_type 1`\n```\npython test.py --style_name ../data/style/1.png --content_name ../data/content/4.png --content_type 1\n```\n\n## Training Examples\n\n### Full Training\n\n- Prepare dataset in `../data/dataset/` where the images are arranged in this way (See [[Dataset]](https://williamyang1991.github.io/projects/AAAI2019/TETGAN.html) for one example)\n```\ndataset/style1/train/1.png\ndataset/style1/train/2.png\n...\ndataset/style2/train/1.png\ndataset/style2/train/2.png\n...\n```\n  - The training image consists of a text image and a style image as follows\n \n \u003cimg src=\"https://github.com/williamyang1991/TET-GAN/blob/master/data/oneshotstyle/1-train.png\" width=\"30%\" height=\"30%\"\u003e\n\n- Train TET-GAN with default parameters\n```\npython train.py \n```\nSaved model can be found at `../save/`\n- Use `--help` to view more training options\n```\npython train.py --help\n```\n  \n### Oneshot Training\n\n- Download a pre-trained model from [[Google Drive]](https://drive.google.com/file/d/1pNOE4COeoXp_-N4IogNS-GavCBbZJtw1/view?usp=sharing) or [[Baidu Cloud]](https://pan.baidu.com/s/1yK6wM0famUwu25s1v92Emw) to `../save/`\n  - Specify the pretrained model to load using the option `--load_model_name`\n\n- Finetune TET-GAN on a new style/glyph image pair (supervised oneshot training)\n```\npython oneshotfinetune.py --style_name ../data/oneshotstyle/1-train.png\n```\nSaved model can be found at `../save/`\n- Finetune TET-GAN on a new style image without its glyph counterpart (unsupervised oneshot training)\n```\npython oneshotfinetune.py --style_name ../data/oneshotstyle/1-train.png --supervise 0\n```\nSaved model can be found at `../save/`\n- Use `--help` to view more finetuning options\n```\npython oneshotfinetune.py --help\n```\n\n### Contact\n\nShuai Yang\n\nwilliamyang@pku.edu.cn\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliamyang1991%2Ftet-gan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwilliamyang1991%2Ftet-gan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliamyang1991%2Ftet-gan/lists"}