robertknight / ocrs

Rust library and CLI tool for OCR (extracting text from images)
Apache License 2.0
1.1k stars 46 forks source link

Add API and CLI option for generating text segmentation mask #22

Closed robertknight closed 7 months ago

robertknight commented 7 months ago

Add --text-map option to ocrs CLI tool and supporting OcrEngine::detect_text_pixels API to generate a text probability mask.

This is useful for debugging text detection differences between model versions.

In the process a params argument was added to TextDetector::from_model to make it easier to test adjustments to various post-processing parameters.