| title | BioSCRIBE - Toronto IOLMaster Report Parser |
|---|---|
| emoji | 👁️ |
| sdk | streamlit |
| sdk_version | 1.58.0 |
| app_file | app.py |
| pinned | false |
A parser for Carl Zeiss IOLMaster PDF reports.
Supported report types (driven by the PDF's title metadata):
IOL-HaigisIOL-Holladay-1IOL-SRK-TMMT-Full(raw biometry)
from toronto_report_parser import IOLMasterPDFParser
with IOLMasterPDFParser("Abboud 2.pdf") as parser:
data = parser.get_pdf_data()
print(data["title"], data["od"]["AL"])Batch-parse a directory to one Excel file:
python parse_pdf_reports.py "reports/*.pdf" -o parsed.xlsxTo compare parser output against the manual ground-truth in
../Manual_Extraction/*_Compare.xlsx:
python run_evaluation.py \
--pdfs ../IOL_PDFs \
--manual ../Manual_Extraction \
--out evaluation_outputOutputs:
- Console: per-report and overall accuracy + timing summary.
evaluation_output/diff_workbook.xlsx: side-by-side parser/truth values for every row, with mismatched cells highlighted in yellow.evaluation_output/transcription_review.xlsx: focused list of only the mismatched cells, with a "likely cause" heuristic to help Abu/Ninglu triage.
Current baseline on the 498-PDF corpus: 99.91 % cell-level accuracy at ~6 ms/file mean parse time.
pytest tests/test_normalize.py— fast unit tests for value parsers (no PDF needed).test_parser.py— integration tests against specific PDFs.test_accuracy.py— full-corpus accuracy + timing regression guards.
The latter two skip automatically if the IOL_PDFs/ and
Manual_Extraction/ directories aren't mounted.
toronto_report_parser/__init__.py—IOLMasterPDFParser(public entry point)regions.py— per-report-type pixel rectanglesspans.py— low-level PyMuPDF span helpersnormalize.py— flatten parsed dicts to the ground-truth schemaevaluate.py— accuracy + timing harness, diff workbook writer
Initial single-file parser by Bill Shi (2025-07-27). Refactored 2026-05 into the module layout above; original parsing logic preserved. Additions: footer-date extraction (Calibration/Print date), repeated WTW/Pup capture in MMT-Full, single-pass text-page extraction for ~40 % runtime improvement.