Error by using own model

16 views
Skip to first unread message

Jens Humrich

unread,
Mar 21, 2019, 5:49:15 AM3/21/19
to tesseract-ocr
Hey everyone,

after training my model and gaining a sufficient accuracy, I copied the checkpoint into the TESSDATA_PREFIX folder and renamed it to jen.traineddata:

cp jens_checkpoint /usr/share/tesseract/4/tessdata/jen.traineddata

When trying to run tesseract with the new language I get the error message:

tesseract --oem 1 -l jen sample.tif stdout

Error opening data file /usr/share/tesseract/4/tessdata/jen.traineddata
Please make sure the TESSDATA_PREFIX enviroment variable is set to your "tessdata" directory.
Failed loading lanugage 'jen'
Tesseract couldn't load any languages!
Could not initialize tesseract.

When simply copying a traineddata file within the folder it works just fine, e.g.

cp /usr/share/tesseract/4/tessdata/eng.traineddata /usr/share/tesseract/4/tessdata/jen.traineddata

Any idea, what I am doing wrong?

Thanks,
Jens

Shree Devi Kumar

unread,
Mar 21, 2019, 6:03:12 AM3/21/19
to tesser...@googlegroups.com
A checkpoint is NOT a traineddata file.

Use -stop-training to build the traineddata.

eg.

echo "#### stop training                                       ####"
~/tesseract/bin/src/training/lstmtraining \
--stop_training \
--continue_from  ./devaplus_z1/plus_checkpoint \
--traineddata ./santrain_z1/san/san.traineddata \
--model_output ./devaplus_z1/devaplus_z1.traineddata


--
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/e8a706f9-5439-4a7b-86a7-c41736d805e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

____________________________________________________________
भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com
Reply all
Reply to author
Forward
0 new messages