Repository navigation
Releases
Releases · sundarshahi/ocrblaze
ocrblaze 0.2.0
Exact on every CPU the reference runs on, not only on arm64.
- x86_64:
np.argsortnow follows numpy's x86-simd-sort path (AVX-512: 8 lanes, AVX2: 4 lanes, the std::sort
fallback and all), chosen at run time from the CPU; no FMA contraction and no Carotene resize, as in the x86 wheels. - arm64: the box-side length follows OpenBLAS
sdotper kernel (FMA on kernels without SVE, such as Graviton2;
plain on SVE kernels). - x86_64 runs the whole detector by default (
OCRBLAZE_DET_TILE=0, about 250 MiB more): ONNX Runtime pools in a
different order on x86, so tiles there differ from the whole model in the last digits. arm64 keeps tiles of 384. - Parity: a
cpupart forcing the reference into each argsort and sdot kernel; a Recognisers workflow proving the
11 other official PP-OCRv5 mobile recognisers (all pinned inbuild/fetch_models.py, built withRECS=...);
every part runs even after one fails. - The image keeps the whole detector beside its pieces (4.5 MB). The contract check allows 500 MiB on x86_64 (420 measured).
- Models unchanged: the v0.1.0 model release still applies.
Model files: unchanged, use the v0.1.0 release assets.
crates.io: https://crates.io/crates/ocrblaze/0.2.0
ocrblaze 0.1.0
First public version.
- Library:
Ocr::new(Config),Ocr::read(every text line: text, box, score) andOcr::read_line(the recogniser
alone) on an RGB8Image. PP-OCRv5 mobile detector run in tiles (11 pieces,
384 px tiles by default), PP-OCRv5 mobile recogniser in groups of at most 2400 columns; one ONNX Runtime thread
pool for all sessions. - Features
download-binaries(default, ONNX Runtime 1.31.0 linked) andload-dynamic(ONNX Runtime at run time,
1.31.1 in the image);decode(Pillow-exact JPEG/PNG/WebP);server. ocrblaze:/health,/ocr,/line,/crop,/rotate; bearer token, fail closed without one;
--help,--version,--health,--bench,--memory-peak.- Distroless Docker image (linux/amd64, linux/arm64), non-root, models fetched and converted at pinned commits
and SHA-256. - Parity suite against the Python reference (RapidOCR 3.10 on ONNX Runtime 1.31.1), with exact comparison: see
README.md, "How parity is proven".
Models
The 14 files below are the models the parity results were measured with: the PP-OCRv5 mobile detector (whole, and
cut into the 11 pieces the engine runs), and the Devanagari PP-OCRv5 mobile recogniser with its character list.
They are converted from PaddlePaddle's official releases (Apache-2.0, see NOTICE) by build/fetch_models.py and
build/split_det.py, and every file matches the SHA-256 pinned there.
mkdir models && cd models
gh release download v0.1.0 --repo sundarshahi/ocrblaze
shasum -a 256 -c SHA256SUMSOr build them yourself: docker build --target models --output type=local,dest=models .