SAVRN
Search Contact SAVRN

Open-weight model

khattat-parseq

by Saeid Seyfi saeidseyfi/khattat-parseq

Handwritten line recognizer for Persian / Arabic / English text plus math symbols, fine-tuned on the saeidseyfi/khattat dataset (line crops, input 32x256, max 88 label chars).

Parameters
Context
Weights95.9 MB
Licensecc-by-4.0
AccessOpen weights
Monthly Downloads

Model Card

By Saeid Seyfi, published under cc-by-4.0, revision 0d85d2bb1c7b.

Handwritten line recognizer for Persian / Arabic / English text plus math symbols, fine-tuned on the saeidseyfi/khattat dataset (line crops, input 32x256, max 88 label chars). CPU (2-core) budget fine-tune; decoder+head trained, STR backbone frozen The training pipeline is time-budgeted and fully resumable — continuing on a GPU with the same script converges substantially further. - best.pt -- model checkpoint (state dict + vocab) - vocab.txt -- 176-char vocabulary (fa / ar / en / digits / math) - demokhattatparseq.mp4 -- demo: test lines, ground truth vs prediction - evalreport.json, log.txt, worstsamples.json -- metrics

Read Saeid Seyfi's full model card

khattat PARSeq recognizer

Handwritten line recognizer for Persian / Arabic / English text plus math symbols, fine-tuned on the saeidseyfi/khattat dataset (line crops, input 32x256, max 88 label chars).

Results (test split, 372-400 line samples)

  • test CER: 0.8364
  • exact-match: 0.0000
  • CER per language: {"en": 0.8494, "fa": 0.8247}
  • training: 2110 iterations, batch 12, CPU (2-core) budget fine-tune; decoder+head trained, STR backbone frozen

The training pipeline is time-budgeted and fully resumable — continuing on a GPU with the same script converges substantially further.

Files

  • best.pt -- model checkpoint (state dict + vocab)
  • vocab.txt -- 176-char vocabulary (fa / ar / en / digits / math)
  • demo_khattat_parseq.mp4 -- demo: test lines, ground truth vs prediction
  • eval_report.json, log.txt, worst_samples.json -- metrics

Usage

import torch
from doctr.models import recognition

vocab = open('vocab.txt').read()
model = recognition.parseq(vocab=vocab, pretrained=False,
                           input_shape=(3, 32, 256), max_length=90)
model.load_state_dict(torch.load('best.pt', map_location='cpu')['model'])
model.eval()

Owner: saeidseyfi

Identity and Version

Repository
saeidseyfi/khattat-parseq
Publisher
Saeid Seyfi
Task
Not stated by the source
Modality
Other
Library
doctr
Parameters
Not stated by the source
Languages
fa, ar, en
Revision
0d85d2bb1c7b1c0300a38e69344ecc9dde1d509c
First published
2026-09-18
Last updated
2026-09-18

Files and Weights

8 files, 96.7 MB in total. The weights are 1 file totalling 95.9 MB in pt.

Weights1 file · 95.9 MB
Configuration2 files · 1.7 KB
Tokenizer1 file · 265 B
Documentation1 file · 1.3 KB
Other2 files · 807.6 KB
Repository1 file · 1.6 KB
Every file
FileTypeSizeSHA-256
best.ptWeights95.9 MB 7f409c419f74
eval_report.jsonConfiguration193 B
worst_samples.jsonConfiguration1.5 KB
README.mdDocumentation1.3 KB
demo_khattat_parseq.mp4Other807.2 KB cab351423978
log.txtOther333 B
.gitattributesRepository1.6 KB
vocab.txtTokenizer265 B

License and Download

License
cc-by-4.0
Access
Open weights, no gate
Download size
95.9 MB
Download from Saeid Seyfi

Released by Saeid Seyfi through its official repository on Hugging Face. Read the license.

Memory Requirements

PrecisionWeights in memory
As published95.9 MB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About khattat-parseq

Can I use khattat-parseq commercially?

Yes. khattat-parseq is released under Creative Commons Attribution 4.0. CC BY 4.0 permits sharing and adapting the work, including commercially, provided the creator is credited and changes are indicated.