Home

Awesome

<img src="https://github.com/williamyang1991/TET-GAN/blob/master/imgs/teaser.png" width="80%" height="80%">

TET-GAN

This is a pytorch implementation of the paper.

Shuai Yang, Jiaying Liu, Wenjing Wang and Zongming Guo. TET-GAN: Text Effects Transfer via Stylization and Destylization, Accepted by AAAI Conference on Artificial Intelligence (AAAI), 2019.

[Project] | [Paper] | [Dataset]

It is provided for educational/research purpose only. Please consider citing our paper if you find the software useful for your work.

Usage:

Prerequisites

Install

git clone https://github.com/williamyang1991/TET-GAN.git
cd TET-GAN/src

Testing Example

<img src="https://github.com/williamyang1991/TET-GAN/blob/master/imgs/example.jpg" width="50%" height="50%">
python test.py
python test.py --c2s 0
python test.py --style_name ../data/style/26.png --content_name ../data/content/2.png --name 26_2.png
python test.py --style_name ../data/style/1.png --content_name ../data/content/4.png --content_type 1

Training Examples

Full Training

dataset/style1/train/1.png
dataset/style1/train/2.png
...
dataset/style2/train/1.png
dataset/style2/train/2.png
...
<img src="https://github.com/williamyang1991/TET-GAN/blob/master/data/oneshotstyle/1-train.png" width="30%" height="30%">
python train.py 

Saved model can be found at ../save/

python train.py --help

Oneshot Training

python oneshotfinetune.py --style_name ../data/oneshotstyle/1-train.png

Saved model can be found at ../save/

python oneshotfinetune.py --style_name ../data/oneshotstyle/1-train.png --supervise 0

Saved model can be found at ../save/

python oneshotfinetune.py --help

Contact

Shuai Yang

williamyang@pku.edu.cn