File size: 5,167 Bytes
e47e563 853a3f3 e47e563 853a3f3 e47e563 853a3f3 8d08c8f 853a3f3 e47e563 | 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 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | ---
pretty_name: SafeOCR-LabGold
license: apache-2.0
language:
- en
size_categories:
- n<1K
tags:
- clinical-ocr
- healthcare
- synthetic
- verification
- fhir
- benchmark
configs:
- config_name: default
default: true
data_files:
- split: calibration
path: "viewer/calibration.parquet"
- split: evaluation
path: "viewer/evaluation.parquet"
---
# SafeOCR-LabGold
**SafeOCR-LabGold** is the synthetic laboratory-report benchmark used to develop and evaluate the frozen SafeOCR v0.1 verification policy.
## Dataset summary
The complete frozen split contains:
| Split | Synthetic records | Rendered documents | Critical fields |
|---|---:|---:|---:|
| Calibration | 12 | 24 | 144 |
| Final evaluation | 24 | 48 | 288 |
| Total | 36 | 72 | 432 |
Each synthetic record is rendered as a clean document and a deterministic corrupted counterpart. Three controlled templates are used: `classic`, `compact`, and `grid`. Every document contains six laboratory fields.
The paper reports the **48-document / 288-critical-field final evaluation split**.
## Intended use
Use SafeOCR-LabGold for:
- deterministic clinical-OCR verification research;
- regression tests for evidence binding and selective-decision policies;
- reproducible demonstrations of review/abstention behavior;
- studying automation-versus-review trade-offs under the frozen v0.1 benchmark.
Do **not** use this dataset as evidence of real-world clinical deployment performance. It is synthetic and does not represent the full distribution of real laboratory reports.
## Frozen result boundary
In the final evaluation split, the primary OCR baseline produced 0/288 observed errors. SafeOCR accepted 209/288 fields with 0/209 observed errors and routed 79 correct fields to review. Because the ungated baseline also had zero observed errors, this benchmark does **not** establish a safety benefit from gating.
## Data generation and byte-level reproducibility
The benchmark generator is deterministic for a fixed renderer stack:
```bash
python scripts/prepare_hf_labgold.py --output dist/SafeOCR-LabGold
```
The canonical Hugging Face v0.1 publication package is bound by:
- `manifest_sha256 = 3a3fcdf1e3e045c0b6f8b334457d1e22dbd247a6a556e08235f808143abf5cec`;
- Python 3.12.13;
- Pillow 12.3.0;
- FreeType 2.14.3;
- JPEG feature version 8.0;
- zlib 1.3.1.zlib-ng;
- platform `win32:AMD64`.
SafeOCR's corruption pipeline includes a JPEG round-trip. Pillow can therefore produce different corrupted PNG bytes when its underlying JPEG implementation differs across platforms even when the frozen seeds, case identities, layouts, and policy are unchanged. A package whose manifest hash differs from the canonical value above must not be presented as the byte-identical v0.1 publication artifact. For exact reproduction of the released benchmark, use the published Hugging Face artifacts or a matching renderer stack.
This renderer dependency does not change the frozen evaluation results or claim boundaries; it is a byte-level reproducibility constraint on regenerated corrupted images.
The generator records exact case identity, template, source seed, corruption seed, document hash, page hash, image filename, and truth-region metadata. The canonical root `metadata.jsonl` remains byte-identical to `manifest.jsonl`.
The Hugging Face Dataset Viewer uses a separate derived Parquet layer under `viewer/`. It is generated only after verifying the canonical manifest and every source-image SHA-256. The viewer layer embeds the same image bytes and exposes the frozen metadata as tabular columns, with explicit `calibration` (24 rows) and `evaluation` (48 rows) splits. It is a convenience representation only; `manifest.jsonl` and `images/` remain the audit source of truth.
## Privacy
All records are synthetic. Synthetic patient names and identifiers are generated by SafeOCR; no real patient data are used.
## Repository and demo
- Code and frozen evidence: https://github.com/AbdulazizShehri/SafeOCR
- Interactive verification playground: https://huggingface.co/spaces/MedScaleAI/SafeOCR
- Paper: arXiv identifier will be added at publication
## Dataset contents
The published repository contains:
- `images/*.png`: canonical synthetic laboratory report pages;
- `manifest.jsonl`: canonical audit manifest for the frozen release;
- `metadata.jsonl`: root metadata byte-identical to the canonical manifest;
- `images/metadata.jsonl`: compatibility ImageFolder metadata adapter;
- `viewer/calibration.parquet`: derived 24-row viewer split with embedded canonical images and metadata;
- `viewer/evaluation.parquet`: derived 48-row viewer split with embedded canonical images and metadata;
- `viewer/viewer_info.json`: viewer-layer counts and SHA-256 identities;
- `dataset_info.json`: canonical release counts and SHA-256 identities;
- `README.md`: this dataset card.
External datasets used in the paper are not redistributed here.
## License
The SafeOCR project and generated SafeOCR-LabGold artifacts are released under Apache-2.0 where applicable. Third-party datasets used in the paper retain their own terms and are **not** included in this Hugging Face dataset.
|