nrl-ai/vn-synthetic-ocr

Dataset

vn-synthetic-ocr

0

11 commits

1 linked in READMEs

updated May 3, 2026

See the code

README

vn-synthetic-ocr

Procedurally-rendered Vietnamese text-line images for OCR evaluation. Each row pairs a UTF-8 NFC ground-truth string with a PNG line crop in two conditions:

  • clean — single-font, white background, no degradation
  • noisy — same content with bell-curve gaussian noise + jitter

20 lines per condition (40 images total, ~3 MB).

Splits

ConfignConditions
clean20Single-font rendered text on white
noisy20Same lines with synthetic noise / blur / jitter

Each row carries image (PNG bytes), text (UTF-8 NFC ground truth), font (TTF used), and id (3-digit string, matching across configs).

Usage

from datasets import load_dataset

ds = load_dataset("nrl-ai/vn-synthetic-ocr", "clean", split="test")
sample = ds[0]
print(sample["text"])  # NFC ground truth

# Inference example with Vintern-1B-v3_5
from PIL import Image
from io import BytesIO
img = Image.open(BytesIO(sample["image"]["bytes"]))  # or sample["image"] depending on decoding
# ... (see nom-vn's nom.ocr.handwriting wrapper for the InternVL preprocess)

Honesty notes

  • 20 images per condition is small. Use for smoke-tests + CER regression checks; bench against a 200+-image set (brianhuster/VietnameseOCRdataset, ~7 k images, Apache-2.0) for any adoption claim.
  • Single-font clean ≠ real document. Real-world VN documents have multi-font pages, table layouts, header/footer noise that this set doesn't exercise.
  • CER counts diacritic variants as errors. hoà ↔ hòa (both valid VN spellings, regional preference) shows up as a 1-character edit distance even though the meaning is identical. Manual review the failures before adopting a CER threshold.

Reference baseline

Latest in-house bench (source): 5CD-AI/Vintern-1B-v3_5 zero-shot via nom.ocr.handwriting wrapper:

ConditionMean CERExact-matchn
clean0.47 %16/2020
noisy0.37 %17/2020

Most "errors" are valid VN diacritic variants.

Citation

@dataset{nguyen_vn_synthetic_ocr_2026,
  author = {Nguyen, Viet-Anh and {Neural Research Lab}},
  title  = {{vn-synthetic-ocr: Procedurally-rendered Vietnamese text-line
             images for OCR evaluation}},
  year   = {2026},
  url    = {https://huggingface.co/datasets/nrl-ai/vn-synthetic-ocr}
}

Released CC0 — public domain dedication.

Maintained as part of the nom-vn project by Viet-Anh Nguyen ([email protected]) and Neural Research Lab.

evaluation
line-level
synthetic
vietnamese

nrl-ai/vn-synthetic-ocr

Dataset

vn-synthetic-ocr

0

11 commits

1 linked in READMEs

updated May 3, 2026

See the code

README

vn-synthetic-ocr

Procedurally-rendered Vietnamese text-line images for OCR evaluation. Each row pairs a UTF-8 NFC ground-truth string with a PNG line crop in two conditions:

  • clean — single-font, white background, no degradation
  • noisy — same content with bell-curve gaussian noise + jitter

20 lines per condition (40 images total, ~3 MB).

Splits

ConfignConditions
clean20Single-font rendered text on white
noisy20Same lines with synthetic noise / blur / jitter

Each row carries image (PNG bytes), text (UTF-8 NFC ground truth), font (TTF used), and id (3-digit string, matching across configs).

Usage

from datasets import load_dataset

ds = load_dataset("nrl-ai/vn-synthetic-ocr", "clean", split="test")
sample = ds[0]
print(sample["text"])  # NFC ground truth

# Inference example with Vintern-1B-v3_5
from PIL import Image
from io import BytesIO
img = Image.open(BytesIO(sample["image"]["bytes"]))  # or sample["image"] depending on decoding
# ... (see nom-vn's nom.ocr.handwriting wrapper for the InternVL preprocess)

Honesty notes

  • 20 images per condition is small. Use for smoke-tests + CER regression checks; bench against a 200+-image set (brianhuster/VietnameseOCRdataset, ~7 k images, Apache-2.0) for any adoption claim.
  • Single-font clean ≠ real document. Real-world VN documents have multi-font pages, table layouts, header/footer noise that this set doesn't exercise.
  • CER counts diacritic variants as errors. hoà ↔ hòa (both valid VN spellings, regional preference) shows up as a 1-character edit distance even though the meaning is identical. Manual review the failures before adopting a CER threshold.

Reference baseline

Latest in-house bench (source): 5CD-AI/Vintern-1B-v3_5 zero-shot via nom.ocr.handwriting wrapper:

ConditionMean CERExact-matchn
clean0.47 %16/2020
noisy0.37 %17/2020

Most "errors" are valid VN diacritic variants.

Citation

@dataset{nguyen_vn_synthetic_ocr_2026,
  author = {Nguyen, Viet-Anh and {Neural Research Lab}},
  title  = {{vn-synthetic-ocr: Procedurally-rendered Vietnamese text-line
             images for OCR evaluation}},
  year   = {2026},
  url    = {https://huggingface.co/datasets/nrl-ai/vn-synthetic-ocr}
}

Released CC0 — public domain dedication.

Maintained as part of the nom-vn project by Viet-Anh Nguyen ([email protected]) and Neural Research Lab.

evaluation
line-level
synthetic
vietnamese