This is the official repository accompanying the ICCC 2019 paper "Trick or TReAT : Thematic Reinforcement for Artistic Typography", by Purva Tendulkar, Kalpesh Krishna, Ramprasaath R. Selvaraju & Devi Parikh. The demo can be found here.
Full text available at: https://arxiv.org/abs/1903.07820
-
Create your primary directoy and enter it.
-
Create folders
save,args,split, to save the trained model, arguments, and train-val split respectively. -
git clone https://github.com/purvaten/treat.git -
Train model
python treat/train.py \
--alpha 0.25 \
--data cliparts,letters \
--cliparts_dir treat/clipart_imgs \
--letters_dir treat/letter_imgs \
--datalimit 40250 \
--model alexnet
where treat/clipart_imgs and treat/letter_imgs should contain the clipart and letter images respectively for training. They each currently contain a single prototype image only.
NOTE : The letter images must be named in a specific format : TYPE + LETTER + ID, where TYPE = upper or lower,
LETTER = a, b, ... z, and ID is a number (optional). For example, lowera1.png, upperb4.png, etc.
| Word | Theme | TReAT |
|---|---|---|
| storm | weather, disaster | ![]() |
| mouse | computer | ![]() |
| fish | ocean | ![]() |
| church | Jesus, God | ![]() |
NOTE : The generated TReAT is independent of the sequence of provided themes.



