Skip to content

[utils] Remap integer boxes in floating point in remap_boxes - #2199

Merged
felixdittrich92 merged 1 commit into
mindee:mainfrom
RavSinghChandan:remap-boxes-integer
Oct 30, 2026
Merged

felixdittrich92 merged 1 commit into
mindee:mainfrom
RavSinghChandan:remap-boxes-integer

Conversation

@RavSinghChandan

Copy link
Copy Markdown
Contributor

remap_boxes wrote the remapped coordinates into a copy of the input, so for an integer array they were truncated: a whole-page box [[0, 0], [1, 0], [1, 1], [0, 1]] remapped from (10, 10) to (20, 20) came back as all zeros instead of 0.25 / 0.75.

The boxes are now remapped in floating point (the input dtype when it is already a float one, so float results are unchanged)

@felixdittrich92 felixdittrich92 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

@felixdittrich92 felixdittrich92 added this to the 1.2.0 milestone Oct 30, 2026
@felixdittrich92 felixdittrich92 self-assigned this Oct 30, 2026
@felixdittrich92 felixdittrich92 added type: enhancement Improvement module: utils Related to doctr.utils ext: tests Related to tests folder labels Oct 30, 2026
@codecov

codecov Bot commented Oct 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.75%. Comparing base (74e5759) to head (490e0b8).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2199   +/-   ##
=======================================
  Coverage   97.75%   97.75%           
=======================================
  Files         170      170           
  Lines       10969    10974    +5     
=======================================
+ Hits        10723    10728    +5     
  Misses        246      246           
Flag Coverage Δ
unittests 97.75% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@felixdittrich92
felixdittrich92 merged commit edfc6da into mindee:main Oct 30, 2026
57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ext: tests Related to tests folder module: utils Related to doctr.utils type: enhancement Improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants