Skip to content

arboOCR

Standalone C++ OCR library — detection, orientation, and recognition, on CPU, CUDA, or TensorRT.

Drop it into your own project, point it at an image, get text back.

Get started Browse the API


What is this?

arboOCR runs the classic three-stage OCR pipeline — detect text regions, classify their orientation, recognize the characters — over PP-OCRv6 ONNX models via ONNXRuntime. It was extracted from a larger benchmarking harness into a single-purpose library with no baggage: no TTS, no HTTP server, no dataset tooling, just the inference core.

  • CPU / CUDA / TensorRT, auto-detected


    Construct one Engine — it picks the fastest backend available and tells you which one it picked. With TensorRT, FP16 is on by default (useFp16) for edge latency.

  • Facade and building blocks


    Use Engine::recognize() for the common case, or drop down to Detector / Classifier / Recognizer directly if you're building a custom pipeline.

  • Batched recognition


    Text-line crops are batched (default 6 per inference call, matching PaddleOCR/RapidOCR) instead of one ONNXRuntime call per line. See Benchmarks for when this actually helps — it is a trade-off, not a free win.

  • In-memory and async


    recognize(const cv::Mat&) skips disk I/O for camera and API pipelines; recognizeAsync() returns a std::future for non-blocking multi-image work.

  • Ported, not reinvented


    The detection/recognition math is a near-verbatim port of RapidOcrOnnx (Apache-2.0) — battle-tested logic, renamed and reorganized for a clean public API.

  • Wrappers for five languages


    Python, Go, Rust, PHP, and JavaScript wrappers drive the prebuilt binary via subprocess — no C++ build required.

Where to go next

If you want to… Read
See working code in 30 seconds Quickstart
Compile the library Build · Jetson / aarch64
Know which model files you need Models
Pick tiny vs small vs medium Choosing a model size
Upgrade an existing integration Accuracy defaults
Read the full type reference API Reference
Use it from Python/Go/Rust/PHP Wrappers
Know how fast it is Benchmarks

Upgrading from an older build?

Several defaults changed in a recent accuracy cycle — line ordering, modelType, detLimitSideLen, and the meaning of LinePrediction::score are all different now. Read Accuracy defaults before you upgrade.

License

arboOCR is licensed under the Apache License 2.0. The ported detection/recognition logic derives from RapidOcrOnnx (Apache-2.0) and bundles Clipper (Boost Software License 1.0).