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

Deserialized Header Failed Mac OS X #3012

Closed
MichaelLLi opened this issue Jun 10, 2020 · 3 comments
Closed

Deserialized Header Failed Mac OS X #3012

MichaelLLi opened this issue Jun 10, 2020 · 3 comments
Labels

Comments

@MichaelLLi
Copy link

Environment

  • Tesseract Version: 4.1.1
  • Commit Number: 7510304
  • Platform: Mac OS X 10.14

Current Behavior:

So I installed 4.1.1 along with the training tools from source and decided to try out the whole training process. I downloaded a sample TIFF file from the internet (CCITT_1.tiff) and then created the box/tiff file pair as:

tesseract CCITT_1.TIFF CCITT lstmbox

This gave:

Tesseract Open Source OCR Engine v4.1.1 with Leptonica
Page 1

With no error.

Then I created the lstmf files as:

tesseract CCITT_1.TIFF lstmf/valid1 lstm.train

And it gave me the same as above with no error. Finally, I ran a dummy training script with just this one picture:

lstmtraining --model_output models/test --continue_from models/eng.lstm --traineddata data/eng-best.traineddata --train_listfile dataset/annotated/training_files.txt --max_iterations 100

And I get:

Loaded file models/eng.lstm, unpacking...
Warning: LSTMTrainer deserialized an LSTMRecognizer!
Continuing from models/eng.lstm
Deserialize header failed: /Users/Mlli/Documents/GitHub/LineageEyeMachineLearning/ocr/lstmf/valid1.lstmf
Load of page 0 failed!
Load of images failed!!

I have made sure that the files do actually exist at the location, and the eng-best.traineddata is the LSTM only one. What could be wrong here? Thanks!

Expected Behavior:

Suggested Fix:

@MichaelLLi
Copy link
Author

MichaelLLi commented Jun 10, 2020

Tesseract.zip

The relevant files are attached here.

@Shreeshrii
Copy link
Collaborator

Is the file there at the path specified. What's the output of

ls -l /Users/Mlli/Documents/GitHub/LineageEyeMachineLearning/ocr/lstmf/valid1.lstmf

In the zipfile that you have attached, the lstmf file is in the main directory (not in subdirectory called lstmf).

@amitdo
Copy link
Collaborator

amitdo commented Jan 12, 2022

No response from the OP.

@amitdo amitdo closed this as completed Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants