Go to file
2021-04-12 09:53:59 +02:00
wrapper Add mising --log-dir argument to wrapper script 2021-04-12 09:53:59 +02:00
.gitlab-ci.yml Change intermediate image name in order to fix issues with building multiple branches/tags at the same time 2021-03-15 14:11:23 +01:00
Dockerfile Add back german language models 2021-03-17 14:26:24 +01:00
hocrtotei Use more descriptive argument names then i and o (now: input and output) 2021-03-18 10:32:55 +01:00
ocr Tweak the README and pipeline help. 2021-03-26 10:03:59 +01:00
README.md Tweak the README and pipeline help. 2021-03-26 10:03:59 +01:00

OCR - Optical Character Recognition

This software implements a heavily parallelized pipeline to recognize text in PDF files. It is used for nopaque's OCR service but you can also use it standalone, for that purpose a convenient wrapper script is provided.

Software used in this pipeline implementation

Use this image

  1. Create input and output directories for the pipeline.
mkdir -p /<my_data_location>/input /<my_data_location>/output
  1. Place your PDF files inside /<my_data_location>/input. Files should all contain text of the same language.

  2. Start the pipeline process. Check the pipeline help (ocr --help) for more details.

# Option one: Use the wrapper script
## Install the wrapper script (only on first run). Get it from https://gitlab.ub.uni-bielefeld.de/sfb1288inf/ocr/-/raw/development/wrapper/ocr, make it executeable and add it to your ${PATH}
cd /<my_data_location>
ocr -i input -l <language_code> -o output <optional_pipeline_arguments>

# Option two: Classic Docker style
docker run \
    --rm \
    -it \
    -u $(id -u $USER):$(id -g $USER) \
    -v /<my_data_location>/input:/input \
    -v /<my_data_location>/output:/output \
    gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/ocr:development \
        -i /ocr_pipeline/input \
        -l <language_code> \
        -o /ocr_pipeline/output \
        <optional_pipeline_arguments>
  1. Check your results in the /<my_data_location>/output directory.