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

Fine tuning training for a mix language tessdata #15

Closed
amitm02 opened this issue Jan 4, 2018 · 6 comments
Closed

Fine tuning training for a mix language tessdata #15

amitm02 opened this issue Jan 4, 2018 · 6 comments

Comments

@amitm02
Copy link

amitm02 commented Jan 4, 2018

If understand correctly, traineddata files that starts with a capital letter are "mixed languages" traineddata (e.g Hebrew = heb+eng).
Was is produced by combining "heb" and "eng" traineddata files or was it trained from scratch on a mix language data?
Is there anything i should do differently if i want to do a fine tune training the "Hebrew" traineddata compared to the "heb" traineddata?

@ngduyanhece
Copy link

I also have the same question for jpn.traindeddata and japanese.traindeddata, what is the differences between them and how can i fine tune for japanese.traindeddata

@Shreeshrii
Copy link
Contributor

Unpack the traineddata (Hebrew or Japanese). Run dawg2wordlist to get the input wordlist files, in case you want to change them.

You may need to add 'Hebrew' or 'Japanese" as valid language codes in training/language_specific.sh and create subfolders for them under langdata with the unpacked files.

Alternately, you can modify heb or jpn langdata folders with the new files and train using Hebrew or Japanese best traineddata for extracting the lstm model to continue from.

See

https://github.com/tesseract-ocr/tesseract/blob/e2e0b90666d3798c6e38de9ebc0524b3c2573dea/doc/combine_tessdata.1.asc

https://github.com/tesseract-ocr/tesseract/blob/e2e0b90666d3798c6e38de9ebc0524b3c2573dea/doc/dawg2wordlist.1.asc

https://github.com/tesseract-ocr/tesseract/blob/e2e0b90666d3798c6e38de9ebc0524b3c2573dea/training/language-specific.sh

@amitm02
Copy link
Author

amitm02 commented Jan 16, 2018

@Shreeshrii thanks for replaying. I'm not sure i understand the answers to original
I'm using tesseract 4 with LSTM.

  1. Was "Hebrew" tessdata produced by combining "heb" and "eng" traineddata files or was it trained from scratch on a mix language data?

  2. I want to do a fine tuning on scanned docs images that builds upon the existing "Hebrew" tessdata, is there anything i should do differently than with "heb" tessdata

@Shreeshrii
Copy link
Contributor

The training was done by @theraysmith @ Google. I only know based on what he has posted in these forums. Please see tesseract-ocr/tessdata#62 (comment) where he has explained about models for 'scripts' vs 'languages'.

@kotebeg
Copy link

kotebeg commented Sep 10, 2019

I am going to fine tune one of the tesseract_best traineddata file with new fonts, but I am not sure how many pages should I use for training, or how many iterations, and not to impact badly existing traineddata file, is there any recommendations abut that parameters ??

@Shreeshrii
Copy link
Contributor

@kotebeg Please see https://github.com/tesseract-ocr/tesseract/wiki/TrainingTesseract-4.00#fine-tuning-for-impact

Use the tessearct-ocr google group for asking questions.

@stweil stweil closed this as completed May 17, 2023
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

No branches or pull requests

5 participants