This guide provides instructions for deploying and using the Loghi framework in a dockerized environment, utilizing APIs for a seamless workflow in handwritten text recognition and layout analysis.
The deployment uses Docker and Docker Compose, simplifying the setup and eliminating concerns about local environment variations. This README is located in the webservice
directory, containing all you need to get started.
loghi-tooling/
: Containsconfiguration.yml
for tooling configuration.webservice-scripts/
: Includes example scripts for each part of the pipeline, designed to demonstrate how to integrate and automate various Loghi components.docker-compose.yml
: An example Docker Compose file to orchestrate the startup of all web services (tooling, HTR, and Laypa) with a simpledocker compose up
command.
To initialize the Loghi web services:
-
Ensure Docker and Docker Compose are installed on your system.
-
Start the Docker containers with the following command:
docker compose up
This boots up the necessary Docker containers and provides a log of the operations. Ensure you have Docker Compose version
1.28.0
or higher for proper GPU support, if required.
The Loghi framework provides a flexible pipeline for processing handwritten texts. Here is a generalized workflow to guide your usage:
-
Baseline Detection: Use Laypa to identify text baselines and regions in your documents, preparing them for HTR.
-
Image Preprocessing: If needed, preprocess images to enhance text recognition accuracy, such as line extraction and image normalization.
-
Handwritten Text Recognition (HTR): Process the prepared images through Loghi HTR to transcribe the text.
-
Post-processing: Apply necessary post-processing steps, such as merging HTR results into PageXML format, recalculating reading order, and splitting text into words.
-
Integration and Automation: Utilize the
webservice-scripts/
as templates to automate the workflow and integrate Loghi components into your system. For more information on the available scripts, refer to thewebservice-scripts/README.md
file.
- The web service setup provided here is adaptable and can be customized to fit specific project requirements.
- Ensure your Docker environment is properly configured, especially when leveraging GPU acceleration for processing tasks.
The flexibility and modularity of Loghi allow it to be tailored to a wide range of document analysis and text recognition projects, providing robust tools for researchers and developers alike.