Skip to content

[io] Resolve the geometry of a block that only has artefacts - #2187

Merged
felixdittrich92 merged 1 commit into
mindee:mainfrom
RavSinghChandan:block-artefacts-only
Oct 29, 2026
Merged

felixdittrich92 merged 1 commit into
mindee:mainfrom
RavSinghChandan:block-artefacts-only

Conversation

@RavSinghChandan

Copy link
Copy Markdown
Contributor

Block(artefacts=[...]) without lines raised IndexError: list index out of range, because the check for a rotated or straight box read lines[0].geometry. lines and artefacts are both optional, and the exporters already handle blocks without lines, so the check now uses the first artefact when there are no lines.

The objectness score is unchanged: it is the mean over words, so it is NaN for such a block, as it already was when the geometry was passed in.

@codecov

codecov Bot commented Oct 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.72%. Comparing base (1a4a35b) to head (20f1cd9).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2187      +/-   ##
==========================================
- Coverage   97.74%   97.72%   -0.02%     
==========================================
  Files         170      170              
  Lines       10932    10933       +1     
==========================================
- Hits        10685    10684       -1     
- Misses        247      249       +2     
Flag Coverage Δ
unittests 97.72% <100.00%> (-0.02%) ⬇️

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 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 @RavSinghChandan 👍

@felixdittrich92 felixdittrich92 self-assigned this Oct 29, 2026
@felixdittrich92 felixdittrich92 added this to the 1.2.0 milestone Oct 29, 2026
@felixdittrich92 felixdittrich92 added type: bug Something isn't working module: io Related to doctr.io ext: tests Related to tests folder labels Oct 29, 2026
@felixdittrich92
felixdittrich92 merged commit 9ae237d into mindee:main Oct 29, 2026
56 of 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: io Related to doctr.io type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants