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

Error while using clstm models that I trained and test it ! #140

Open
Hadi58 opened this issue Oct 29, 2017 · 0 comments
Open

Error while using clstm models that I trained and test it ! #140

Hadi58 opened this issue Oct 29, 2017 · 0 comments

Comments

@Hadi58
Copy link

Hadi58 commented Oct 29, 2017

@tmbdev
Hi !
when I use default clstm models like arabic-beirut-200.clstm model, it's ok and convert successfully:
user@user ~/Desktop/mags $ kraken -i images/tt1.jpg image.txt binarize segment ocr -m arabic-beirut-
200.clstm
Loading RNN default ✓
Binarizing ✓
Segmenting ✓
Processing ✓
Writing recognition results for /tmp/tmpq1EMeq ✓
but when I use any clstm models that I trained and tested them I get:
user@user ~/Desktop/mags $ kraken -i images/tt1.jpg image.txt binarize segment ocr -m persian-keyhan-5000.clstm
Loading RNN default ✓
Binarizing ✓
Segmenting ✓
Traceback (most recent call last):
File "/usr/local/bin/kraken", line 10, in
sys.exit(cli())
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1093, in invoke
return _process_result(rv)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1031, in _process_result
**ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/kraken/kraken.py", line 167, in process_pipeline
task(base_image=base_image, input=input, output=output)
File "/usr/local/lib/python2.7/dist-packages/kraken/kraken.py", line 125, in recognizer
for pred in it:
File "/usr/local/lib/python2.7/dist-packages/kraken/rpred.py", line 211, in mm_rpred
pred = nets[script].predictString(line)
File "/usr/local/lib/python2.7/dist-packages/kraken/lib/models.py", line 88, in predictString
line = line.reshape(-1, self.rnn.ninput(), 1)
ValueError: can only specify one unknown dimension

I use kraken version 0.9.6 :
user@user ~/Desktop/mags $ kraken --version
kraken, version 0.9.6.dev8
and compile separate-derivs branch to train my clstm model.

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

1 participant