From 7e7cc6a8015b00fbf02630a7ddfe7cb3598b5757 Mon Sep 17 00:00:00 2001 From: Robert Sachunsky Date: Wed, 29 Apr 2026 14:05:06 +0200 Subject: [PATCH] =?UTF-8?q?do=5Forder=5Fof=5Fregions():=20use=20region=20m?= =?UTF-8?q?ask=20instead=20of=20textline=20mask=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit for local (within-box) ordering of region contours, use the same text mask (merely eroded) as for the contour extraction itself: the text+table+drop mask from early+full layout prediction, rather than the textline mask, because the latter may be empty in some boxes and is unlikely to be more useful than the region mask itself --- src/eynollah/eynollah.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/eynollah/eynollah.py b/src/eynollah/eynollah.py index 432dd63..7f5c504 100644 --- a/src/eynollah/eynollah.py +++ b/src/eynollah/eynollah.py @@ -2536,7 +2536,7 @@ class Eynollah: polygons_of_textregions, polygons_of_textregions_h, polygons_of_drop_capitals, - boxes, textline_mask_tot_ea) + boxes, regions_without_separators) #textline_mask_tot_ea) else: boxes_d = self.run_boxes_order(text_regions_p_d, num_col_classifier, erosion_hurts, regions_without_separators_d, @@ -2547,7 +2547,7 @@ class Eynollah: polygons_of_textregions_d, polygons_of_textregions_h_d, polygons_of_drop_capitals, - boxes_d, textline_mask_tot_ea_d) + boxes_d, regions_without_separators_d) #textline_mask_tot_ea_d) self.logger.info(f"Detection of reading order took {time.time() - t_order:.1f}s") self.logger.info("Step 5/5: Output Generation")