-
Notifications
You must be signed in to change notification settings - Fork 382
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
Unable to extract text in both directions #1547
Comments
Hi @nk-alex 👋, Could you try one of the And please upgrade to latest: 0.8.1 or use directly the main branch :) |
Thank you for the quick response @felixdittrich92. I tried the following:
pip list is showing now python-doctr 0.9.0a0
I see is trying to download from https://doctr-static.mindee.com/models?id=v0.8.1/fast_base-688a8b34.pt&src=0 which returns "HTTP Error 308: Permanent Redirect" |
Mh .. but it is available: https://github.com/mindee/doctr/releases/download/v0.8.1/fast_base-688a8b34.pt |
Could you please retry and report back if it's still not working ? |
Hello @nk-alex, any update ? |
Sorry for the delay. Now it successfully downloads. This is my result in this case:
|
You are right all models have problems with the large text parts: So the vertical text is detected and recognized correctly but the horizontal large text isn't. I think that's a problem from the dataset we use for pretraining because it contains mostly commonly seen documents/receipts @odulcy-mindee correct me if it contains other data 😅 |
Yeah, indeed, we don't have such image in our dataset |
Hey @nk-alex 👋, yeah i see looks like the detection model has some problems with the vertical text in your example. |
Hi @felixdittrich92 with the ocr_predictor configuration specified above, on real samples, I get some of the vertical words but not most of them. Is there any other ocr_predictor configuration with better results for this use case? Something like this is what I get in most cases:
|
I'm facing the same problem here. The vertical text is not detected at all.
|
Hi all 👋, Thanks for sharing i see we should think on that for the next detection model training iteration looks like the models have some problems with text instances which are light gray / close to the border: Tested also with |
Moved to #1604 |
Bug description
Given an image with text in both directions (horizontal and vertical), I'm not able to extract text
Sample image:
Code snippet to reproduce the bug
ocr_predictor(det_arch='db_resnet50', reco_arch='crnn_vgg16_bn', pretrained=True)
ocr_predictor(det_arch='db_resnet50', reco_arch='crnn_vgg16_bn', pretrained=True, assume_straight_pages=False)
ocr_predictor(det_arch='db_resnet50_rotation', reco_arch='crnn_vgg16_bn', pretrained=True, assume_straight_pages=False)
Error traceback
Environment
Python 3.9.18
python-doctr 0.7.0
Deep Learning backend
is_tf_available: False
is_torch_available: True
The text was updated successfully, but these errors were encountered: