OCR-D / ocrd_anybaseocr

DFKI Layout Detection for OCR-D
Apache License 2.0
48 stars 12 forks source link

Odd default value for parameter 'parallel' #6

Closed wrznr closed 4 years ago

wrznr commented 5 years ago

In https://github.com/mjenckel/LAYoutERkennung/blob/master/ocrd_anybaseocr/ocrd-tool.json the parameter parallel with the description numbers of CPUs to us defaults to 0. Is this intended? What does that mean? Maybe GPU-based processing?

kba commented 5 years ago

This is used in ocropy's gpageseg which is duplicated at https://github.com/mjenckel/LAYoutERkennung/blob/master/ocrd_anybaseocr/cli/anyBaseOCR-gpageseg.py. In gpageseg, parallel < 2 means no parallelization.

Why is that script even in there as a CLI? Please consider using the code directly instead of starting a new python instance in https://github.com/mjenckel/LAYoutERkennung/blob/master/ocrd_anybaseocr/cli/ocrd_anybaseocr_textline.py#L114. And have a look at @bertsky's https://github.com/cisocrgroup/cis-ocrd-py/tree/dev/ocrd_cis/ocropy as well as https://github.com/OCR-D/ocrd_ocropy/blob/master/ocrd_ocropy/segment.py

mjenckel commented 4 years ago

gpageseg code has been integrated into the textline module so this parameter is no longer used