Views
No views yet

| Field | Description |
|---|---|
| Task | Handwritten text image generation |
| Framework | PyTorch |
| Architecture | ViT writer encoder, Transformer generator, ViT recognizer |
| Supported Data | IAM English handwriting and Vietnamese handwriting data |
| Image Height | 32px |
| Checkpoints | English and Vietnamese checkpoints included |
| Intended Use | Research, reproducibility, handwriting synthesis, and data augmentation experiments |


| File | Purpose |
|---|---|
File/eng_ckpt.pth | Released English/IAM checkpoint |
File/vn_ckpt.pth | Released Vietnamese checkpoint |
File/vgg19.pth | VGG19 backbone checkpoint/resource used by the project |
File/IAM.pickle | Prepared IAM handwriting dataset pickle |
File/VN.pickle | Prepared Vietnamese handwriting dataset pickle |
File/unifont.pickle | Font/template data for query rendering |
File/english_words.txt | English lexicon |
File/vn_words.txt | Vietnamese lexicon |
1.
2|-- data/ # Dataset loading and preparation utilities
3|-- Figures/ # Architecture and qualitative result figures
4|-- File/ # Datasets, checkpoints, lexicons, and font resources
5|-- models/ # Generator, discriminators, recognizer, and writer encoder
6|-- util/ # Shared model and training utilities
7|-- params.py # Experiment and dataset configuration
8|-- train.py # Training entry point
9`-- requirements.txtpip install -r requirements.txt1git lfs install
2git clone https://huggingface.co/DAIR-Group/WriteViT
3cd WriteViThuggingface_hub:1pip install -U huggingface_hub
2python - <<'PY'
3from huggingface_hub import snapshot_download
4
5snapshot_download(
6 repo_id="DAIR-Group/WriteViT",
7 repo_type="model",
8 local_dir=".",
9 allow_patterns=[
10 "File/*.pth",
11 "File/*.pickle",
12 "File/*.txt",
13 "config.json",
14 "README.md",
15 ],
16)
17PYFile/:1File/
2├── IAM.pickle
3├── VN.pickle
4├── eng_ckpt.pth
5├── vn_ckpt.pth
6├── vgg19.pth
7├── english_words.txt
8├── vn_words.txt
9└── unifont.pickleparams.py.1DATASET = 'IAM'
2DATASET_PATHS = './File/IAM.pickle'
3NUM_WRITERS = 339
4WORDS_PATH = './File/english_words.txt'1DATASET = 'VNDB'
2DATASET_PATHS = './File/VN.pickle'
3NUM_WRITERS = 106
4WORDS_PATH = './File/vn_words.txt'resnet18, vgg11, and vgg19.params.py, especially DATASET, DATASET_PATHS, NUM_WRITERS, WORDS_PATH, BACKBONE, learning rates, batch size, and RESUME.CUDA_VISIBLE_DEVICES=0 python train.py1saved_models/<EXP_NAME>/
2saved_images/<EXP_NAME>/RESUME = True, the training script loads:saved_models/<EXP_NAME>/model.pth1{
2 "train": {
3 "writer_id": [
4 {"img": PIL.Image.Image, "label": "handwritten text"}
5 ]
6 },
7 "test": {
8 "writer_id": [
9 {"img": PIL.Image.Image, "label": "handwritten text"}
10 ]
11 }
12}1@article{nam2025writevit,
2 title = {WriteViT: Handwritten Text Generation with Vision Transformer},
3 author = {Dang Hoai Nam and Huynh Tong Dang Khoa and Vo Nguyen Le Duy},
4 journal = {arXiv preprint arXiv:2505.13235},
5 year = {2025}
6}