Skip to content

DAS2022: TrueType Transformer: Character and Font Style Recognition in Outline Format

License

Notifications You must be signed in to change notification settings

uchidalab/TrueTypeTransformer

Repository files navigation

TrueType Transformer : T 3

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.

Usage

Recommendation

  • Git 2.25.1
  • Docker 20.10.13

A sample of to create a development environment

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

File tree

.
├── 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

Dataset

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.

Installation

pip install -r /requirements.txt  --extra-index-url https://download.pytorch.org/whl/cu113

Execution scripts

Models

  • Proposed: refer to T3.py. You can change hyper parameter in the paper by config.yaml.
  • Estimate: refer to estimate.ipynb.

For a training example, src/run.sh.

Author

Citation

Y. Nagata, J. Otao, D. Haraguchi and S. Uchida "TrueType Transformer: Character and Font Style Recognition in Outline Format." Document Analysis Systems: 15th IAPR International Workshop, DAS 2022, La Rochelle, France, May 22–25, 2022, Proceedings. 2022.

@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}
}

License

Follow google fonts for the license of the dataset.

Releases

No releases published

Packages

No packages published