No description
Find a file
2022-08-30 11:00:25 +02:00
.circleci use resmgr for model download 2021-01-28 14:09:18 +01:00
repo add assets subrepo 2020-10-15 17:31:47 +02:00
sbb_binarize Improved formatting 2022-08-30 11:00:25 +02:00
.gitignore 📦 v0.0.2 2020-10-23 17:09:54 +02:00
.gitkeep Add new directory, you can find corresponding models in qurator-data 2019-08-23 15:47:32 +02:00
.gitmodules add assets subrepo 2020-10-15 17:31:47 +02:00
CHANGELOG.md 📦 v0.0.10 2022-07-21 15:00:31 +02:00
LICENSE Add LICENSE 2019-12-10 16:40:44 +01:00
make.sh Add new file 2019-08-23 15:50:09 +02:00
Makefile fix test 2021-01-28 14:19:22 +01:00
ocrd-tool.json add ocrd-tool.json 2020-10-15 15:19:04 +02:00
README.md improve usage instructions 2022-04-25 19:24:04 +02:00
requirements.txt Rewrote binarization script to always use patches, but in a much more efficient way and adding support for batch-conversion with multiple GPUs. 2022-08-30 10:58:45 +02:00
setup.py minimal CI setup 2020-10-16 13:52:44 +02:00

Binarization

Binarization for document images

Examples

Introduction

This tool performs document image binarization using trained models. The method is based on Calvo-Zaragoza and Gallego, 2018.

Installation

Clone the repository, enter it and run

pip install .

Models

Pre-trained models can be downloaded from here:

https://qurator-data.de/sbb_binarization/

Usage

sbb_binarize \
  --patches \
  -m <path to directory containing model files> \
  <input image> \
  <output image>

Note In virtually all cases, applying the --patches flag will improve the quality of results.

Example

sbb_binarize --patches -m /path/to/models/ myimage.tif myimage-bin.tif

To use the OCR-D interface:

ocrd-sbb-binarize --overwrite -I INPUT_FILE_GRP -O OCR-D-IMG-BIN -P model "/var/lib/sbb_binarization"