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.

GreenOCR-Dataset

Synthetic document pages for training OCR / document-parsing models, mainly Vietnamese with an English counterpart. Every page is rendered from text and assets we control, so the ground truth (GT) is exact: each block has a polygon and its content, and each page has a ready-to-train target in the LightOnOCR-3 grounding format. It is not a set of real scans; the augment parts simulate scans and phone photos on top of the clean renders.

Every type has the same three parts: vi and en are clean pages (Vietnamese / English text), augment holds degraded variants (scan / phone / old paper, any rotation) made from separate sources, so its text is not in vi / en.

Type Pages vi / en / augment Total What
article 10,800 / 4,001 / 6,054 20,855 Magazine / newspaper pages from a procedural generator (Vietnamese news text; English from public-domain books and PLOS)
paper 7,979 / 3,890 / 4,241 16,110 Scientific-paper pages from PLOS articles; vi is a machine translation EN → VI; augment mixes 2,746 Vietnamese and 1,495 English pages
legal 7,981 / 3,589 / 4,297 15,867 Legal-document pages: Vietnamese state documents (decisions, resolutions, circulars, decrees ...) and US federal documents (Federal Register, congressional bills), with stamps and signatures; augment mixes 2,798 Vietnamese and 1,499 English pages

52,832 pages in total. More document types (invoices, contracts, forms, slides, ...) are generated by the same project and may be added later.

Layout

<type>/<part>/
  images-000.tar, images-001.tar, ...   page images (~2 GiB each, members "images/..."), PNG / JPG
  gt.tar                                 one <sample_id>.md per page: the target, for reading
  shards.tar                             the per-render shard records (full GT, same schema as GroundTruth.jsonl)
  GroundTruth.jsonl                      full record per page (polygons, blocks, relations, source, target)
  lighton.jsonl                          what training reads: {"image_path", "target_lighton"}
  check.txt / check.json, config*.json, stats.json, ...   checks and generation settings, when present
                                         (`legal/augment`: check.txt has a [vi] and an [en] block, config-aug-vi.json / config-aug-en.json, shards vi-aug-N / en-aug-N)

Extract everything inside a part directory with for t in *.tar; do tar xf $t; done; image_path in the jsonl files is then valid relative to that directory. (Tars keep the number of files per folder under the Hub's limit.)

Ground truth

target_lighton is the page as LightOnOCR-3 grounding text: one block per paragraph, in reading order, separated by a blank line:

![header](85,50,166,62) BÁO BÌNH MINH

![title](198,105,792,250) # Việt Nam là đối tác thương mại quan trọng nhất của Phần Lan ở Đông Nam Á

![text](100,252,892,289) Các cấp lãnh đạo Phần Lan ...

![label](x0,y0,x1,y1) is the block's box, normalised to 0..1000 of the page. A + after the label (text+) marks a block that continues one cut by a column or page break. Labels: text, title, header, footer, page_number, caption, list, table, formula, image, chart, diagram (the checker's allowed set also has footnote, code, aside_text, header_image, footer_image). Content is Markdown, tables are HTML, formulas LaTeX ($$ ... $$); a literal currency $ is written &dollar;.

Figures follow one convention: a chart is its data table, an image is a short English description (visible text kept verbatim in quotes), a diagram (flowchart) is a Mermaid block, pure decoration is dropped. GroundTruth.jsonl additionally has per-block polygons (blocks), per-line and per-cell boxes where available, and source (generator settings; for paper: article, journal, DOI, licence, template, translation).

How it was made

  • article: a procedural magazine / newspaper page generator (layouts, columns, fonts, themes, photos, stickers, icons, tables, charts, diagrams). Vietnamese text comes from the tmnam20/Vietnamese-News corpus; English text comes from a pool of Standard Ebooks (public domain / CC0) and PLOS articles (CC BY / CC0). Charts, tables and diagrams are drawn from generated data. A news article / passage is not reused within a render run, and the augment sources share no text with vi / en.
  • paper: all of PLOS (JATS XML) converted to HTML (391,477 articles, nothing dropped silently), then paginated and rendered in two PLOS-like templates (2012-style two columns, 2015-style one column) with the real figures. Pages with a missing figure, formula images or an overflow are dropped, not guessed. The Vietnamese pages use a machine translation of the English articles.
  • legal: the page text is the text of real legal documents, set in new page layouts. vi: documents of th1nhng0/vietnamese-legal-documents (HTML), rendered in Chromium with randomly drawn style profiles (classic, compact, spacious, modern, typewriter, source) and layouts (header two-column, stacked, indented, outline), A4 pages, page numbers, tables, stamps and signatures. The text is not changed by the layout choices. en: US federal documents from GovInfo bulk data (Federal Register notices / rules / proposed rules / proclamations, and congressional bills / resolutions), converted from XML to HTML and rendered the same way on Letter pages with Federal-Register-style running heads and footers. Stamps and signatures are real ink cut from third-party datasets (below). In GroundTruth.jsonl they are blocks labelled Stamp / Signature; in target_lighton they are image blocks whose description is signature, stamp or stamp and signature (no text is read from them). Up to 3 pages per document are kept. The augment sources are different documents from the ones in vi / en (checked: no shared document id).
  • augment: simulated scan / phone / old-paper degradations with rotation; polygons are transformed exactly, so the targets stay valid.

Licences and provenance (read before use)

The licence is mixed per subset; nothing here is relicensed by this card.

  • paper: the article texts and figures are PLOS content under CC BY 4.0, CC BY 3.0, CC BY or CC0 (recorded per page in source.license, with the DOI). CC BY needs attribution to the authors.
  • paper Vietnamese pages (paper/vi, and the Vietnamese pages in paper/augment, source.lang == "vi") are machine translations made with tencent/HY-MT1.5-7B (recorded in source.translation). The Tencent HY Community License puts conditions on the use of the model's outputs (for example on using them to improve other AI models, and a territory restriction). Check that licence before using these pages, in particular to train models. paper/en is not affected.
  • article Vietnamese text comes from tmnam20/Vietnamese-News, which states no licence. Photos come from a Wikimedia Commons pool, fonts / icons / stickers from other pools with their own licences; we have not audited every item. Treat article/vi and the photos as of unknown licence.
  • article English text: Standard Ebooks (CC0 / public domain) and PLOS (CC BY / CC0), licence per page in source.meta.text.
  • legal Vietnamese text: th1nhng0/vietnamese-legal-documents, CC BY 4.0 (attribution required); the documents are Vietnamese state legal documents (source.dataset, doc_identity, organ, issue_date per page).
  • legal English text: US federal documents from GovInfo / GPO bulk data (2,027 Federal Register pages and 1,562 congressional-bill pages in en), public domain as US Government works (17 U.S.C. 105); recorded in source.license.
  • legal stamps and signatures: ink cut out of LibreYOLO/signatures-xc8up (signatures) and mapo80/stamps (stamps), both CC BY 4.0 (attribution required); only the ink is kept, the source documents are not copied. The stamps are third-party images and need not look like Vietnamese or US official stamps; for en, stamps naming a real agency were left out.
  • legal fonts come from the pools of the other types (own licences, not audited item by item).

Known limitations

  • Pages are synthetic. Layouts and degradations are plausible but not real-world scans; do not use this set alone to measure real-document accuracy.
  • Figure content (chart values, image descriptions, Mermaid diagrams) was produced by LightOnOCR-3: it is a pseudo-label and can be wrong (values, edges). Some image blocks have no description (they fall back to photo).
  • Strong augment settings can make small text partly unreadable while the target still holds it; illustrations in article are chosen randomly and need not match the article topic.
  • paper: 9 pages are flagged by the format check (6 with an odd number of ** in table / chart cells, which may be significance stars, 3 with leftover tags): vi journal.pone.0146550_p012, journal.pone.0207461_p010, journal.pone.0236405_p013, journal.ppat.1011697_p014; en journal.pone.0175361_p005, journal.pone.0324031_p033, journal.pone.0324914_p030; augment journal.pbio.3002686_p007_a00, journal.pbio.3002686_p019_a00. 111 paper/vi pages (and 32 Vietnamese paper/augment pages) have more than 10% English-looking words (translation residue; references stay English by design).
  • legal: the format check flags a few pages (vi 7 overlapping text blocks and 1 line outside its block; en 4 lines outside blocks and 2 overlaps; augment 41 + 36 overlaps and 20 + 24 lines outside blocks, vi + en). Ink outside the ground truth (check.txt): vi 46 of 7,981 pages above 2% (max 18%), en 539 of 3,589 pages above 2% (p95 6.5%, max 13%), so some text or marks of the en pages are not in the target. check.txt of augment prints the requested counts (2,800 vi / 1,500 en); the files hold 2,798 / 1,499 pages.
  • Structure, box, tag and cross-file consistency checks pass for all parts; there has been no exhaustive visual review of every page.
  • Translation of the paper/vi text is machine output and may contain terminology errors.

Contamination

We compared word n-gram overlap of the translated PLOS articles (1,002 HTML files) and of 170 earlier article render files with the Vietnamese evaluation sets we use (Meddies-based dev set, ViDocParse, MDPBench-vi): nothing was flagged. The check did not cover every page of this repository (nor the Vietnamese news text behind article/vi) and says nothing about other benchmarks. For legal/vi, 1,194 documents whose text overlaps those evaluation sets (found with our decontamination script) were never rendered; legal/en (US federal documents) was not compared with them, and the Vietnamese legal corpus itself is public text that other datasets may also contain.

Downloads last month
76