Instructions to use saeidseyfi/khattat-parseq with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- docTR
How to use saeidseyfi/khattat-parseq with docTR:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
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 predictioneval_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
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support