convexsetgithub / TET-GAN

TET-GAN: Text Effects Transfer via Stylization and Destylization. AAAI 2019

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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]

This code currently only provides functions for testing. We are cleanning up the training code and the full code will be released soon.

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

Usage:

Prerequisites

  • Python 2.7
  • Pytorch 0.4.1
  • matplotlib
  • scipy
  • opencv-python
  • Pillow

Install

  • Clone this repo:
git clone https://github.com/williamyang1991/TET-GAN.git
cd TET-GAN/src

Testing Example

  • Download a pre-trained model from [Google Drive] or [Baidu Cloud] to ./save/
  • Style Transfer with default parameters
    • Results can be found in ./output/

python test.py
  • Destylization with default parameters
python test.py --c2s 0
  • Transfer the style of 26.jpg onto the text image 2.png and save the result as 26_2.png
python test.py --style_name ../data/style/26.png --content_name ../data/content/2.png --name 26_2.png
  • For black and white text images, use option --content_type 1
python test.py --style_name ../data/style/1.png --content_name ../data/content/4.png --content_type 1

Training Examples

We are cleanning up the related code and it will be coming soon.

Contact

Shuai Yang

williamyang@pku.edu.cn

About

TET-GAN: Text Effects Transfer via Stylization and Destylization. AAAI 2019


Languages

Language:Python 100.0%