Lightweight OCR for scanned pages, optimized for CPU. TuzkaOCR detects the page layout and text lines, recognizes each line, and returns ALTO XML or PAGE XML with word coordinates, or plain text. It needs about 13 MB of models per domain and no GPU.
Documentation: https://moravianlibrary.github.io/TuzkaOCR/ (sources in docs/)
| Domain | Material |
|---|---|
default |
Printed books, periodicals and general scans |
kramarky |
Kramarky broadsheet prints only |
handwritten |
Czech handwriting |
kurrent |
German Kurrent / Sütterlin script |
git clone https://github.com/moravianlibrary/TuzkaOCR.git
cd TuzkaOCR
python3 -m venv .venv && source .venv/bin/activate
pip install .
tuzkaocr page.jpg --out page.alto.xml
tuzkaocr letter.jpg --domain handwritten --format txt --out letter.txt
tuzkaocr scans/ --batch --format multi --out-dir results/Python 3.10+ on Linux, Windows or Apple Silicon macOS. On Intel Macs, use Docker. New to the command line? Follow the step-by-step guide.
docker run -d -p 8000:8000 ghcr.io/moravianlibrary/tuzkaocr:latest
JOB=$(curl -s -F "image=@page.jpg" -F "fmt=alto" http://localhost:8000/api/v1/process | jq -r .job_id)
curl "http://localhost:8000/api/v1/status/$JOB"
curl -o page.alto.xml "http://localhost:8000/api/v1/result/$JOB"Authentication is off by default; add -e TUZKAOCR_API_KEY=<secret> to docker run to
require an X-API-Key header (see Setting an API key).
See HTTP API, Docker and Configuration.
Code: Apache License 2.0 (LICENSE, NOTICE). Models in tuzkaocr/models/:
CC BY-NC-SA 4.0 (tuzkaocr/models/LICENSE).