This is an official PyTorch implementation of the paper TrueType Transformer: Character and Font Style Recognition in Outline Format, which is accepted to DAS2022.
T 3 is a recognition model, input as an outline format (i.e. True type format) and output as a class label.
- Git 2.25.1
- Docker 20.10.13
mkdir -p ~/Dev/data && cd ~/Dev/data
git clone https://github.com/google/fonts.git
cd ../
git clone https://github.com/uchidalab/TrueTypeTransformer.git
cd ./TrueTypeTransformer
sh docker/build.sh
sh docker/run.sh
sh docker/exec.sh
sh src/run.sh
.
├── TrueTypeTransformer
│ ├── docker
│ ├── models
│ ├── src
│ │ ├── conf
│ │ │ └── config.yaml
│ │ ├── model
│ │ │ └── T3.py
│ │ ├── utils
│ │ │ ├── evaluate.py
│ │ │ ├── load.py
│ │ │ └── train.py
│ │ ├ run.sh
│ │ └ main.py
│ ├── .gitignore
│ ├── .env
│ ├── README.md
│ ├── Dockerfile
│ ├── DockerfileM1mac
│ ├── google_font_category_v4.csv
│ ├── requirements.txt
│ └── estimate.ipynb
└── data
└── fonts
In experiments, we used Googlefonts.
Please be cautious that we modified these datasets followed STEFANN for data split.
Note, there is a little increase in the font.
pip install -r /requirements.txt --extra-index-url https://download.pytorch.org/whl/cu113
- Proposed: refer to
T3.py
. You can change hyper parameter in the paper byconfig.yaml
. - Estimate: refer to
estimate.ipynb
.
For a training example, src/run.sh
.
- Yusuke Nagata, Jinki Otao, Daichi Haraguchi and Seiichi Uchida
@inproceedings{nagata2022truetype,
title={TrueType Transformer: Character and Font Style Recognition in Outline Format},
author={Yusuke Nagata and Jinki Otao and Daichi Haraguchi and Seiichi Uchida},
booktitle={International Workshop on Document Analysis Systems},
pages={18--32},
year={2022},
organization={Springer}
}
Follow google fonts for the license of the dataset.