Skip to content

--cuda never worked from a release archive until today

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.

The bug that leaves no evidence

ONNX Runtime does not link the execution providers. It dlopens them at runtime, on demand, after Ort::GetAvailableProviders() decides which ones are present. That is a reasonable design — it is what lets one binary run on a GPU host and a CPU host without two builds — but it has a nasty consequence for packaging: a missing provider library is invisible to every tool you would normally check with.

What you would reach for What it told you
The import table (dumpbin /dependents, objdump -p) Nothing. The providers are never imported, so they are never listed.
ldd on the Linux binary No missing dependency. ldd walks DT_NEEDED, and dlopen does not create one.
Running the binary Ran fine. Detection, recognition, JSON output — all correct, all on CPU.

So the failure had exactly one symptom: the backend string said cpu when you asked for tensorrt. That is the same symptom as a host with no GPU, which is a real and common situation, so the reading was always "this machine does not have it" rather than "the package does not have it".

How to tell whether this was you

Run the packaged binary with --json on any image and read the backend field, on a machine you know has a working CUDA or TensorRT install. On a pre-v0.3.0 archive it reads cpu no matter what you passed. On v0.3.0 it reads what actually loaded. Do not use a linker tool to check this — see the table above for why it will lie to you.

v0.3.0 ships onnxruntime_providers_shared.dll in the Windows zip and libonnxruntime_providers_shared.so in the Linux tarball. It is the first release where --cuda and --tensorrt can load from a published package at all. Nothing about the flags, the fallback order, or backend() changed — they finally have something to find.

Auto-download is live

The default model URL described in We said there would never be a default model URL is in a release now. Missing weights are fetched from

https://github.com/ARBO-TEAM/arbo-ocr-models/releases/download/models-v1/

verified against a SHA-256 manifest compiled into the binary, and cached per-platform. First run downloads; every run after that is offline. An explicit path you set is still never substituted by a download, and ARBOOCR_OFFLINE=1 still turns the whole thing off. Full precedence rules are on Model downloader.

A package that cannot run does not get published

The GPU bug survived every release before this one because nothing in the pipeline ever executed the thing it was about to upload. Both release jobs now do, from the package's own directory rather than from the build tree:

# Run the packaged binary where a user would run it — not where it was built,
# which is the only place its dependencies happen to be lying around.
cd dist/arboocr && ./arboocr_demo --json --draw out.png --clahe --angle
./arboocr_demo --download-models

Packaging also resolves the real dependency closure instead of a hand-kept list. A package that cannot start is a failed release, not a support ticket three weeks later.

Smaller build, same download

OpenCV now builds 9 modules instead of 14 — calib3d, dnn, highgui, objdetect and stitching are gone, which also drops quirc out of the dependency graph entirely. The Linux CI apt list went from 21 packages to 9–10. Both are build-time wins: less to compile, less to install, fewer things that can break a runner.

This did not make your download smaller

We initially measured a 27% reduction and it was wrong — it compared against a polluted local build directory, not against a shipped package. vcpkg's applocal deployment was already trimming the package to what the binary actually loads, so there was nothing left for the module cut to remove. Windows went 12.66 MB → 12.69 MB: it grew slightly, because the missing provider DLL is now in it. Treat the module reduction as a build improvement and nothing else.

Asset Size
arboocr-windows-x64.zip 12.69 MB
arboocr-linux-x64.tar.gz 23.63 MB

The Linux build is fully static, so the tarball is close to just the 72 MB binary, the provider .so, LICENSE and THIRD_PARTY_NOTICES — the compression ratio is doing the work, not a lean file list.

Upgrading

Nothing in the API or the CLI changed shape. If you are on the wrappers, the pinned release moved and you get it on the next install. If you tried GPU before and concluded arboOCR was slow, re-run the check in the tip above — you were measuring CPU.