Repository navigation
Conversation
Signed-off-by: Mohamad Fakhouri <mohamad.fakhouri@quantco.com>
|
✅ DCO Check Passed Thanks @mohahf19, all your commits are properly signed off. 🎉 |
Merge Protections🟢 Merge protection satisfied — ready to merge. Show 1 satisfied protection🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
AI triage (advisory)Checked commit The PR makes the Tesseract CLI OCR model save DPI metadata ( CI safety: no concern found. A maintainer must still approve CI. The |
There was a problem hiding this comment.
AI first review (advisory): no blocker found
This review covers the full diff at 0a7ba5bf6d. It read the code and did not run it.
Minimal two-line fix: both temporary PNG writes in TesseractOcrCliModel.__call__ now include the render DPI. The fix is correct — Pillow writes a pHYs chunk and reads it back — and the regression test covers the orientation==0 path (first save only) and the orientation==90 path (both saves) at two scales. No blockers found; merge when CI passes.
A maintainer makes the merge decision. This review never approves the pull request.
Signed-off-by: Mohamad Fakhouri <mohamad.fakhouri@quantco.com>
Signed-off-by: Mohamad Fakhouri <mohamad.fakhouri@quantco.com>
Signed-off-by: Mohamad Fakhouri <mohamad.fakhouri@quantco.com>
There was a problem hiding this comment.
AI first review (advisory): no blocker found
This review covers the changes since 0a7ba5bf6d at 749713093e. It read the code and did not run it.
I found no defect. Both high_res_image.save(...) calls now pass dpi=(dpi, dpi). The test reads the DPI back from the PNG file that _run_tesseract receives.
A maintainer makes the merge decision. This review never approves the pull request.
2 liner + tests
Save DPI metadata in both temporary PNG writes so Tesseract CLI receives the render resolution before orientation detection and after rotation. Without DPI metadata, Tesseract estimates the resolution, which can cause it to misread small text.
Calculate DPI as
_POINTS_PER_INCH * scale: Docling uses 72 points per inch, as documented inPdfPageBackend.Add a PDF pipeline regression test for two scales and both save paths. Local tests and
make validatepass; no reference files changed.