Repository navigation
[models] Simplify the reading order, exporters and document builder - #2182
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2182 +/- ##
=======================================
Coverage 97.71% 97.71%
=======================================
Files 170 170
Lines 10922 10888 -34
=======================================
- Hits 10672 10639 -33
+ Misses 250 249 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
felixdittrich92
marked this pull request as ready for review
October 26, 2026 13:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A readability refactor of the reading-order pipeline added in #2167. The output does not change: it is bit-identical to
mainfor every input tested, including degenerate ones (NaN / inf coordinates). The public API is unchanged.doctr/models/reading_order/base.py_column_gutter);_continuation)._canonical_boxes), and the label-aware ordering in_sort._SegmentJoins.doctr/io/exporters.py,doctr/io/figures.pypage_reading_orderis now a short pipeline: element labels → ordering labels → column voters → segments → items._PageFigures: upright boxes, text inside figures, page furniture and caption pairing.doctr/models/builder.pypage_reading_order)How it was checked
Everything is compared against
main(6c46df2):resolve_lines=False,resolve_blocksand thekeep_reading_ordervariants.ruffand project-widemypypass.evaluate-text-recognitionfails onmaintoo, so it is unrelated.