mittagessen / kraken

OCR engine for all the languages
http://kraken.re
Apache License 2.0
750 stars 131 forks source link

Segmentation: batch input not working #627

Closed fattynoparents closed 3 months ago

fattynoparents commented 4 months ago

I'm trying to use the segment command with multiple images as an input, the command is as follows:

 kraken -I '~/path/to/images/*.jpg' -o output -x segment -bl --model ~/path/to/my/mlmodel               

I only get this message after which the command exits silently, nothing else happens:

Loading ANN [/path/to/my/mlmodel] 

--raise-on-error parameter doesn't get any additional output. Am I doing something wrong? Thanks in advance for any help.

mittagessen commented 3 months ago

The expression parser (glob) is run internally in kraken and not the shell and doesn't have all the features (or behavior) of shell expansions. Importantly it doesn't know ~. I've changed the behavior to explicitly expand it before parsing now.