Skip to content

feat: extend bounding box #348

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

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

feat: extend bounding box #348

wants to merge 7 commits into from

Conversation

cau-git
Copy link
Contributor

@cau-git cau-git commented Jul 2, 2025

This PR introduces support for representing bounding boxes using 4-vertex convex polygons instead of axis-aligned rectangles. This allows for more accurate localization of elements within a document, especially in cases where the document is photographed under imperfect conditions, such as misalignment, bending, or stretching of the paper.

While the class name BoundingRectangle is currently used, it may be misleading and should potentially be renamed to better reflect the generalized shape (e.g., BoundingPolygon).

To support this new structure in SmolDocling, a dedicated localization token <rec_ has been added.

Significant effort has gone into ensuring backward compatibility within the Prov class and related methods, so existing workflows remain unaffected.

Riccardo-Maggioni and others added 6 commits June 20, 2025 14:25
Signed-off-by: rickymaggio02 <[email protected]>
…email.com>

I, Riccardo Maggioni <[email protected]>, hereby add my Signed-off-by to this commit: 9e2d467
I, Riccardo Maggioni <[email protected]>, hereby add my Signed-off-by to this commit: 84917db

Signed-off-by: Riccardo Maggioni <[email protected]>
Copy link
Contributor

github-actions bot commented Jul 2, 2025

DCO Check Failed

Hi @cau-git, your pull request has failed the Developer Certificate of Origin (DCO) check.

This repository supports remediation commits, so you can fix this without rewriting history — but you must follow the required message format.


🛠 Quick Fix: Add a remediation commit

Run this command:

git commit --allow-empty -s -m "DCO Remediation Commit for Riccardo Maggioni <[email protected]>

I, Riccardo Maggioni <[email protected]>, hereby add my Signed-off-by to this commit: 9e2d4674a65274b3c2140007bcbc5d81518a7da2
I, Riccardo Maggioni <[email protected]>, hereby add my Signed-off-by to this commit: 84917dbc7c59eaf9cfcffa4f4dbe0d4c6db468e9
I, Christoph Auer <[email protected]>, hereby add my Signed-off-by to this commit: f514329ffe25f8c36a893a0beff847e5c42c3a5d"
git push

🔧 Advanced: Sign off each commit directly

For the latest commit:

git commit --amend --signoff
git push --force-with-lease

For multiple commits:

git rebase --signoff origin/main
git push --force-with-lease

More info: DCO check report

Copy link

mergify bot commented Jul 2, 2025

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🔴 Require two reviewer for test updates

This rule is failing.

When test data is updated, we require two reviewers

  • #approved-reviews-by >= 2

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

@PeterStaar-IBM PeterStaar-IBM requested review from PeterStaar-IBM, vagenas and dolfim-ibm and removed request for vagenas July 8, 2025 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants