Go to file
Konstantin Baierer 78b1eb424d Merge remote-tracking branch 'origin/master' into release-v0.0.3
.circleci minimal CI setup
repo add assets subrepo
sbb_binarize Merge branch 'release-v0.0.2' into release-v0.0.3
.gitignore 📦 v0.0.2
.gitkeep Add new directory, you can find corresponding models in qurator-data
.gitmodules add assets subrepo
CHANGELOG.md 📦 v0.0.2
LICENSE Add LICENSE
Makefile minimal CI setup
README.md 📝 update README to current CLI usage
make.sh Add new file
ocrd-tool.json add ocrd-tool.json
requirements.txt require ocrd
setup.py minimal CI setup

README.md

Binarization

Binarization for document images

Introduction

This tool performs document image binarization (i.e. transform colour/grayscale to black-and-white pixels) for OCR using multiple trained models.

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 <directory with models> \
  <input image> \
  <output image>

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