release: publish SafeOCR-LabGold v0.1
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- README.md +98 -0
- dataset_info.json +10 -0
- images/labgold-calibration-000101-classic-clean.png +3 -0
- images/labgold-calibration-000101-classic-corrupt-005001.png +3 -0
- images/labgold-calibration-000102-compact-clean.png +3 -0
- images/labgold-calibration-000102-compact-corrupt-005002.png +3 -0
- images/labgold-calibration-000103-grid-clean.png +3 -0
- images/labgold-calibration-000103-grid-corrupt-005003.png +3 -0
- images/labgold-calibration-000104-classic-clean.png +3 -0
- images/labgold-calibration-000104-classic-corrupt-005004.png +3 -0
- images/labgold-calibration-000105-compact-clean.png +3 -0
- images/labgold-calibration-000105-compact-corrupt-005005.png +3 -0
- images/labgold-calibration-000106-grid-clean.png +3 -0
- images/labgold-calibration-000106-grid-corrupt-005006.png +3 -0
- images/labgold-calibration-000107-classic-clean.png +3 -0
- images/labgold-calibration-000107-classic-corrupt-005007.png +3 -0
- images/labgold-calibration-000108-compact-clean.png +3 -0
- images/labgold-calibration-000108-compact-corrupt-005008.png +3 -0
- images/labgold-calibration-000109-grid-clean.png +3 -0
- images/labgold-calibration-000109-grid-corrupt-005009.png +3 -0
- images/labgold-calibration-000110-classic-clean.png +3 -0
- images/labgold-calibration-000110-classic-corrupt-005010.png +3 -0
- images/labgold-calibration-000111-compact-clean.png +3 -0
- images/labgold-calibration-000111-compact-corrupt-005011.png +3 -0
- images/labgold-calibration-000112-grid-clean.png +3 -0
- images/labgold-calibration-000112-grid-corrupt-005012.png +3 -0
- images/labgold-evaluation-002001-classic-clean.png +3 -0
- images/labgold-evaluation-002001-classic-corrupt-009001.png +3 -0
- images/labgold-evaluation-002002-compact-clean.png +3 -0
- images/labgold-evaluation-002002-compact-corrupt-009002.png +3 -0
- images/labgold-evaluation-002003-grid-clean.png +3 -0
- images/labgold-evaluation-002003-grid-corrupt-009003.png +3 -0
- images/labgold-evaluation-002004-classic-clean.png +3 -0
- images/labgold-evaluation-002004-classic-corrupt-009004.png +3 -0
- images/labgold-evaluation-002005-compact-clean.png +3 -0
- images/labgold-evaluation-002005-compact-corrupt-009005.png +3 -0
- images/labgold-evaluation-002006-grid-clean.png +3 -0
- images/labgold-evaluation-002006-grid-corrupt-009006.png +3 -0
- images/labgold-evaluation-002007-classic-clean.png +3 -0
- images/labgold-evaluation-002007-classic-corrupt-009007.png +3 -0
- images/labgold-evaluation-002008-compact-clean.png +3 -0
- images/labgold-evaluation-002008-compact-corrupt-009008.png +3 -0
- images/labgold-evaluation-002009-grid-clean.png +3 -0
- images/labgold-evaluation-002009-grid-corrupt-009009.png +3 -0
- images/labgold-evaluation-002010-classic-clean.png +3 -0
- images/labgold-evaluation-002010-classic-corrupt-009010.png +3 -0
- images/labgold-evaluation-002011-compact-clean.png +3 -0
- images/labgold-evaluation-002011-compact-corrupt-009011.png +3 -0
- images/labgold-evaluation-002012-grid-clean.png +3 -0
- images/labgold-evaluation-002012-grid-corrupt-009012.png +3 -0
README.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pretty_name: SafeOCR-LabGold
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
language:
|
| 5 |
+
- en
|
| 6 |
+
size_categories:
|
| 7 |
+
- n<1K
|
| 8 |
+
tags:
|
| 9 |
+
- clinical-ocr
|
| 10 |
+
- healthcare
|
| 11 |
+
- synthetic
|
| 12 |
+
- verification
|
| 13 |
+
- fhir
|
| 14 |
+
- benchmark
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# SafeOCR-LabGold
|
| 18 |
+
|
| 19 |
+
**SafeOCR-LabGold** is the synthetic laboratory-report benchmark used to develop and evaluate the frozen SafeOCR v0.1 verification policy.
|
| 20 |
+
|
| 21 |
+
## Dataset summary
|
| 22 |
+
|
| 23 |
+
The complete frozen split contains:
|
| 24 |
+
|
| 25 |
+
| Split | Synthetic records | Rendered documents | Critical fields |
|
| 26 |
+
|---|---:|---:|---:|
|
| 27 |
+
| Calibration | 12 | 24 | 144 |
|
| 28 |
+
| Final evaluation | 24 | 48 | 288 |
|
| 29 |
+
| Total | 36 | 72 | 432 |
|
| 30 |
+
|
| 31 |
+
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.
|
| 32 |
+
|
| 33 |
+
The paper reports the **48-document / 288-critical-field final evaluation split**.
|
| 34 |
+
|
| 35 |
+
## Intended use
|
| 36 |
+
|
| 37 |
+
Use SafeOCR-LabGold for:
|
| 38 |
+
|
| 39 |
+
- deterministic clinical-OCR verification research;
|
| 40 |
+
- regression tests for evidence binding and selective-decision policies;
|
| 41 |
+
- reproducible demonstrations of review/abstention behavior;
|
| 42 |
+
- studying automation-versus-review trade-offs under the frozen v0.1 benchmark.
|
| 43 |
+
|
| 44 |
+
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.
|
| 45 |
+
|
| 46 |
+
## Frozen result boundary
|
| 47 |
+
|
| 48 |
+
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.
|
| 49 |
+
|
| 50 |
+
## Data generation and byte-level reproducibility
|
| 51 |
+
|
| 52 |
+
The benchmark generator is deterministic for a fixed renderer stack:
|
| 53 |
+
|
| 54 |
+
```bash
|
| 55 |
+
python scripts/prepare_hf_labgold.py --output dist/SafeOCR-LabGold
|
| 56 |
+
```
|
| 57 |
+
|
| 58 |
+
The canonical Hugging Face v0.1 publication package is bound by:
|
| 59 |
+
|
| 60 |
+
- `manifest_sha256 = 3a3fcdf1e3e045c0b6f8b334457d1e22dbd247a6a556e08235f808143abf5cec`;
|
| 61 |
+
- Python 3.12.13;
|
| 62 |
+
- Pillow 12.3.0;
|
| 63 |
+
- FreeType 2.14.3;
|
| 64 |
+
- JPEG feature version 8.0;
|
| 65 |
+
- zlib 1.3.1.zlib-ng;
|
| 66 |
+
- platform `win32:AMD64`.
|
| 67 |
+
|
| 68 |
+
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.
|
| 69 |
+
|
| 70 |
+
This renderer dependency does not change the frozen evaluation results or claim boundaries; it is a byte-level reproducibility constraint on regenerated corrupted images.
|
| 71 |
+
|
| 72 |
+
The generator records exact case identity, template, source seed, corruption seed, document hash, page hash, image filename, and truth-region metadata. It also writes Hugging Face `ImageFolder` metadata through `metadata.jsonl` with a `file_name` field so images and metadata can be loaded together.
|
| 73 |
+
|
| 74 |
+
## Privacy
|
| 75 |
+
|
| 76 |
+
All records are synthetic. Synthetic patient names and identifiers are generated by SafeOCR; no real patient data are used.
|
| 77 |
+
|
| 78 |
+
## Repository and demo
|
| 79 |
+
|
| 80 |
+
- Code and frozen evidence: https://github.com/AbdulazizShehri/SafeOCR
|
| 81 |
+
- Interactive verification playground: https://huggingface.co/spaces/MedScaleAI/SafeOCR
|
| 82 |
+
- Paper: arXiv identifier will be added at publication
|
| 83 |
+
|
| 84 |
+
## Dataset contents
|
| 85 |
+
|
| 86 |
+
The published repository contains:
|
| 87 |
+
|
| 88 |
+
- `images/*.png`: deterministic synthetic laboratory report pages;
|
| 89 |
+
- `metadata.jsonl`: Hugging Face `ImageFolder` metadata keyed by `file_name`;
|
| 90 |
+
- `manifest.jsonl`: byte-identical audit manifest for the frozen release;
|
| 91 |
+
- `dataset_info.json`: release counts and SHA-256 identities;
|
| 92 |
+
- `README.md`: this dataset card.
|
| 93 |
+
|
| 94 |
+
External datasets used in the paper are not redistributed here.
|
| 95 |
+
|
| 96 |
+
## License
|
| 97 |
+
|
| 98 |
+
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.
|
dataset_info.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"calibration_documents": 24,
|
| 3 |
+
"case_count": 72,
|
| 4 |
+
"critical_fields_per_document": 6,
|
| 5 |
+
"evaluation_documents": 48,
|
| 6 |
+
"manifest_sha256": "3a3fcdf1e3e045c0b6f8b334457d1e22dbd247a6a556e08235f808143abf5cec",
|
| 7 |
+
"metadata_sha256": "3a3fcdf1e3e045c0b6f8b334457d1e22dbd247a6a556e08235f808143abf5cec",
|
| 8 |
+
"readme_sha256": "c93570fc981740eb09617b0f93a5436f22a8694b411ad5587f44acc947516a23",
|
| 9 |
+
"schema_version": 1
|
| 10 |
+
}
|
images/labgold-calibration-000101-classic-clean.png
ADDED
|
Git LFS Details
|
images/labgold-calibration-000101-classic-corrupt-005001.png
ADDED
|
Git LFS Details
|
images/labgold-calibration-000102-compact-clean.png
ADDED
|
Git LFS Details
|
images/labgold-calibration-000102-compact-corrupt-005002.png
ADDED
|
Git LFS Details
|
images/labgold-calibration-000103-grid-clean.png
ADDED
|
Git LFS Details
|
images/labgold-calibration-000103-grid-corrupt-005003.png
ADDED
|
Git LFS Details
|
images/labgold-calibration-000104-classic-clean.png
ADDED
|
Git LFS Details
|
images/labgold-calibration-000104-classic-corrupt-005004.png
ADDED
|
Git LFS Details
|
images/labgold-calibration-000105-compact-clean.png
ADDED
|
Git LFS Details
|
images/labgold-calibration-000105-compact-corrupt-005005.png
ADDED
|
Git LFS Details
|
images/labgold-calibration-000106-grid-clean.png
ADDED
|
Git LFS Details
|
images/labgold-calibration-000106-grid-corrupt-005006.png
ADDED
|
Git LFS Details
|
images/labgold-calibration-000107-classic-clean.png
ADDED
|
Git LFS Details
|
images/labgold-calibration-000107-classic-corrupt-005007.png
ADDED
|
Git LFS Details
|
images/labgold-calibration-000108-compact-clean.png
ADDED
|
Git LFS Details
|
images/labgold-calibration-000108-compact-corrupt-005008.png
ADDED
|
Git LFS Details
|
images/labgold-calibration-000109-grid-clean.png
ADDED
|
Git LFS Details
|
images/labgold-calibration-000109-grid-corrupt-005009.png
ADDED
|
Git LFS Details
|
images/labgold-calibration-000110-classic-clean.png
ADDED
|
Git LFS Details
|
images/labgold-calibration-000110-classic-corrupt-005010.png
ADDED
|
Git LFS Details
|
images/labgold-calibration-000111-compact-clean.png
ADDED
|
Git LFS Details
|
images/labgold-calibration-000111-compact-corrupt-005011.png
ADDED
|
Git LFS Details
|
images/labgold-calibration-000112-grid-clean.png
ADDED
|
Git LFS Details
|
images/labgold-calibration-000112-grid-corrupt-005012.png
ADDED
|
Git LFS Details
|
images/labgold-evaluation-002001-classic-clean.png
ADDED
|
Git LFS Details
|
images/labgold-evaluation-002001-classic-corrupt-009001.png
ADDED
|
Git LFS Details
|
images/labgold-evaluation-002002-compact-clean.png
ADDED
|
Git LFS Details
|
images/labgold-evaluation-002002-compact-corrupt-009002.png
ADDED
|
Git LFS Details
|
images/labgold-evaluation-002003-grid-clean.png
ADDED
|
Git LFS Details
|
images/labgold-evaluation-002003-grid-corrupt-009003.png
ADDED
|
Git LFS Details
|
images/labgold-evaluation-002004-classic-clean.png
ADDED
|
Git LFS Details
|
images/labgold-evaluation-002004-classic-corrupt-009004.png
ADDED
|
Git LFS Details
|
images/labgold-evaluation-002005-compact-clean.png
ADDED
|
Git LFS Details
|
images/labgold-evaluation-002005-compact-corrupt-009005.png
ADDED
|
Git LFS Details
|
images/labgold-evaluation-002006-grid-clean.png
ADDED
|
Git LFS Details
|
images/labgold-evaluation-002006-grid-corrupt-009006.png
ADDED
|
Git LFS Details
|
images/labgold-evaluation-002007-classic-clean.png
ADDED
|
Git LFS Details
|
images/labgold-evaluation-002007-classic-corrupt-009007.png
ADDED
|
Git LFS Details
|
images/labgold-evaluation-002008-compact-clean.png
ADDED
|
Git LFS Details
|
images/labgold-evaluation-002008-compact-corrupt-009008.png
ADDED
|
Git LFS Details
|
images/labgold-evaluation-002009-grid-clean.png
ADDED
|
Git LFS Details
|
images/labgold-evaluation-002009-grid-corrupt-009009.png
ADDED
|
Git LFS Details
|
images/labgold-evaluation-002010-classic-clean.png
ADDED
|
Git LFS Details
|
images/labgold-evaluation-002010-classic-corrupt-009010.png
ADDED
|
Git LFS Details
|
images/labgold-evaluation-002011-compact-clean.png
ADDED
|
Git LFS Details
|
images/labgold-evaluation-002011-compact-corrupt-009011.png
ADDED
|
Git LFS Details
|
images/labgold-evaluation-002012-grid-clean.png
ADDED
|
Git LFS Details
|
images/labgold-evaluation-002012-grid-corrupt-009012.png
ADDED
|
Git LFS Details
|