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).
This tool performs document image binarization using a trained ResNet50-UNet model.
## Installation
@ -18,10 +18,14 @@ Clone the repository, enter it and run
### Models
Pre-trained models can be downloaded from here:
Pre-trained models in `h5` format can be downloaded from here:
https://qurator-data.de/sbb_binarization/
We also provide a Tensorflow `saved_model` via Huggingface:
https://huggingface.co/SBB/sbb_binarization
## Usage
```sh
@ -32,9 +36,11 @@ sbb_binarize \
<outputimage>
```
**Note** In virtually all cases, applying the `--patches` flag will improve the quality of results.
In virtually all cases, applying the `--patches` flag will improve the quality of results.
Images containing a lot of border noise (black pixels) should be cropped beforehand to improve the quality of results.