sbb_textline_detection/README.md

30 lines
1.1 KiB
Markdown
Raw Normal View History

# Textline Detection
2020-01-15 19:41:49 +01:00
> Detect textlines in document images
## Introduction
This tool performs printspace, region and textline detection from document image
2020-01-15 19:41:49 +01:00
data and returns the results as [PAGE-XML](https://github.com/PRImA-Research-Lab/PAGE-XML).
## Installation
`pip install .`
2019-12-05 16:30:09 +01:00
2020-01-16 15:57:20 +01:00
### Models
2020-01-15 19:41:49 +01:00
In order to run this tool you also need trained models. You can download our pretrained models from here:
2020-01-16 15:47:04 +01:00
https://qurator-data.de/sbb_textline_detector/
2019-12-05 16:30:09 +01:00
## Usage
`sbb_textline_detector -i <image file name> -o <directory to write output xml> -m <directory of models>`
2019-12-05 16:15:07 +01:00
2020-01-16 15:57:20 +01:00
### Usage with OCR-D
~~~
ocrd-example-binarize -I OCR-D-IMG -O OCR-D-IMG-BIN
ocrd-sbb-textline-detector -I OCR-D-IMG-BIN -O OCR-D-SEG-LINE-SBB \
-p '{ "model": "/path/to/the/models/textline_detection" }'
~~~
Segmentation works on raw RGB images, but retains
`AlternativeImage`s from binarization steps, so it's OK to do
binarization first, then perform the textline detection. The used binarization
processor must produce an `AlternativeImage` for the binarized image, not
replace the original raw RGB image.