construct_page_dict.py 660 Bytes
Newer Older
赵小蒙's avatar
赵小蒙 committed
1
2

def ocr_construct_page_component_v2(blocks, layout_bboxes, page_id, page_w, page_h, layout_tree,
赵小蒙's avatar
赵小蒙 committed
3
                                    images, tables, interline_equations, discarded_blocks, need_drop, drop_reason):
赵小蒙's avatar
赵小蒙 committed
4
5
6
7
8
9
10
11
12
    return_dict = {
        'preproc_blocks': blocks,
        'layout_bboxes': layout_bboxes,
        'page_idx': page_id,
        'page_size': [page_w, page_h],
        '_layout_tree': layout_tree,
        'images': images,
        'tables': tables,
        'interline_equations': interline_equations,
赵小蒙's avatar
赵小蒙 committed
13
        'discarded_blocks': discarded_blocks,
赵小蒙's avatar
赵小蒙 committed
14
15
        'need_drop': need_drop,
        'drop_reason': drop_reason,
赵小蒙's avatar
赵小蒙 committed
16
17
    }
    return return_dict