improve usage instructions

pull/36/head v0.0.9
Clemens Neudecker 3 years ago committed by GitHub
parent 0fe5232488
commit ff78d4e85c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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.
Example
```sh
sbb_binarize --patches -m /path/to/models/ myimage.tif myimage-bin.tif
```
To use the OCR-D interface: 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…
Cancel
Save