How to do lstm training using box/tiff files?

82 views
Skip to first unread message

易鑫

unread,
Jan 31, 2019, 1:40:29 AM1/31/19
to tesseract-ocr
Hello,everyone:
    I used tesseract 3.05 engine before, I have lots of tiff and box file, now I want to use tesseract 4.0.0 engine for lstm training.

I want to know how to train use the tiff/box files in the new engine?


Thanks in advance.



Kristóf Horváth

unread,
Jan 31, 2019, 4:00:48 AM1/31/19
to tesseract-ocr
I feel you. Im currently trying to understand lstm training but wiki is weak as hell so im doing try and errorr blindly. So far I managed to setup tesseract training on cygwin so i have access to tesstrain and lstmtraining command. Achiving this should be your first step then i suggest to try sample codes from wiki. In this section the first code sample is what i ran but gave me error: 

 
kh@DSAD-6 /usr/share/tessdata/training
$ tesstrain.sh --fonts_dir /usr/share/fonts --lang eng --linedata_only --noextract_font_properties --langdata_dir ~/langdata --tessdata_dir ../tessdata --output_dir ~/tesstutorial/engtrain

=== Starting training for language 'eng'
/usr/bin/language-specific.sh: line 1175: FONTS: unbound variable

In case you get any further pls make sure you share your results.

易鑫

unread,
Jan 31, 2019, 4:27:17 AM1/31/19
to tesseract-ocr
Thanks for your reply. I have already tried to do lstm trianing on ubuntu successfully, but the result is not so good as I expected and I do not use my tiff/box file,so I want to add more sample,that's why I ask how to do lstm training using box/tiff file.

as your mentioned:
"
 tesstrain.sh --fonts_dir /usr/share/fonts --lang eng --linedata_only --noextract_font_properties --langdata_dir ~/langdata --tessdata_dir ../tessdata --output_dir ~/tesstutorial/engtrain

=== Starting training for language 'eng'
/usr/bin/language-specific.sh: line 1175: FONTS: unbound variable
"
I met this error before,you can use the master branch,latest code.
 


Kristóf Horváth <vazzz...@gmail.com> 于2019年1月31日周四 下午5:00写道:
--
You received this message because you are subscribed to the Google Groups "tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-oc...@googlegroups.com.
To post to this group, send email to tesser...@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/4e5ca4f8-53cb-4d38-9fd3-76442dd62817%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kristóf Horváth

unread,
Jan 31, 2019, 4:29:18 AM1/31/19
to tesseract-ocr
EDIT: 

Environment

  • Tesseract Version: 4.0.0
  • Platform: Win10 64 (cygwin)

Current Behavior: Confusing af (pls fix wiki, as soon as i can make my demo work i will have to document it so im gonna send it so you guys will be able to have a wiki)

Expected Behavior: run as intended copied from wiki

Kristóf Horváth

unread,
Jan 31, 2019, 4:34:53 AM1/31/19
to tesseract-ocr
Oh i see, but i dont know what you mean by this: you can use the master branch,latest code. I compiled the latest version on my cygwin setup so i dont know what you are refering to

Shree Devi Kumar

unread,
Jan 31, 2019, 4:50:18 AM1/31/19
to tesser...@googlegroups.com

lstm training using box/tiff files is NOT supported.

Use tesstrain.sh with a UTF8 training_text and fonts.


For more options, visit https://groups.google.com/d/optout.


--

____________________________________________________________
भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com

易鑫

unread,
Jan 31, 2019, 4:57:45 AM1/31/19
to tesseract-ocr
@Kristóf Horváth 
Oh i see, but i dont know what you mean by this: you can use the master branch,latest code. I compiled the latest version on my cygwin setup so i dont know what you are refering to  

Sorry, I don't not say clearly.It means use master branch. I have successfully trained lstm model in ubuntu according to wiki。

Kristóf Horváth <vazzz...@gmail.com> 于2019年1月31日周四 下午5:34写道:

易鑫

unread,
Jan 31, 2019, 5:03:34 AM1/31/19
to tesseract-ocr
@Shree Devi Kumar:
   Thanks for your reply.

lstm training using box/tiff files is NOT supported. 

Use tesstrain.sh with a UTF8 training_text and fonts.

Maybe you are right.But I think using training_text will also generate tiff/box files in /tmp folder,so I think using box/tiff files and training_text do not have too much difference.


Kristóf Horváth

unread,
Jan 31, 2019, 5:04:46 AM1/31/19
to tesseract-ocr
Well you just repeated yourself and did not provide any new information. Like i said im using latest so what am i doing wrong? Also im not working in ubuntu but cygwin (not the same).
Reply all
Reply to author
Forward
0 new messages