Recognition is 76% of arboOCR's CPU engine time and Session::Run alone is 95%
of recognition, so if you want the engine faster there is exactly one place to
look. v0.4.0 cuts −26% engine latency on the small tier, and most of it came
from deleting a constant.
If you ever passed --cuda or --tensorrt to a binary you unpacked from an
arboOCR release, you got CPU. Not an error, not a warning — CPU, and a
backend field quietly reading cpu. Every release before v0.3.0 shipped
without onnxruntime_providers_shared, the loader stub ONNX Runtime needs
before it can bring up either GPU provider.
v0.3.0 fixes that, takes model auto-download live, and refuses to publish a
package it has not run first. All four wrappers are pinned to it.
Yesterday's post has a section titled
The documented download path produced a broken models directory.
It fixed the downloader's missing dictionary file, and on the way through it
restated the standing position: arboOCR ships no default URL; the caller
supplies baseUrl. That sentence is now false.
ensureOcrModels(cfg) fetches missing weights from a default location,
verifies them against a checksum compiled into the binary, and caches them in a
platform-correct directory. First run downloads. Every run after that is
offline.
This is a reversal, one day old. It is worth being precise about which part of
the old position gave way, because it was not the reasoning.
Cold arbosmall went from ~84% to ~94% char similarity on a five-image
SROIE receipt smoke set, landing within ~0.2 pts of a TypeScript PaddleOCR
port measured on the same images. The interesting part is not the number — it
is that we got there without touching the recognizer size. Every point came
from layout, ordering, and detector scale.
RapidOCR publishes something most OCR projects do not: measured numbers for
its engine choices and its parameter defaults. Peak RSS with and without the
ONNXRuntime memory arena. CoreML against the CPU provider, per model. CUDA
against CPU on two different GPUs. Not "we chose X because X is fast" — actual
tables.
We read those tables against arboOCR's source. Where RapidOCR had measured
something and arboOCR had guessed, the measurement won. That is the entire
selection criterion for this round of changes, and it is also why four things
that look like obvious wins are not in it.