MedScale commited on
Commit
e47e563
·
verified ·
1 Parent(s): 4cb98c9

release: publish SafeOCR-LabGold v0.1

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. README.md +98 -0
  2. dataset_info.json +10 -0
  3. images/labgold-calibration-000101-classic-clean.png +3 -0
  4. images/labgold-calibration-000101-classic-corrupt-005001.png +3 -0
  5. images/labgold-calibration-000102-compact-clean.png +3 -0
  6. images/labgold-calibration-000102-compact-corrupt-005002.png +3 -0
  7. images/labgold-calibration-000103-grid-clean.png +3 -0
  8. images/labgold-calibration-000103-grid-corrupt-005003.png +3 -0
  9. images/labgold-calibration-000104-classic-clean.png +3 -0
  10. images/labgold-calibration-000104-classic-corrupt-005004.png +3 -0
  11. images/labgold-calibration-000105-compact-clean.png +3 -0
  12. images/labgold-calibration-000105-compact-corrupt-005005.png +3 -0
  13. images/labgold-calibration-000106-grid-clean.png +3 -0
  14. images/labgold-calibration-000106-grid-corrupt-005006.png +3 -0
  15. images/labgold-calibration-000107-classic-clean.png +3 -0
  16. images/labgold-calibration-000107-classic-corrupt-005007.png +3 -0
  17. images/labgold-calibration-000108-compact-clean.png +3 -0
  18. images/labgold-calibration-000108-compact-corrupt-005008.png +3 -0
  19. images/labgold-calibration-000109-grid-clean.png +3 -0
  20. images/labgold-calibration-000109-grid-corrupt-005009.png +3 -0
  21. images/labgold-calibration-000110-classic-clean.png +3 -0
  22. images/labgold-calibration-000110-classic-corrupt-005010.png +3 -0
  23. images/labgold-calibration-000111-compact-clean.png +3 -0
  24. images/labgold-calibration-000111-compact-corrupt-005011.png +3 -0
  25. images/labgold-calibration-000112-grid-clean.png +3 -0
  26. images/labgold-calibration-000112-grid-corrupt-005012.png +3 -0
  27. images/labgold-evaluation-002001-classic-clean.png +3 -0
  28. images/labgold-evaluation-002001-classic-corrupt-009001.png +3 -0
  29. images/labgold-evaluation-002002-compact-clean.png +3 -0
  30. images/labgold-evaluation-002002-compact-corrupt-009002.png +3 -0
  31. images/labgold-evaluation-002003-grid-clean.png +3 -0
  32. images/labgold-evaluation-002003-grid-corrupt-009003.png +3 -0
  33. images/labgold-evaluation-002004-classic-clean.png +3 -0
  34. images/labgold-evaluation-002004-classic-corrupt-009004.png +3 -0
  35. images/labgold-evaluation-002005-compact-clean.png +3 -0
  36. images/labgold-evaluation-002005-compact-corrupt-009005.png +3 -0
  37. images/labgold-evaluation-002006-grid-clean.png +3 -0
  38. images/labgold-evaluation-002006-grid-corrupt-009006.png +3 -0
  39. images/labgold-evaluation-002007-classic-clean.png +3 -0
  40. images/labgold-evaluation-002007-classic-corrupt-009007.png +3 -0
  41. images/labgold-evaluation-002008-compact-clean.png +3 -0
  42. images/labgold-evaluation-002008-compact-corrupt-009008.png +3 -0
  43. images/labgold-evaluation-002009-grid-clean.png +3 -0
  44. images/labgold-evaluation-002009-grid-corrupt-009009.png +3 -0
  45. images/labgold-evaluation-002010-classic-clean.png +3 -0
  46. images/labgold-evaluation-002010-classic-corrupt-009010.png +3 -0
  47. images/labgold-evaluation-002011-compact-clean.png +3 -0
  48. images/labgold-evaluation-002011-compact-corrupt-009011.png +3 -0
  49. images/labgold-evaluation-002012-grid-clean.png +3 -0
  50. 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

  • SHA256: 09b3eab0b7fd1892a945e136c3535ee93d7ca3de16a8d511425d15ab443d95d9
  • Pointer size: 130 Bytes
  • Size of remote file: 38.2 kB
images/labgold-calibration-000101-classic-corrupt-005001.png ADDED

Git LFS Details

  • SHA256: 4e1af22a9d66787345dbb2710c8f0af9feca75635ab0c23b6acffae4f56c1ae3
  • Pointer size: 130 Bytes
  • Size of remote file: 99.9 kB
images/labgold-calibration-000102-compact-clean.png ADDED

Git LFS Details

  • SHA256: a68ced96b5b6c26891451bcd3335459cf4b0daafbd791084ded70fea06761ed3
  • Pointer size: 130 Bytes
  • Size of remote file: 31.6 kB
images/labgold-calibration-000102-compact-corrupt-005002.png ADDED

Git LFS Details

  • SHA256: 15149b7081c8d4c309f88a3e62be28683f79516a2f701ec24f36bc6dd809834e
  • Pointer size: 130 Bytes
  • Size of remote file: 97.8 kB
images/labgold-calibration-000103-grid-clean.png ADDED

Git LFS Details

  • SHA256: 27bf030be1192abe206891aeefa75ac75fd72728fc7a9175f825a8d70f20cad1
  • Pointer size: 130 Bytes
  • Size of remote file: 38.6 kB
images/labgold-calibration-000103-grid-corrupt-005003.png ADDED

Git LFS Details

  • SHA256: 9543d083db75a8f5aa73232156cba975fa97c964ab59e5e2326172f194f947a9
  • Pointer size: 131 Bytes
  • Size of remote file: 146 kB
images/labgold-calibration-000104-classic-clean.png ADDED

Git LFS Details

  • SHA256: bcf471d72afaba1c3b76ea04355d86e11903fd54f520ad4f1df0dfa8972a1ad4
  • Pointer size: 130 Bytes
  • Size of remote file: 37.4 kB
images/labgold-calibration-000104-classic-corrupt-005004.png ADDED

Git LFS Details

  • SHA256: c77f257e30ab7f24a0ca3fa569b129e7f4c50b7a981a70e6399d17bd7ae42495
  • Pointer size: 131 Bytes
  • Size of remote file: 120 kB
images/labgold-calibration-000105-compact-clean.png ADDED

Git LFS Details

  • SHA256: b444a9417a69c33683bab1238867d5c6c7d9169d2794f9d2c104d3f22a0be60f
  • Pointer size: 130 Bytes
  • Size of remote file: 32 kB
images/labgold-calibration-000105-compact-corrupt-005005.png ADDED

Git LFS Details

  • SHA256: a2e987353f7973a8333aa00716fb1079fb9c16a2a613c3ef8e185da9d601d6e4
  • Pointer size: 131 Bytes
  • Size of remote file: 102 kB
images/labgold-calibration-000106-grid-clean.png ADDED

Git LFS Details

  • SHA256: facea41ecf0431a4bf2afccbdd1dc73a239e4a4af859c15c9cb6c083a6001f3f
  • Pointer size: 130 Bytes
  • Size of remote file: 38.4 kB
images/labgold-calibration-000106-grid-corrupt-005006.png ADDED

Git LFS Details

  • SHA256: fe4a0dd7165c3fea0944887e99689a8ff1de4340cd3f6a1dcbfb7810442e543c
  • Pointer size: 131 Bytes
  • Size of remote file: 115 kB
images/labgold-calibration-000107-classic-clean.png ADDED

Git LFS Details

  • SHA256: 661f2773bdc7912f35cb65b77cc0cd1b246aa2a8c1e7c9eb30f06242d932cb7d
  • Pointer size: 130 Bytes
  • Size of remote file: 36.9 kB
images/labgold-calibration-000107-classic-corrupt-005007.png ADDED

Git LFS Details

  • SHA256: 5a638142d22aa71c0953cc590f66db2a1546879d1c2022ee0ec84c6951529904
  • Pointer size: 131 Bytes
  • Size of remote file: 119 kB
images/labgold-calibration-000108-compact-clean.png ADDED

Git LFS Details

  • SHA256: f54cdae42e6756926c4f6f0e62ff0a0df717bf3c30fb31691ef6c5035a0e8e82
  • Pointer size: 130 Bytes
  • Size of remote file: 30.3 kB
images/labgold-calibration-000108-compact-corrupt-005008.png ADDED

Git LFS Details

  • SHA256: 57bfba36fb1e2b8ff6d9dd282b75f8743cbd2dd34d2a62fb9e02ab6e7f97b8e6
  • Pointer size: 130 Bytes
  • Size of remote file: 78.5 kB
images/labgold-calibration-000109-grid-clean.png ADDED

Git LFS Details

  • SHA256: 257836c9c01df095d32fd268b068a930d53b83e524faa7fde0b0acd54000cde8
  • Pointer size: 130 Bytes
  • Size of remote file: 37.5 kB
images/labgold-calibration-000109-grid-corrupt-005009.png ADDED

Git LFS Details

  • SHA256: a9a20598fc92a2337ec06b839cd8737142d74f77c641c44b80dd7e701cd32874
  • Pointer size: 131 Bytes
  • Size of remote file: 119 kB
images/labgold-calibration-000110-classic-clean.png ADDED

Git LFS Details

  • SHA256: 0d835ceaa3d68245db65288a1ab7d3300b5de95dfc2f98b6c0401b692c14fe21
  • Pointer size: 130 Bytes
  • Size of remote file: 37.3 kB
images/labgold-calibration-000110-classic-corrupt-005010.png ADDED

Git LFS Details

  • SHA256: cce5d618da58af47fe01fcc10865671a8417b16c96ec1ccb5313cd288ea6b955
  • Pointer size: 131 Bytes
  • Size of remote file: 126 kB
images/labgold-calibration-000111-compact-clean.png ADDED

Git LFS Details

  • SHA256: 7b508b8453d1d9fa3d08378e07926931d7914448741d16609d873e06aa7f8500
  • Pointer size: 130 Bytes
  • Size of remote file: 31.3 kB
images/labgold-calibration-000111-compact-corrupt-005011.png ADDED

Git LFS Details

  • SHA256: 32c9f79644da57c54a47a4e291a17e388a6f154be2b684161913774ee79bc39e
  • Pointer size: 130 Bytes
  • Size of remote file: 74.7 kB
images/labgold-calibration-000112-grid-clean.png ADDED

Git LFS Details

  • SHA256: 96d3b3e0d2b7f3e44dcda6d00b0f76e7b25b443346e7362c9c21ff115ba052bd
  • Pointer size: 130 Bytes
  • Size of remote file: 39.1 kB
images/labgold-calibration-000112-grid-corrupt-005012.png ADDED

Git LFS Details

  • SHA256: 4cb90d48cb019449d2ef2c4919b15e3eab095fc3d7312a008a9338e8002ee1ed
  • Pointer size: 131 Bytes
  • Size of remote file: 125 kB
images/labgold-evaluation-002001-classic-clean.png ADDED

Git LFS Details

  • SHA256: a76f0a571eab76229049a7fade4bad0f9ca8bcee32f1b5d4f863df341ed71fd9
  • Pointer size: 130 Bytes
  • Size of remote file: 38.3 kB
images/labgold-evaluation-002001-classic-corrupt-009001.png ADDED

Git LFS Details

  • SHA256: 6d626c10082b83d3163b83bec203e683a2fcf2a0c8c7f17a73df2ec8b13cc372
  • Pointer size: 131 Bytes
  • Size of remote file: 110 kB
images/labgold-evaluation-002002-compact-clean.png ADDED

Git LFS Details

  • SHA256: 6849ffaad788f3cb668e04dcb26db03714f6e4d7a5110ec713eb88d64215ea62
  • Pointer size: 130 Bytes
  • Size of remote file: 31.5 kB
images/labgold-evaluation-002002-compact-corrupt-009002.png ADDED

Git LFS Details

  • SHA256: d6558c53b687d0145d1863484d44968383454fc974b7c9590888992c5543d30a
  • Pointer size: 130 Bytes
  • Size of remote file: 97.8 kB
images/labgold-evaluation-002003-grid-clean.png ADDED

Git LFS Details

  • SHA256: 99d0f4742423edf12bb63c4025e3859e5a03827319318fe8b2b3a333105bb298
  • Pointer size: 130 Bytes
  • Size of remote file: 38.3 kB
images/labgold-evaluation-002003-grid-corrupt-009003.png ADDED

Git LFS Details

  • SHA256: bfe61fc3c7cf87ea39c0668138719bb6ee32de5bbbf90142bcbb690501b0b9ea
  • Pointer size: 131 Bytes
  • Size of remote file: 135 kB
images/labgold-evaluation-002004-classic-clean.png ADDED

Git LFS Details

  • SHA256: 735c747db8155f12d27442cc736c68a1a9c293ea3e326bcf6f403b24b693270a
  • Pointer size: 130 Bytes
  • Size of remote file: 37.1 kB
images/labgold-evaluation-002004-classic-corrupt-009004.png ADDED

Git LFS Details

  • SHA256: 3cb599a32e05d5fc477c228455075d1761c9ce0e1bade63a2f97c208a08eeaa8
  • Pointer size: 131 Bytes
  • Size of remote file: 124 kB
images/labgold-evaluation-002005-compact-clean.png ADDED

Git LFS Details

  • SHA256: ebd9172d4f70e90e1bb6930152cd9a443d79ba75c72701a1f305a59511e648ab
  • Pointer size: 130 Bytes
  • Size of remote file: 30.6 kB
images/labgold-evaluation-002005-compact-corrupt-009005.png ADDED

Git LFS Details

  • SHA256: 2cbfbd96b49940894c3b2f652ad6839baddbb1d573e371f2dcd3ac566aa30ba8
  • Pointer size: 131 Bytes
  • Size of remote file: 106 kB
images/labgold-evaluation-002006-grid-clean.png ADDED

Git LFS Details

  • SHA256: e29dbcebe4338a7207c07c4ecf244c6e85fb17ed09812a1bd43c4271f863a539
  • Pointer size: 130 Bytes
  • Size of remote file: 37.5 kB
images/labgold-evaluation-002006-grid-corrupt-009006.png ADDED

Git LFS Details

  • SHA256: 28889e89bda577d369e82e18d3c00242cc9f6aad39df2f225b6e7b75f6e1a127
  • Pointer size: 131 Bytes
  • Size of remote file: 123 kB
images/labgold-evaluation-002007-classic-clean.png ADDED

Git LFS Details

  • SHA256: 71b2f355e8475a9f94b89dac2ccec692c0cd56455dd7052ede37b6d2c85a0d36
  • Pointer size: 130 Bytes
  • Size of remote file: 37.1 kB
images/labgold-evaluation-002007-classic-corrupt-009007.png ADDED

Git LFS Details

  • SHA256: fc86abf0cbecb8963689cc8d9605ac16b4f1d3f07c13d3fdfebb3b43b5f1627e
  • Pointer size: 131 Bytes
  • Size of remote file: 125 kB
images/labgold-evaluation-002008-compact-clean.png ADDED

Git LFS Details

  • SHA256: 25365ec490edf73bc87f298ce09d103427bc97f69d5fa2f27887119e707b8ae8
  • Pointer size: 130 Bytes
  • Size of remote file: 31.1 kB
images/labgold-evaluation-002008-compact-corrupt-009008.png ADDED

Git LFS Details

  • SHA256: 7f09938b36acc57a8a476ff96454bb3f2e4512d6778fba3e5fb9d56cc97124a4
  • Pointer size: 130 Bytes
  • Size of remote file: 98.1 kB
images/labgold-evaluation-002009-grid-clean.png ADDED

Git LFS Details

  • SHA256: b7e2e2b7e6c3155a464277964f74912749730b2c7761f693e0ed9c2a58d43d67
  • Pointer size: 130 Bytes
  • Size of remote file: 37.9 kB
images/labgold-evaluation-002009-grid-corrupt-009009.png ADDED

Git LFS Details

  • SHA256: 6bc62b26bc2be33ce53bba042d3398b2636f6333f3254427de312fe3361b3594
  • Pointer size: 131 Bytes
  • Size of remote file: 137 kB
images/labgold-evaluation-002010-classic-clean.png ADDED

Git LFS Details

  • SHA256: 0f67d96b459bb3cba22456b90d6fc9d402435069b1998c11d54b07d615d0f331
  • Pointer size: 130 Bytes
  • Size of remote file: 37.1 kB
images/labgold-evaluation-002010-classic-corrupt-009010.png ADDED

Git LFS Details

  • SHA256: 48b49ec3d0d30489874319eb51801b68948e79f4ada0f0e2ca885a7612cefc49
  • Pointer size: 131 Bytes
  • Size of remote file: 120 kB
images/labgold-evaluation-002011-compact-clean.png ADDED

Git LFS Details

  • SHA256: 3a3e6233f28770e1b14ced26a67c9f1c98d10a1c5c5e018d4d114aca3c41a564
  • Pointer size: 130 Bytes
  • Size of remote file: 30.7 kB
images/labgold-evaluation-002011-compact-corrupt-009011.png ADDED

Git LFS Details

  • SHA256: c0a7a3947b675bc1ed44575dcdb6bbb5d51b49d8f8362a918659e1c229319e2c
  • Pointer size: 131 Bytes
  • Size of remote file: 102 kB
images/labgold-evaluation-002012-grid-clean.png ADDED

Git LFS Details

  • SHA256: d508a17dd24df77f7d883f6f33fd00fbb09eaf159faecefb19785c0d97f778aa
  • Pointer size: 130 Bytes
  • Size of remote file: 38.5 kB
images/labgold-evaluation-002012-grid-corrupt-009012.png ADDED

Git LFS Details

  • SHA256: ee6c5785989b52395a1ce5ca202039442291dc04938a637aba2d2f4a35285ebd
  • Pointer size: 131 Bytes
  • Size of remote file: 129 kB