KhalfounMehdi/arabic-latin-invoices-synthetic
Synthetic Arabic/Latin Invoices — label-first multimodal dataset A large, perfectly-labeled synthetic invoice dataset for training multimodal invoice-parsing models, with first-class support for Arabic script, mixed Arabic/Latin layouts, and all three numeral glyph systems. Every sample is generated label-first: a structured invoice record is sampled, then rendered to pixels via a headless browser, and bounding boxes are read back from the same DOM — so labels and boxes are… See the full description on the dataset page: https://huggingface.co/datasets/KhalfounMehdi/arabic-latin-invoices-synthetic.
Synthetic Arabic/Latin Invoices — label-first multimodal dataset
A large, perfectly-labeled synthetic invoice dataset for training multimodal invoice-parsing models, with first-class support for Arabic script, mixed Arabic/Latin layouts, and all three numeral glyph systems.
Every sample is generated label-first: a structured invoice record is sampled, then rendered to pixels via a headless browser, and bounding boxes are read back from the same DOM — so labels and boxes are exact by construction, not OCR guesses or human annotations. Realism comes from a label-preserving degradation pipeline applied after the labels are fixed.
Languages & numerals
- Scripts: Arabic, English, French, and mixed (e.g. Latin IBAN/SKU inside an Arabic invoice).
- Numeral systems (all present, including mixed within one document):
WESTERN0123456789ARABIC_INDIC٠١٢٣٤٥٦٧٨٩(U+0660–0669; "Indian/Hindi numerals" أرقام هندية)EXTENDED_ARABIC_INDIC۰۱۲۳۴۵۶۷۸۹(U+06F0–06F9; Persian/Urdu)- Arabic separators
٫(decimal) and٬(thousands).
Columns
canonical label shape (abridged)
{
"doc_type": "tax_invoice",
"numeral_systems": ["WESTERN","ARABIC_INDIC"],
"invoice_number": {"value": "INV-49119", "raw": "INV-٤٩١١٩"},
"dates": {"issue": {"value": "2026-11-06", "raw": "٦/١١/٢٠٢٦", "calendar": "gregorian"}},
"seller": {"name": {...}, "tax_id": {...}, "iban": {...}},
"line_items": [{"description": {...}, "quantity": {...}, "unit_price": {...}, "line_total": {...}}],
"totals": {"subtotal": {...}, "tax_total": {...}, "grand_total": {"value": 18691.77, "raw": "١٨,٦٩١.٧٧"}}
}Diversity
- Locale profiles: SA, AE, EG, MA (Arabic+French), IR-style (Persian digits), generic English.
- Templates: classic / modern / thermal-receipt, direction-aware, with randomized line-item column subset+order and totals styles.
- 41 real fonts (28 Arabic) across Naskh / Kufi / Ruqaa / modern-sans / display.
- Degradation tiers: clean / light / heavy / photo (background composite, glare, perspective) / scan (binarize, scan-lines, fade). The structured label is invariant to all of these.
Splits
Deterministic by sample_id hash: ~96% train, ~2% validation, ~2% test.
Intended use
Training/evaluating OCR-free invoice parsers: full structured extraction, arbitrary caller-schema extraction, table extraction, raw-text transcription, VQA, numeral-system conversion, abstention, and field grounding. The boxes enable detection/grounding supervision.
Loading
from datasets import load_dataset
ds = load_dataset("<your-namespace>/<repo>", split="train")
ex = ds[0]
ex["image"] # PIL image
import json
label = json.loads(ex["canonical"])
tasks = [json.loads(l) for l in ex["tasks"].splitlines()]Provenance & licensing
- Content is fully synthetic (no real PII). Company names, tax IDs, IBANs are generated (IBANs carry valid mod-97 check digits but reference no real account).
- Dataset released under CC-BY-4.0.
- Embedded glyph shapes come from open fonts under the SIL Open Font License (and Apache-2.0 for a few) sourced from the
google/fontsproject; font files themselves are not redistributed here, only rendered rasterized text.
Limitations
- Synthetic distribution; intended to be combined with a small real eval set for sim-to-real.
- v1 covers Arabic/English/French; tax-invoice / receipt document types.
