docling-project / docling-project/docling-eval

Refine Polyline-to-Bounding Box Matching Strategy

Open
#106 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
77
Forks
14
PR merge metrics
No merged PRs in 30d

Description

In the current matching strategy, a point on a polyline is associated with the smallest bounding box that contains it.
https://github.com/docling-project/docling-eval/blob/b507977171780650860e74ae48f3edadd4a60b78/docling_eval/dataset_builders/cvat_dataset_builder.py#L225-L230
This approach works for certain link types, such as `to_footnote`, `to_value`, and `to_caption`. However, for links like `reading_order`, `merge`, or `group`, we expect the points to be associated with the **outermost bounding boxes** under certain conditions. For example, in the case of a `table`, the `reading_order` should be attached to the `table's` bounding box, not to the bounding box of an individual `table_row`.

To ensure the validation methods defined in [PR #102](https://github.com/docling-project/docling-eval/pull/102) work as intended, the `find_box` function needs to be updated accordingly.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.