Skip to content

Commit

Permalink
Fix issue with not cleaning up the binary mask
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanklut committed Feb 20, 2024
1 parent 3f2eca1 commit 03ca383
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions page_xml/xml_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,8 @@ def build_top_bottom_sem_seg(self, page: PageData, out_size: tuple[int, int], li
colored_top_bottom = np.where(top_bottom, top_color, bottom_color)
sem_seg[line_pixel_coords[:, 1], line_pixel_coords[:, 0]] = colored_top_bottom

binary_mask.fill(0)

if total_overlap:
self.logger.warning(f"File {page.filepath} contains overlapping top bottom sem_seg")
if not sem_seg.any():
Expand Down

0 comments on commit 03ca383

Please sign in to comment.