Run this model with HF Jobs

Run deepdoctection/tatr_tab_struct_v2 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/deepdoctection/tatr_tab_struct_v2. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/deepdoctection/tatr_tab_struct_v2 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("object-detection", model="deepdoctection/tatr_tab_struct_v2")
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoImageProcessor, AutoModelForObjectDetection

processor = AutoImageProcessor.from_pretrained("deepdoctection/tatr_tab_struct_v2")
model = AutoModelForObjectDetection.from_pretrained("deepdoctection/tatr_tab_struct_v2", device_map="auto")
Quick Links

Microsoft Table Transformer Table Structure Recognition trained on Pubtables and Fintabnet

If you do not have the deepdoctection Profile of the model, please add:

import deepdoctection as dd

dd.ModelCatalog.register("deepdoctection/tatr_tab_struct_v2/pytorch_model.bin", dd.ModelProfile(
    name="deepdoctection/tatr_tab_struct_v2/pytorch_model.bin",
    description="Table Transformer (DETR) model trained on PubTables1M. It was introduced in the paper "
                "Aligning benchmark datasets for table structure recognition by Smock et "
                "al. This model is devoted to table structure recognition and assumes to receive a slightly cropped"
                "table as input. It will predict rows, column and spanning cells. Use a padding of around 5 pixels",
    size=[115511753],
    tp_model=False,
    config="deepdoctection/tatr_tab_struct_v2/config.json",
    preprocessor_config="deepdoctection/tatr_tab_struct_v2/preprocessor_config.json",
    hf_repo_id="deepdoctection/tatr_tab_struct_v2",
    hf_model_name="pytorch_model.bin",
    hf_config_file=["config.json", "preprocessor_config.json"],
    categories={
        "1": dd.LayoutType.table,
        "2": dd.LayoutType.column,
        "3": dd.LayoutType.row,
        "4": dd.CellType.column_header,
        "5": dd.CellType.projected_row_header,
        "6": dd.CellType.spanning,
    },
    dl_library="PT",
    model_wrapper="HFDetrDerivedDetector",
))

When running the model within the deepdoctection analyzer, adjust the segmentation parameters in order to get better predictions.

    import deepdoctection as dd

    analyzer = dd.get_dd_analyzer(reset_config_file=True, config_overwrite=["PT.ITEM.WEIGHTS=deepdoctection/tatr_tab_struct_v2/pytorch_model.bin",
                                                                            "PT.ITEM.FILTER=['table']",
                                                                            "PT.ITEM.PAD.TOP=5",
                                                                            "PT.ITEM.PAD.RIGHT=5",
                                                                            "PT.ITEM.PAD.BOTTOM=5",
                                                                            "PT.ITEM.PAD.LEFT=5",
                                                                            "SEGMENTATION.THRESHOLD_ROWS=0.9",
                                                                            "SEGMENTATION.THRESHOLD_COLS=0.9",
                                                                            "SEGMENTATION.REMOVE_IOU_THRESHOLD_ROWS=0.3",
                                                                            "SEGMENTATION.REMOVE_IOU_THRESHOLD_COLS=0.3",
                                                                            "WORD_MATCHING.MAX_PARENT_ONLY=True"])
Downloads last month
64
Safetensors
Model size
28.8M params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ 2 Ask for provider support

Space using deepdoctection/tatr_tab_struct_v2 1