Views
No views yet
1import deepdoctection as dd
2
3dd.ModelCatalog.register("deepdoctection/tatr_tab_struct_v2/pytorch_model.bin", dd.ModelProfile(
4 name="deepdoctection/tatr_tab_struct_v2/pytorch_model.bin",
5 description="Table Transformer (DETR) model trained on PubTables1M. It was introduced in the paper "
6 "Aligning benchmark datasets for table structure recognition by Smock et "
7 "al. This model is devoted to table structure recognition and assumes to receive a slightly cropped"
8 "table as input. It will predict rows, column and spanning cells. Use a padding of around 5 pixels",
9 size=[115511753],
10 tp_model=False,
11 config="deepdoctection/tatr_tab_struct_v2/config.json",
12 preprocessor_config="deepdoctection/tatr_tab_struct_v2/preprocessor_config.json",
13 hf_repo_id="deepdoctection/tatr_tab_struct_v2",
14 hf_model_name="pytorch_model.bin",
15 hf_config_file=["config.json", "preprocessor_config.json"],
16 categories={
17 "1": dd.LayoutType.table,
18 "2": dd.LayoutType.column,
19 "3": dd.LayoutType.row,
20 "4": dd.CellType.column_header,
21 "5": dd.CellType.projected_row_header,
22 "6": dd.CellType.spanning,
23 },
24 dl_library="PT",
25 model_wrapper="HFDetrDerivedDetector",
26))1 import deepdoctection as dd
2
3 analyzer = dd.get_dd_analyzer(reset_config_file=True, config_overwrite=["PT.ITEM.WEIGHTS=deepdoctection/tatr_tab_struct_v2/pytorch_model.bin",
4 "PT.ITEM.FILTER=['table']",
5 "PT.ITEM.PAD.TOP=5",
6 "PT.ITEM.PAD.RIGHT=5",
7 "PT.ITEM.PAD.BOTTOM=5",
8 "PT.ITEM.PAD.LEFT=5",
9 "SEGMENTATION.THRESHOLD_ROWS=0.9",
10 "SEGMENTATION.THRESHOLD_COLS=0.9",
11 "SEGMENTATION.REMOVE_IOU_THRESHOLD_ROWS=0.3",
12 "SEGMENTATION.REMOVE_IOU_THRESHOLD_COLS=0.3",
13 "WORD_MATCHING.MAX_PARENT_ONLY=True"])