-
Notifications
You must be signed in to change notification settings - Fork 17
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
No text lines detected - Regression? #60
Comments
Same problem with the non-OCR-D-CLI:
|
Text regions look ok at https://github.com/qurator-spk/sbb_textline_detection/blob/master/qurator/sbb_textline_detector/main.py#L2077 but they get reset in https://github.com/qurator-spk/sbb_textline_detection/blob/master/qurator/sbb_textline_detector/main.py#L2089-L2091 - so I'm guessing the contour detection throws an exception. |
The error sbb_textline_detection/qurator/sbb_textline_detector/main.py Lines 2088 to 2091 in eaf8ecd
I think the exception catching here is too broad and bad practice. If there's a specific exception to catch, it should be specified and that would have made it easier to track down this kind of bug - by giving a proper error message instead of silently ignoring it. This is fixed by downgrading I'm preparing a PR to workaround the issue by requiring 👀 @kba This - the broad exception catching and the attribute error with the newest OpenCV version - might come up in eynollah too. |
PEP8 (https://peps.python.org/pep-0008/) also has an opinion about this:
|
Ah that's why I always had problems interrupting the run of this program! |
There is still something broken, with https://qurator-data.de/examples/actevedef_718448162.first-page+binarization+segmentation.zip and
I get text regions, but there aren't any useful text lines (green) detected: |
Thanks @vahidrezanezhad, I'll test it! |
With |
Using https://qurator-data.de/examples/actevedef_718448162.first-page.zip,
ocrd-sbb-textline-detector --overwrite -I OCR-D-IMG -O OCR-D-SEG-LINE-SBB-TLD -P model "/var/lib/textline_detection"
only gives:I'm investigating.
The text was updated successfully, but these errors were encountered: