Repository navigation
perf(documents): OCR on Russian and English pages, Tesseract vs docTR vs PaddleOCR - #403
Merged
Merged
Conversation
… vs PaddleOCR read_scans: local runs the system tesseract (rus+eng) through cli-core. The owner asked whether Tesseract is good enough; OmniDocBench covers English and Chinese only. This measures Tesseract (fast and best models, and with --psm 1), docTR (official and a community Russian model via OnnxTR) and PaddleOCR 3.7 (eslav model, server and mobile detectors) on 56 synthetic pages: 8 documents x 7 scan and photo variants. Headline, CER with case and punctuation ignored: - Tesseract: clean Russian 1.0, photos 23.7; a page on its side 85, and 2.8 with --psm 1 at 0.3 s more per page. - docTR official: no Cyrillic model, Russian 77.7. - docTR pipeline + Russian PARSeq on ONNX: 0.3-0.7 on every variant. - PaddleOCR eslav: clean Russian 0.8, photos 26.5; writes English words in Russian text with Cyrillic look-alikes and reads two columns across. Recommendation: keep Tesseract as the default and add --psm 1 to cli-core's command; treat the docTR pipeline on onnxruntime as the candidate replacement after a test on real scans. The generator rebuilds the pages from a seed, so no image is committed; every engine's output is in results/. 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
read_scans: localreads scans with the systemtesseract(rus+eng) through cli-core 0.742.0 (ydisk 0.7.0, drive 0.75.x). The owner asked whether Tesseract is good enough. OmniDocBench puts PaddleOCR far ahead, but on English and Chinese only; nobody had compared the engines on Russian. This picks the engine behindread_scans: local.What
performance/documents/ocr-ru-en: 56 synthetic pages (8 Russian, English and mixed documents x 7 variants: clean 300 dpi, 150 dpi, noise and blur, 2–5°, 90°, photo, phone JPEG), the generator, the runners, every engine's output and the scores. No image is committed; the generator rebuilds identical pages from the seed.
CER with case and punctuation ignored, %:
eslav_PP-OCRv5_mobile_rec--psm 1fixes that (2.8) at 0.3 s more per page and changes nothing else.Recommendation: keep Tesseract, add
--psm 1to cli-core's command; docTR's pipeline on onnxruntime is the candidate replacement after a test on real scans.Also:
biome.jsonignores the newresults/folder, andperformance/documents/README.mdlinks the page.Testing
pnpm standards:check,pnpm lint,pnpm docs:lint,pnpm docs:checkpass locally;ruff checkon the Python files; the generator rebuilt byte-identical pages and the scorer the same tables.The documents contain invented phone numbers (for example a Moscow-format
+7 (495) …); none is meant to be real.🤖 Generated with Claude Code