Repository navigation
perf(documents): OCR on real Russian and English scans - #404
Merged
Merged
Conversation
The synthetic OCR test put docTR with a third-party Russian model ahead of Tesseract everywhere. The owner asked to check that on real scans before porting docTR to TypeScript on onnxruntime. 125 real pages: 40 validated ru.wikisource scans (public domain), the same as simulated phone photos, 20 validated en.wikisource scans and 25 CORD v2 receipt photos (CC BY 4.0). fetch.py downloads the pages and the text revisions listed in selection.json; no images are committed. On real Russian scans Tesseract finds 89.4 % of the words, docTR with the Russian model 84.4 % with page turning off and 71.5 % with it on: docTR's page orientation model turned about 11 upright pages upside down. docTR reads two columns across. It wins only on receipt photos, where Tesseract returns nothing for 6 of 25. Recommendation: stay with Tesseract and --psm 1; do not port docTR now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The synthetic OCR test put docTR with a third-party Russian model ahead of Tesseract everywhere. The owner asked to confirm that on real scans before deciding whether to port docTR and the Russian model to TypeScript on onnxruntime.
What
performance/documents/ocr-ru-en/real/README.md: 125 real pages.
fetch.pydownloads the pages and the text revisions listed inselection.json. No images are committed.Word recall, order ignored (%):
Recommendation: stay with Tesseract and
--psm 1. Do not port docTR now.run_python.pygains the-straightdocTR engines. The topic and area READMEs link the follow-up.Testing
pnpm docs:check.fetch.pygave the same bytes for the pages checked.🤖 Generated with Claude Code