tesseract-ocr / tesstrain

Train Tesseract LSTM with make
Apache License 2.0
599 stars 178 forks source link

Need to call text2image unique "--fontconfig_tmpdir" when multi-threaded #298

Closed james-evy closed 2 years ago

james-evy commented 2 years ago

In generate_font_image(), in tesstrain_utils.py; You need to create a unique folder name to pass text2image as the fontconfig_tmpdir parameter. I check the code or text2image. It will rewrite the files in the passed directory, creating a race condition.
Unless text2image is modified to handle a "--keep_tmpdir_if_exists" like flag is added, this will be an issue. patch.txt

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.