Skip to content

v3.2.0 — streaming endpoint, layout-only runs, self-sufficient builds

Choose a tag to compare

@nataell95 nataell95 released this 03 Jul 23:24
· 34 commits to main since this release
Immutable release. Only release title and notes can be modified.

This release adds POST /ocr/stream, a single NDJSON streaming endpoint for PDFs and images: one JSON line per page, emitted the moment each page finishes (out of order, keyed by page_index), carrying page number, dimensions, dpi, mode, text, layout and optionally the rendered page image inline. On a 500-page PDF the first page arrives in about 20 ms while the rest are still being OCR'd, so a RAG or indexing pipeline can start chunking and embedding immediately instead of waiting for the whole document. Note that streaming needs a keep-alive connection; requests sending Connection: close are rejected with a clear 400.

A new text=0 query parameter runs the layout model without any text recognition, and combined with images=inline it turns /ocr/pdf into a fast page-image extractor: 500 pages in roughly half a second with no OCR cost at all. Meaningless combinations (text=0 with tables, formulas, blocks or reading order) are rejected explicitly rather than returning silently empty fields.

Native and Docker builds are now self-sufficient from a clean clone. The GPU build discovers ONNX Runtime properly instead of assuming a local directory, automatically fetches the official checksum-pinned CUDA 13 GPU tarball (onnxruntime 1.27.0) when none is installed, and rejects a CPU-only ONNX Runtime at configure time with an explanatory error, since it would break the formula backends at runtime. libcurl is now a documented build dependency with an actionable configure message, and Dockerfile.gpu installs the same pinned CUDA 13 ONNX Runtime instead of relying on files outside the repository.

Everything is additive: existing requests are byte-identical, re-verified at 84.59 FUNSD word-F1 and full throughput. Images: ghcr.io/aiptimizer/turboocr:v3.2.0 (GPU, TensorRT) and ghcr.io/aiptimizer/turboocr-cpu:v3.2.0 (CPU, ONNX Runtime).