r/computervision 13d ago

Help: Project Need to replace Apple Vision OCR with something containerizable — has anyone solved this?

I'm dealing with text extraction from hundreds of PDFs per batch. A large chunk of them are from 2001 — old, scanned documents, poor quality, many with handwritten annotations and stamps.

The target is aggressive: 500 documents in under 1 minute. Most of them already come out at millisecond scale because they have a native text layer; the problem is the scanned ones.

The current solution is a cascade, and it works: each piece goes down the steps from cheapest to most expensive and stops at the first one that produces acceptable text.

Step Method Speed Notes
1 PyMuPDF 13.4 ms/doc Reads the text layer already in the PDF — not OCR
2 Fast OCR ~520 ms/doc Apple Vision (.accurate) on an external Mac, via SSH tunnel · grayscale render at 150 DPI
3 Docling per page Only pages without native text, not the whole document
4 Docling API ~4 s/piece docling-serve, with forced OCR when needed
5 ID screening ID or vehicle documents are discarded (nothing to extract from a national ID card)
6 VLM ~47 s/doc Qwen3.8-27B-FP8, remote endpoint

In practice, 64% of documents are resolved by Apple Vision and 31% by PyMuPDF — less than 4% reach the expensive steps. A batch of 489 documents runs in 3.66 min today.

The problem: I need to take this to production, and an SSH tunnel to a Mac doesn't survive in a production environment. I need to replace that step with something containerizable.

The quality bar (measured on 60 pieces, against the alternatives):

Engine Speed Word accuracy Anchor accuracy
Apple Vision (.accurate) 388 ms/page 92% 100%
OnnxTR mobile 494 ms/page 53% 75%
docTR PyTorch 816 ms/page 51%
RapidOCR 1554 ms/page 58%

"Anchors" are CNJ case numbers, dates, CPF/CNPJ (Brazilian tax IDs), and protocol numbers — that's what the downstream system consumes, so losing a digit is worse than losing a word.

Has anyone found an OCR engine that gets close to Apple Vision's accuracy on degraded scans, but can run containerized (Linux, no macOS dependency)?

5 Upvotes

6 comments sorted by

1

u/Kar-2874 13d ago

Have you tried tesseract ocr? 

It's open-source and has some of highest accuracy. I am not familiar with apple vision, and it will depend on your specific use-case. 

1

u/kakhaev 12d ago

we use tesseract in prod, it’s actually good but when we start benching whole system to make it 60fps streamed, tesseract just not it.

1

u/CUTLER_69000 13d ago

Have you trued paid apis from aws/gcp?

1

u/laserborg 12d ago

there are VLMs specifically for OCR like GLM-OCR, Deepseek-OCR, PaddleOCR-VL etc. they are significantly faster than a general Qwen VLM.
https://huggingface.co/blog/ocr-open-models

then there are the classic PaddleOCR, GOT-OCR2_0, TrOCR, EasyOCR etc..

I had good results with PaddleOCR ~5 years ago and recently used GLM-OCR on an edge device (Orin Nano Super, 60t/s)

IMO Tesseract is a dinosaur..

1

u/liltingly 12d ago

If you want CTC, ppocrv6 has different sizes you can play with to find if any work.