Datasets:
File size: 3,156 Bytes
32a00c4 c0cfc38 0c5dd55 32a00c4 0c5dd55 32a00c4 0c5dd55 32a00c4 0c5dd55 32a00c4 0c5dd55 32a00c4 0c5dd55 32a00c4 0c5dd55 81766af 0c5dd55 81766af 0c5dd55 81766af 0c5dd55 32a00c4 622876b 32a00c4 622876b 32a00c4 622876b 32a00c4 0c5dd55 32a00c4 0c5dd55 32a00c4 0c5dd55 d6b23d6 808df9e 32a00c4 0c5dd55 53d7a6a 0c5dd55 d6b23d6 0c5dd55 b677f65 0c5dd55 9d842c7 0c5dd55 9d842c7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | ---
license: cc-by-4.0
pretty_name: OCR Synthetic Multilingual v2
task_categories:
- image-to-text
annotations_creators:
- machine-generated
size_categories:
- 1M<n<10M
tags:
- image
- text
- ocr
- document-parsing
- synthetic
- nemotron-3.5-parse
models:
- nvidia/Nemotron-3.5-Parse
---
# OCR Synthetic Multilingual v2
Synthetic document pages for multilingual OCR and structured document parsing, covering 28 scripts and varied fonts, page layouts, and text directions. Annotations include text, semantic content classes, and bounding boxes.
**7,907,809 image/annotation pairs** · **12,686 WebDataset tar shards** · **training split**
This dataset was used to train [Nemotron 3.5 Parse](https://huggingface.co/nvidia/Nemotron-3.5-Parse). It supports training and adapting models for structured document understanding.
It combines the multilingual document collections used in Parse training under one annotation interface.
## How it was created
Pages were rendered from sampled corpus text with varied fonts, layouts and text directions, while recording text and geometry. See [GENERATION.md](GENERATION.md) for the process.
## Languages covered
The inventory lists **149 language/script entries across 28 scripts**. [View every covered language and script](LANGUAGES.md), or use the machine-readable [LANGUAGES.json](LANGUAGES.json).
## Format
Each record pairs an image with JSON annotations containing `block_boxes`, `block_classes`, and `block_text`. Boxes use pixel coordinates, and the arrays align by block. See [FORMAT.md](FORMAT.md) and [an example annotation](example.annotation.json) for the target representation.
## Use the data
Install `huggingface_hub`, `fsspec`, and `pillow`. The dataset is public; authentication is not required to read it.
```python
import io
import json
import runpy
from PIL import Image
from huggingface_hub import HfFileSystem, hf_hub_download
repo = "nvidia/OCR-Synthetic-Multilingual-v2"
manifest = hf_hub_download(repo, "SHARDS.jsonl", repo_type="dataset")
with open(manifest) as f:
shard = json.loads(next(f))["path"]
reader = hf_hub_download(repo, "reader.py", repo_type="dataset")
iter_records = runpy.run_path(reader)["iter_records"]
# Stream one shard; no need to download the entire dataset.
fs = HfFileSystem()
with fs.open(f"datasets/{repo}/{shard}", "rb", block_size=1024 * 1024) as stream:
records = iter_records(stream)
try:
key, parts = next(records)
finally:
records.close()
annotation = parts["json"]
image_bytes = next(parts[ext] for ext in ("png", "jpg", "jpeg") if ext in parts)
image = Image.open(io.BytesIO(image_bytes))
print(key, image.size, annotation["block_classes"])
```
Use the remaining entries in `SHARDS.jsonl` to iterate over more shards or partition work across workers. The manifest also provides record counts, byte sizes, and SHA-256 checksums. The bundled reader accepts a local tar path as well as an open binary stream.
For model adaptation, see the [Parse SFT/RLVR fine-tuning recipe](https://github.com/NVIDIA-NeMo/Nemotron/blob/main/docs/nemotron/parse/index.md).
## Terms
Upstream text and asset terms still apply.
|