File size: 2,046 Bytes
9b7a97f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # 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.
```sh
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](https://huggingface.co/foliokestrel/folio-dutch-book-ocr) · [KB IMPACT Ground-truth](https://lab.kb.nl/dataset/ground-truth-impact-project)
## 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](folio_dutch_book_ocr-0.1.0-source.zip) · [Installation and recognition checks](verification.json)
```sh
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
```
|