-
Notifications
You must be signed in to change notification settings - Fork 130
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 when i run kraken segment ocr #118
Comments
Are you sure you're running kraken in an environment with pytorch 1.0? The error is caused when running the forward pass of the LSTM layer which required an explicit hidden state argument in the past but doesn't in the current pytorch version. |
Here is my full asciicast ran in Is there something i have missed ? Is there a temporary patch i can use by sending an explicit May be i will browse the history in git. |
Has the lastest 1.0.1 kraken tested ? Since i tested in other vms/containers 3.6/3.7 level of py. and It had the same error. What python version was kraken tested ? 2.7 or 3.6 ? |
It should work with both 3.6 and 3.7 although installation is a bit easier on 3.6 as coremltools hasn't been packaged for 3.7 yet. |
Ok. thanks, do we need to run this on GPU only ? Or CPU works ok ? |
Either works, for recognition it is certainly not necessary as the throughput of the system is ~1line/second/core. Training is a bit of an annoyance (30min/1000 iterations) on CPU though, with GPU you can train a model from scratch (~20-30 epochs) in <10 minutes. |
Thank you very much for the throughput info. I am running it on cpu currently for text recognition only. I am ok to test and wait for |
I have tried in ArchLinux (bleeding edge) and Ubuntu 18.04. Was kraken tested in a specific flavor ? |
It should work on all of them. I know of at least Arch, Debian, and Ubuntu installs that work without trouble. Can you try this English model? Its accuracy is better than the old one anyway. |
Arrgh, sorry the URL is http://homer.dh.uni-leipzig.de/en_best.mlmodel |
I'm also seeing this in my Docker environment when trying to reuse any existing |
It's been fixed (a few months old regression) in master in the sense that the forward pass works now but there are apparently slight numerical differences that result in ~5% accuracy drop with the old python models. I might get around to spend a few days debugging that, but the new neural network architecture performs significantly better both in absolute accuracy and generalization so it isn't particularly high on the list. |
Hey @mittagessen Great to hear. To sum it up, the problem reported is a regression and was fixed. We need to try and test with the new model to see it exists. If it still does exists its a low priority problem.:) |
Thanks—indeed, if I update my Dockerized version of Kraken from c57abdb to f25acc1 (current However, one thing that still concerns me about this is when using the existing Results: https://gist.github.com/ryanfb/4b2fcd8362ec91925221397a6bee2ca5 If I use the Also, for the
I hate to be a nuisance, but I'm just trying to make sure that the old models are still usable going forward, as they might be good for specific fonts/texts and it would be a shame to throw away the work that went into building them. I'd be happy to re-train/convert them and contribute them back as |
Retraining them with the new architecture would definitely be the way forward as the accuracy is significantly better. Those models were trained by Bruce Robertson but he hasn't made his training data public. You can ask him if he's willing to make it available for retraining and I can offer some GPU ressources to get it done in a few hours for all of them if that's a concern. Getting to the root cause of the numerical differences will require comparing the output at each part of the LSTM cell in |
I ran the below command and receive an error as below.
This happens in both python3.6.8 and python3.7.2
Here is my pip list in
venv
Let me know if i missed something.
Is my level of pips correct ?
Should i use a different level for
torch
?The text was updated successfully, but these errors were encountered: