Image-to-Text
ONNX
Safetensors
Dutch
onnxruntime
ocr
historical-books
foliokestrel's picture
Install Dutch book OCR and paragraph layout together and transcribe scans offline
9b7a97f verified
|
Raw History Blame Contribute Delete
2.05 kB

Dutch book OCR on a CPU

Transcribe a cropped line or a single paragraph of historical Dutch print. The wheel includes the book recognition model, Dutch Tesseract layout data and two scan excerpts. Recognition runs offline after installation.

python -m pip install https://huggingface.co/foliokestrel/folio-dutch-book-ocr/resolve/main/python/folio_dutch_book_ocr-0.1.0-py3-none-any.whl
folio-dutch-book example
folio-dutch-book line line.png
folio-dutch-book paragraph paragraph.png
folio-dutch-book paragraph --jsonl first.png second.tif > readings.jsonl

The example reads a paragraph beginning “4 Ende hy gingh henen”. In the separate line example the model reads “FEEST. EN” where the printed heading says “FEEST- EN”. Check doubtful punctuation against the scan. Use one paragraph per frame. Separate columns and marginal notes before recognition.

JSON output records the source filename, one-based frame number, upright image size and text. Paragraph output also gives the reading and pixel box of every detected line. Coordinates start at the upper left and use exclusive right and bottom edges. Multiple files and multipage TIFF frames follow input order.

Model weights use CC BY-SA 4.0, code and Dutch Tesseract data use Apache-2.0, and the two KB scan excerpts are public domain. The bundled notices identify each source. Book model and evaluation · KB IMPACT Ground-truth

Reproduce the build

Extract the source ZIP and run the following commands inside its package directory. The wheel built from that archive matched the original SHA-256, cd102e978fccd73e34a3086baf7ef78714738ebaa365b730039ea1da93e4cc81. Source ZIP · Installation and recognition checks

python -m pip install build==1.3.0 setuptools==80.9.0 wheel==0.45.1
SOURCE_DATE_EPOCH=1704067200 PYTHONHASHSEED=0 python -m build --wheel --no-isolation