Coder Social home page Coder Social logo

Comments (12)

bertsky avatar bertsky commented on June 25, 2024 1

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.

from assets.

finkf avatar finkf commented on June 25, 2024

One more thing: are there really 4 Points needed? If we use rectangles top-left and bottom-right would be sufficient.

from assets.

kba avatar kba commented on June 25, 2024

I interpret page:Coords to be points of a polygon, not necessarily a rectangle. c.f. https://github.com/PRImA-Research-Lab/PAGE-XML/blob/master/pagecontent/schema/pagecontent.xsd#L441

A two-coordinate tuple could be a special case but translating between all these representations is confusing enough as it is IMHO.

from assets.

finkf avatar finkf commented on June 25, 2024

Yes OK.
But then I would suggest not to rely on any ordering of the points. If you have more than 4 points or less than 4 (technically a triangle is a polygon, too) You need a more robust way to calculate the according bounding boxes anyway.

from assets.

finkf avatar finkf commented on June 25, 2024

And you cannot check/enforce the ordering in a schema AFAIK.

from assets.

kba avatar kba commented on June 25, 2024

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?

from assets.

cneud avatar cneud commented on June 25, 2024

@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.

from assets.

finkf avatar finkf commented on June 25, 2024

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.

from assets.

kba avatar kba commented on June 25, 2024

So how much more expensive would a robust solution in utils.py be?

Not that much I guess. I'll send a PR.

from assets.

kba avatar kba commented on June 25, 2024

I do have a simple fix for this -- if you are interested in it.

Didn't see this before. Contributions welcome :)

from assets.

finkf avatar finkf commented on June 25, 2024

pull request

from assets.

kba avatar kba commented on June 25, 2024

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

from assets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.