You need to agree to share your Hugging Face information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

NepalPixel VLM Bench

A benchmark for vision-language models on Nepali government documents: reading fields off a page, transcribing it, recovering its layout, and saying so when the answer is not there.

2,130 documents across 213 document types in 12 categories, rendered by nepal-pixel-synthesis from schemas transcribed off real Nepali government forms: citizenship certificates, lalpurja, court filings, tax clearances, tender notices, meeting minutes, ward recommendation letters, and so on. Every page, value and question in kie, ocr_layout and abstain is synthetic; every name, number and address there is invented. real_ocr adds 91 real document images with human transcriptions, contributed by proustpunk (see the real_ocr section under Tasks).

config unit rows task metric
kie (default) document 2,130 answer Nepali questions about the fields on the page (32,224 questions) ANLS, exact match
ocr_layout page 2,948 transcribe the page; recover regions, roles, reading order, table cells CER; region IoU / role accuracy
abstain page 2,097 the answer has been erased β€” reply ANSWER NOT PRESENT abstention rate, leak rate
real_ocr page 91 transcribe a real document image word F1 (order-free), CER after whitespace normalisation
from datasets import load_dataset

kie   = load_dataset("W4ashabii/nepalpixel-vlm-bench", "kie", split="test")
pages = load_dataset("W4ashabii/nepalpixel-vlm-bench", "ocr_layout", split="test")
neg   = load_dataset("W4ashabii/nepalpixel-vlm-bench", "abstain", split="test")

row = kie[0]
row["image"]          # page 1 (PIL, grayscale)
row["extra_pages"]    # pages 2..n of a multi-sheet document
row["qa"]             # [{question, answer, field, pages}, ...]

Mixture

Stratified by document type, not by category. Every one of the 213 generatable types gets 10 documents. The catalog is skewed β€” administrative and legal types are 44% of it β€” so a category-balanced draw would give each administrative type ~4 documents, too few to score. Report category numbers as a macro-average over types.

category types documents
administrative_governance 49 490
legal_regulatory 45 450
financial_tax 22 220
identity_civil_registration 20 200
procurement_contracts 19 190
licensing_permits 15 150
education_research 12 120
agriculture_livestock 8 80
electoral 6 60
land_property 6 60
social_development 6 60
disaster_environment 5 50

Wear is stratified too: a 1 : 2 : 1 clean : medium : heavy curriculum, apportioned by largest remainder inside every type β€” 3 / 5 / 2 of each type's 10 documents. Neither the wear level nor the list of degradations applied is a column: a model is scored on the pages as they come, not told how degraded they are.

wear documents
clean 639
medium 1,065
heavy 426

Benchmark rendering differs from training rendering on purpose:

  • canonical layout β€” sections sit where the transcribed form puts them; no layout jitter, no injected prose. A graded page carries only what a real office would print.
  • damped augmentation β€” the destructive operations are skipped and the rest run at 0.2Γ— their training probability, so "heavy" is a worn scan, not an illegible one.
  • native resolution 2,600–3,400 px wide, chosen per document. The repository's legibility sweep puts the reliable floor around 2,600–3,000 px; 1,800 px pages misread 6Γ— more often.
  • digit-faithful fonts only on any text carrying a number. Two faces in the pool draw Devanagari digits wrongly β€” Hind as European numerals, Tiro Devanagari Hindi drawing ΰ₯― as a shape every reader takes for ΰ₯¬ β€” and both are excluded from numeric text.
  • seed 20261013, so the set is reproducible from one command:
nepal-pixel mix 2130 --split benchmark --curriculum 'clean=1,medium=2,heavy=1' \
    --extraction-blocking 1 --seed 20261013 --page-width 2600-3400 --annotations full

Train on anything generated with a different seed. The same seed draws the same values.

Tasks

kie β€” key-information extraction

One row per document. qa holds one question per field printed on the page, in Nepali, with field naming the schema key and pages the sheet(s) the answer is on. A field that fills several table rows has its values joined with , . Feed the model image plus extra_pages for multi-sheet documents.

Score with ANLS (Ο„ = 0.5) after NFC and whitespace normalisation. Devanagari and European digits are deliberately not folded together: answering 2049 for ΰ₯¨ΰ₯¦ΰ₯ͺΰ₯― off a Devanagari page is a reading error.

ocr_layout β€” transcription and layout

One row per page. text is the page in reading order (pictures β€” emblem, photo, seal β€” omitted). words and regions carry normalised [x0, y0, x1, y1] boxes. Each region has a role (title, paragraph, key_value, table, table_cell, signature, stamp, …), a render_mode, a reading-order order_rank, its parent_id, and for table cells row/col/row_span/col_span/is_header. layout_confidence says how far to trust the role labels β€” they are inferred, and a low-confidence page is the first place to look when a layout score is surprising. Score layout only on rows with layout_graded true (2,217 of 2,948 pages): the rest sit below the generator's 0.65 confidence floor β€” long statute and gazette pages whose roles were inferred from font size. Their text is exact and stays in the OCR score.

abstain β€” extraction blocking

The same question as a kie row, asked of a copy of the page with that field's value painted out in the local paper colour (the label beside it stays readable). The correct answer is ANSWER NOT PRESENT. positive_id links back to the intact document; erased_value is what was removed. One negative per document; the 33 documents where the eraser could locate no asked-about field have none.

A model that answers from the document type's prior rather than the pixels reproduces the erased value β€” the leak rate. Report abstention next to kie accuracy; abstaining on everything scores 1.0 here and 0 there.

real_ocr β€” real documents

91 real Nepali document images (photos and scans, colour, mixed resolution) with human transcriptions, contributed by proustpunk from proustpunk/real_docs (revision 836769d, Apache-2.0). Rows use the ocr_layout columns; words and regions are empty and layout_graded is false (no layout labels yet). Extra columns: source (real), contributor, source_repo, source_revision, source_image, source_text, image_sha256, license, image_note (one AVIF converted losslessly to PNG), doc_type_in_synthetic_catalog, taxonomy_matches_catalog.

Pages are filed by the contributor under the generator's own category / subcategory / doc_type taxonomy (19 catalog types, every one matching the catalog); 9 pages that fit no catalog type (street signs, banners, posters, clippings and other pages) have category = extras, doc_type = uncategorized.

category pages
administrative_governance 45
licensing_permits 18
education_research 10
extras 9
procurement_contracts 7
financial_tax 1
legal_regulatory 1

Scoring. The transcriptions keep the page's visual spacing (runs of spaces between columns), so raw CER penalises whitespace a reader cannot see. Report order-free word F1 (multiset overlap of whitespace tokens after NFC) and CER after collapsing whitespace; do not compare real_ocr numbers with ocr_layout CER directly.

Held out for now. Documents about a private person (identity documents, certificates, mark sheets, CVs, rosters, cheques, slips and receipts, court filings, deeds, individual applications) and pages whose transcription carries personal identifiers (mobile, citizenship or passport numbers, dates of birth) are not included in this release; they will be added after redaction. Business registrations and licences are included and name their registered owners as printed. Seven source images without a usable transcription (six empty, one missing) are omitted.

Planned: real_kie, real_abstain and real_layout on the same pages β€” model-drafted, human-checked labels.

Scoring

score_vlm_bench.py in this repo implements ANLS / exact match (kie), CER (ocr_layout) and abstention / leak (abstain). Layout metrics (region IoU, role accuracy, reading-order correlation) are left to the evaluator β€” match regions by id, never by list position.

python score_vlm_bench.py --config kie --pred preds.jsonl

Limitations

  • Synthetic except real_ocr. In kie, ocr_layout and abstain, layouts are transcribed from real documents but no page is a real scan. real_ocr is a small real slice (91 pages, OCR only so far).
  • No per-page OCR legibility score (legibility_cer) was recorded for this release; the machine that rendered it had no Tesseract.
  • Values come from shared pools (~5,000 invented names, 713 municipalities with their real districts and wards, Bikram Sambat dates). A model can learn the pools; the abstain config is the check on it.
  • 102 documents repeat the text of another document of the same type β€” statutes, codes and procedures carry almost nothing variable on a canonical page. They differ in font, wear and resolution, so they stay; deduplicate on ocr_layout.text if you want text-unique pages only.
  • Answers are what the generator printed. The grounding audit asserts each one appears verbatim among the page's words; it cannot tell you a value is legible on a heavy page.

License

CC BY-NC 4.0 β€” research and evaluation use; no commercial use β€” for kie, ocr_layout and abstain. real_ocr is redistributed from proustpunk/real_docs under its Apache-2.0 licence; credit: proustpunk. Scores reported on the whole benchmark should name the configs used.

Downloads last month
1,227