do_order_of_regions(): use region mask instead of textline mask…

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
This commit is contained in:
Robert Sachunsky 2026-04-29 14:05:06 +02:00
parent 63df9be4db
commit 7e7cc6a801

View file

@ -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")