Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 1353: Patch for /training/tessopt.cpp #13

Closed
wants to merge 1 commit into from

Conversation

jimregan
Copy link
Contributor

https://code.google.com/p/tesseract-ocr/issues/detail?id=1353

When training batch boxes and tifs this causes training to fail after 2nd iteration. The issue is that the tessopt iterator index is a global. The fix is to 1.) reset before each tessopt usage 2.) wrap the iterator state in a class/generator. Low priority, but useful if we want to generate a bunch of traineddatas in the same process or even multiple threads.

(http://web.archive.org/web/20150413012203/https://code.google.com/p/tesseract-ocr/issues/detail?id=1353)

https://code.google.com/p/tesseract-ocr/issues/detail?id=1353

When training batch boxes and tifs this causes training to fail after 2nd iteration. The issue is that the tessopt iterator index is a global. The fix is to 1.) reset before each tessopt usage 2.) wrap the iterator state in a class/generator. Low priority, but useful if we want to generate a bunch of traineddatas in the same process or even multiple threads.
@zdenop
Copy link
Contributor

zdenop commented Apr 20, 2018

is this PR relevant for 4.0? Any way it just implement tessopt_reset function but never used it...

@Shreeshrii
Copy link
Collaborator

It is a 3 year old PR. I will request @stweil to review. Thanks.

@stweil
Copy link
Contributor

stweil commented Apr 20, 2018

It looks like the start of a bug fix. Please keep it open as a reminder. I added the issue / pull request to the planning page in the wiki.

@amitdo
Copy link
Collaborator

amitdo commented Apr 21, 2018

I think the OP is @oulrich1

@oulrich1
Copy link

Wow, it's been a while. Seems a lot has changed since then. Doesn't look like 'tessopt' is used in 'lstmtraining', but still definitely used in 'cntraining' and maybe 'mftraining'.
It does look like the patch is missing the call, maybe i didn't include it originally, but i believe should be callable from anywhere since the tessopt_reset is a free function. Might have been calling that from within a facade class, i dont remember exactly

@zdenop
Copy link
Contributor

zdenop commented Oct 13, 2018

Closing as this it not (at least full) patch, there is no test case for replicating problem, so we can try to fix it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants