File size: 1,244 Bytes
29d49e1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | # SPDX-FileCopyrightText: Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
"""
Post-processing utilities for page element predictions.
This module provides utilities for advanced post-processing of page element
detection results, including box expansion, matching with titles, and
weighted box fusion.
"""
# Import from page_elt_pp
from .page_elt_pp import (
expand_boxes,
merge_boxes,
bb_iou_array,
match_with_title,
match_boxes_with_title,
)
# Import from text_pp
from .text_pp import (
get_overlaps,
get_distances,
find_titles,
postprocess_included,
)
# Import from wbf
from .wbf import (
weighted_boxes_fusion,
prefilter_boxes,
merge_labels,
get_weighted_box,
get_biggest_box,
find_matching_box_fast,
)
__all__ = [
# page_elt_pp
"expand_boxes",
"merge_boxes",
"bb_iou_array",
"match_with_title",
"match_boxes_with_title",
# text_pp
"get_overlaps",
"get_distances",
"find_titles",
"postprocess_included",
# wbf
"weighted_boxes_fusion",
"prefilter_boxes",
"merge_labels",
"get_weighted_box",
"get_biggest_box",
"find_matching_box_fast",
]
|