OCR-Workflows mit OCR-D
Robert Sachunsky
Leipzig, 18. Dezember 2020
Projekt
2014: DFG-Expertenworkshop Verfahren zur Verbesserung von OCR-Ergebnissen
2015-17: 1. Phase (Bedarfe aufdecken, Konzepte erarbeiten, Ausschreibung
von Modulprojekten)
2018-20: 2. Phase (Spezifikation und Referenzimplementierung für
integriertes Workflowsystem, 8 gleichzeitige Modulprojekte, 1 Koordinierungsprojekt, Pilotierung in Bibliotheken)
2021-23: 3. Phase (Weiterentwicklung und Integration, Nutzungsszenarien und Workflows, ≤ 13 Implementierungsprojekte, 1 Koordinierungsprojekt)
(DFG, LIS)
Ziele
Massen-Volltexterfassung für ges. gedrucktes dt. Kulturerbe (VD16/17/18: 460.000 Bde. digitalis.)
Lückenschluß von Forschung und Praxis:
Referenzkorpora und Richtlinien
Weiterentwicklung Layout-Analyse usw.
Analyse/Integration vorhandener Tools
Spezifikationen (Formate, Schnittstellen CLI/API)
Workflows
Architektur
föderiertes System (maximale Flexibilität)
bel. skalierbar u. erweiterbar
freie Kombination von Werkzeugen/Modellen/Methoden für alle Schritte
komplexe Workflows, Workflow-Management
Entwicklung neue Module, Integration existierender Tools
Formate: METS-XML, PAGE-XML, JSON
Schnittstellen: CLI, Python-API
Referenzimplementierung: Python, bash
Architektur
Workspaces
physische Repräsentation einer METS-XML
Verzeichnis für Dokument
mets:fileGrp
Unterverzeichnisse
mets:file
Dateien (relative lokale Pfade / URLs)
Verwaltung ähnl. Repository
ocrd workspace clone "https://digital.slub-dresden.de/oai/?verb=GetRecord&metadataPrefix=mets&identifier=oai:de:slub-dresden:db:id-50169238X"
ocrd workspace find --file-grp ORIGINAL --page-id PHYS_0001 --download
ocrd workspace list-page
ocrd workspace list-group
ocrd workspace add ...
Gegenstand der Prozessierung
Architektur
Repräsentation
METS-XML: Dokument-Struktur, Metadaten
PAGE-XML: Seiten-Struktur (hierarchisch); Beschreibung von Segmenten mit (Polygon-)Koordinaten, Attributen, Text, Bild-Referenzen
Bilder: Original und Bildderivate
Prozessierung = schrittweise Anreicherung (Annotation)
Architektur
Prozessoren
Implementierung für abstrakte Operation in einem OCR-Workflow
operiert auf Workspace (Eingabe/Ausgabe-fileGrps)
Parameter-Spezifikation (JSON-Schema)
einheitliche CLI
ocrd-olena-binarize -I MAX -O BIN -P impl sauvola-ms-split
ocrd-tesserocr-segment -I BIN -O SEG -P find_tables false
ocrd-cis-ocropy-dewarp -I SEG -O DEW -P smoothness 0.1
ocrd-calamari-recognize -I DEW -O OCR -P model "gt4histocr/*.ckpt.json"
derzeit > 60 Prozessoren verfügbar
Binarisierung / Denoising / Despeckling
Cropping / Deskewing / Dewarping
Segmentierung / Clipping / Alignment
Texterkennung / Alignment / Nachkorrektur
Evaluierung / Konvertierung / Archivierung
Architektur
Workflow
Konfiguration der Folge von Prozessoren und Parametern
Shell-Syntax, Makefile-Syntax
MAX:
ocrd workspace find -G $@ --download
BIN: MAX
BIN: TOOL = ocrd-olena-binarize
BIN: PARAMS = "impl": "wolf" # sauvola-ms-split
SEG: BIN
SEG: TOOL = ocrd-tesserocr-segment
SEG: PARAMS = "find_tables": false, "shrink_polygons": true
DEW: SEG
DEW: TOOL = ocrd-cis-ocropy-dewarp
DEW: PARAMS = "smoothness": 0.1
OCR: DEW
OCR: TOOL = ocrd-calamari-recognize
OCR: PARAMS = "model": "gt4histocr/*.ckpt.json"
auf Workspace(s) aufrufen und (parallel) abarbeiten:
make -j -f config.mk all
Anlaufpunkte
Installation
git clone https://github.com/OCR-D/ocrd_all
cd ocrd_all
sudo make deps-ubuntu
make all
docker pull ocrd/all:maximum-cuda
https://ocr-d.de/en/setup (Setup-Guide)
Resume presentation
OCR-Workflows mit OCR-D Robert Sachunsky Leipzig, 18. Dezember 2020
{"metaMigratedAt":"2023-06-15T17:21:19.602Z","metaMigratedFrom":"YAML","title":"OCR-Workflows mit OCR-D","breaks":true,"slideOptions":"{\"theme\":\"white\",\"slideNumber\":true}","contributors":"[{\"id\":\"c62f1b15-791a-47e1-8e4c-ab2ed00c04bc\",\"add\":5880,\"del\":930}]"}