mirror of
https://github.com/qurator-spk/sbb_binarization.git
synced 2025-07-23 17:59:54 +02:00
improve usage instructions
This commit is contained in:
parent
0fe5232488
commit
ff78d4e85c
1 changed files with 10 additions and 7 deletions
17
README.md
17
README.md
|
@ -8,10 +8,7 @@
|
||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
This tool performs document image binarization (i.e. transform colour/grayscale
|
This tool performs document image binarization using trained models. The method is based on [Calvo-Zaragoza and Gallego, 2018](https://arxiv.org/abs/1706.10241).
|
||||||
to black-and-white pixels) for OCR using multiple trained models.
|
|
||||||
|
|
||||||
The method used is based on _Calvo-Zaragoza/Gallego, 2018. [A selectional auto-encoder approach for document image binarization](https://arxiv.org/abs/1706.10241)_.
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
@ -30,14 +27,20 @@ https://qurator-data.de/sbb_binarization/
|
||||||
```sh
|
```sh
|
||||||
sbb_binarize \
|
sbb_binarize \
|
||||||
--patches \
|
--patches \
|
||||||
-m <directory with models> \
|
-m <path to directory containing model files> \
|
||||||
<input image> \
|
<input image> \
|
||||||
<output image>
|
<output image>
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note** In virtually all cases, the `--patches` flag will improve results.
|
**Note** In virtually all cases, applying the `--patches` flag will improve the quality of results.
|
||||||
|
|
||||||
To use the OCR-D interface:
|
Example
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sbb_binarize --patches -m /path/to/models/ myimage.tif myimage-bin.tif
|
||||||
|
```
|
||||||
|
|
||||||
|
To use the [OCR-D](https://ocr-d.de/) interface:
|
||||||
```sh
|
```sh
|
||||||
ocrd-sbb-binarize --overwrite -I INPUT_FILE_GRP -O OCR-D-IMG-BIN -P model "/var/lib/sbb_binarization"
|
ocrd-sbb-binarize --overwrite -I INPUT_FILE_GRP -O OCR-D-IMG-BIN -P model "/var/lib/sbb_binarization"
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue