We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8f85465 commit e3fad08Copy full SHA for e3fad08
1 file changed
unstructured/partition/pdf_image/ocr.py
@@ -478,13 +478,9 @@ def supplement_layout_with_ocr_elements(
478
else:
479
ocr_regions_to_add = ocr_layout
480
481
- mask = (
482
- ~bboxes1_is_almost_subregion_of_bboxes2(
483
- ocr_layout.element_coords, layout.element_coords, subregion_threshold
484
- )
485
- .sum(axis=1)
486
- .astype(bool)
487
+ mask = ~bboxes1_is_almost_subregion_of_bboxes2(
+ ocr_layout.element_coords, layout.element_coords, subregion_threshold
+ ).sum(axis=1).astype(bool)
488
489
# add ocr regions that are not covered by layout
490
ocr_regions_to_add = ocr_layout.slice(mask)
0 commit comments