-
Notifications
You must be signed in to change notification settings - Fork 9
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
Inconsistently sorted coordinate points for certain words in kant_aufklaerung sample #11
Comments
One more thing: are there really 4 Points needed? If we use rectangles top-left and bottom-right would be sufficient. |
I interpret A two-coordinate tuple could be a special case but translating between all these representations is confusing enough as it is IMHO. |
Yes OK. |
And you cannot check/enforce the ordering in a schema AFAIK. |
The problem behind this issue was a segfault in tesseract for certain words IIRC. I wouldn't want to enforce this via schema, I was just curious how this happens since the coordinates are shifted only in these specific cases. Good point about polygons and bounding boxes, so far we do not have support for bounding polygons with boxes at all because we assume coordinates to be coordinates. @cneud @wrznr @tboenig Do we have samples of non-rectangular text blocks to test? |
This point is probably decisive. Even if we would now fix this upstream, we can never be sure how components evolve. Since we have no (simple and expectable) way to check whether the clock-wise-tl-starting assumption is fulfilled, some day things will go wrong. That goes for weaker assumptions too: We cannot enforce clock-wise or even ordered path for points via XML schema. So how much more expensive would a robust solution in utils.py be? Every PAGE element has coordinates, every page goes through several processing steps involving core's functions. |
@kba Yes, we have plenty examples (incl. some with PAGE ground truth) of non-rectangular text blocks, will try to upload some samples over the next few days. |
A simple programmatical solution for this would be to calculate the min/max x and y coordinates over all points. I do have a simple fix for this -- if you are interested in it. |
Not that much I guess. I'll send a PR. |
Didn't see this before. Contributions welcome :) |
For posterity's sake: The original problem was a bug in Transkribus that has been fixed up-stream and will be rolled out in the next release. HT @tboenig |
E.g. all
Word
withID
word_*
in https://github.com/OCR-D/assets/blob/master/data/kant_aufklaerung_1784/page/kant_aufklaerung_1784_0020.xml, such as https://github.com/OCR-D/assets/blob/master/data/kant_aufklaerung_1784/page/kant_aufklaerung_1784_0020.xml#L71Everywhere else, coordinates are sorted clock-wise starting with top-left but these coordinates start with bottom-right.
Can this be fixed upstream? If not, we could adapt the coordinate translation utilities in core.
@tboenig @bertsky
The text was updated successfully, but these errors were encountered: