import{S as va,i as wa,s as xa,e as r,k as m,w as v,t as n,M as ya,c as a,d as o,m as h,a as i,x as w,h as s,b as d,N as $a,G as e,g as u,y as x,q as y,o as $,B as j,v as ja,L as Cr}from"../../chunks/vendor-hf-doc-builder.js";import{T as Ta}from"../../chunks/Tip-hf-doc-builder.js";import{D as bt}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Mr}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Tt}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Fr}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function ka(F){let c,T,_,p,b;return p=new Mr({props:{code:`from transformers import TableTransformerModel, TableTransformerConfig

# Initializing a Table Transformer microsoft/table-transformer-table-detection style configuration
configuration = TableTransformerConfig()

# Initializing a model from the microsoft/table-transformer-table-detection style configuration
model = TableTransformerModel(configuration)

# Accessing the model configuration
configuration = model.config`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TableTransformerModel, TableTransformerConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Table Transformer microsoft/table-transformer-table-detection style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = TableTransformerConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the microsoft/table-transformer-table-detection style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TableTransformerModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){c=r("p"),T=n("Examples:"),_=m(),v(p.$$.fragment)},l(l){c=a(l,"P",{});var g=i(c);T=s(g,"Examples:"),g.forEach(o),_=h(l),w(p.$$.fragment,l)},m(l,g){u(l,c,g),e(c,T),u(l,_,g),x(p,l,g),b=!0},p:Cr,i(l){b||(y(p.$$.fragment,l),b=!0)},o(l){$(p.$$.fragment,l),b=!1},d(l){l&&o(c),l&&o(_),j(p,l)}}}function Ea(F){let c,T,_,p,b;return{c(){c=r("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=r("code"),p=n("Module"),b=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){c=a(l,"P",{});var g=i(c);T=s(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a(g,"CODE",{});var z=i(_);p=s(z,"Module"),z.forEach(o),b=s(g,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),g.forEach(o)},m(l,g){u(l,c,g),e(c,T),e(c,_),e(_,p),e(c,b)},d(l){l&&o(c)}}}function qa(F){let c,T,_,p,b;return p=new Mr({props:{code:`from transformers import AutoFeatureExtractor, TableTransformerModel
from huggingface_hub import hf_hub_download
from PIL import Image

file_path = hf_hub_download(repo_id="nielsr/example-pdf", repo_type="dataset", filename="example_pdf.png")
image = Image.open(file_path).convert("RGB")

feature_extractor = AutoFeatureExtractor.from_pretrained("microsoft/table-transformer-detection")
model = TableTransformerModel.from_pretrained("microsoft/table-transformer-detection")

# prepare image for the model
inputs = feature_extractor(images=image, return_tensors="pt")

# forward pass
outputs = model(**inputs)

# the last hidden states are the final query embeddings of the Transformer decoder
# these are of shape (batch_size, num_queries, hidden_size)
last_hidden_states = outputs.last_hidden_state
list(last_hidden_states.shape)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, TableTransformerModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> hf_hub_download
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image

<span class="hljs-meta">&gt;&gt;&gt; </span>file_path = hf_hub_download(repo_id=<span class="hljs-string">&quot;nielsr/example-pdf&quot;</span>, repo_type=<span class="hljs-string">&quot;dataset&quot;</span>, filename=<span class="hljs-string">&quot;example_pdf.png&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(file_path).convert(<span class="hljs-string">&quot;RGB&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;microsoft/table-transformer-detection&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TableTransformerModel.from_pretrained(<span class="hljs-string">&quot;microsoft/table-transformer-detection&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># prepare image for the model</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># forward pass</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the last hidden states are the final query embeddings of the Transformer decoder</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># these are of shape (batch_size, num_queries, hidden_size)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_states.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">15</span>, <span class="hljs-number">256</span>]`}}),{c(){c=r("p"),T=n("Examples:"),_=m(),v(p.$$.fragment)},l(l){c=a(l,"P",{});var g=i(c);T=s(g,"Examples:"),g.forEach(o),_=h(l),w(p.$$.fragment,l)},m(l,g){u(l,c,g),e(c,T),u(l,_,g),x(p,l,g),b=!0},p:Cr,i(l){b||(y(p.$$.fragment,l),b=!0)},o(l){$(p.$$.fragment,l),b=!1},d(l){l&&o(c),l&&o(_),j(p,l)}}}function Fa(F){let c,T,_,p,b;return{c(){c=r("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=r("code"),p=n("Module"),b=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){c=a(l,"P",{});var g=i(c);T=s(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a(g,"CODE",{});var z=i(_);p=s(z,"Module"),z.forEach(o),b=s(g,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),g.forEach(o)},m(l,g){u(l,c,g),e(c,T),e(c,_),e(_,p),e(c,b)},d(l){l&&o(c)}}}function Ca(F){let c,T,_,p,b;return p=new Mr({props:{code:`from huggingface_hub import hf_hub_download
from transformers import AutoFeatureExtractor, TableTransformerForObjectDetection
import torch
from PIL import Image

file_path = hf_hub_download(repo_id="nielsr/example-pdf", repo_type="dataset", filename="example_pdf.png")
image = Image.open(file_path).convert("RGB")

feature_extractor = AutoFeatureExtractor.from_pretrained("microsoft/table-transformer-detection")
model = TableTransformerForObjectDetection.from_pretrained("microsoft/table-transformer-detection")

inputs = feature_extractor(images=image, return_tensors="pt")
outputs = model(**inputs)

# convert outputs (bounding boxes and class logits) to COCO API
target_sizes = torch.tensor([image.size[::-1]])
results = feature_extractor.post_process_object_detection(
    outputs, threshold=0.9, target_sizes=target_sizes
)[0]

for score, label, box in zip(results["scores"], results["labels"], results["boxes"]):
    box = [round(i, 2) for i in box.tolist()]
    print(
        f"Detected {model.config.id2label[label.item()]} with confidence "
        f"{round(score.item(), 3)} at location {box}"
    )`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> hf_hub_download
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, TableTransformerForObjectDetection
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image

<span class="hljs-meta">&gt;&gt;&gt; </span>file_path = hf_hub_download(repo_id=<span class="hljs-string">&quot;nielsr/example-pdf&quot;</span>, repo_type=<span class="hljs-string">&quot;dataset&quot;</span>, filename=<span class="hljs-string">&quot;example_pdf.png&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(file_path).convert(<span class="hljs-string">&quot;RGB&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;microsoft/table-transformer-detection&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TableTransformerForObjectDetection.from_pretrained(<span class="hljs-string">&quot;microsoft/table-transformer-detection&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># convert outputs (bounding boxes and class logits) to COCO API</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_sizes = torch.tensor([image.size[::-<span class="hljs-number">1</span>]])
<span class="hljs-meta">&gt;&gt;&gt; </span>results = feature_extractor.post_process_object_detection(
<span class="hljs-meta">... </span>    outputs, threshold=<span class="hljs-number">0.9</span>, target_sizes=target_sizes
<span class="hljs-meta">... </span>)[<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">for</span> score, label, box <span class="hljs-keyword">in</span> <span class="hljs-built_in">zip</span>(results[<span class="hljs-string">&quot;scores&quot;</span>], results[<span class="hljs-string">&quot;labels&quot;</span>], results[<span class="hljs-string">&quot;boxes&quot;</span>]):
<span class="hljs-meta">... </span>    box = [<span class="hljs-built_in">round</span>(i, <span class="hljs-number">2</span>) <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> box.tolist()]
<span class="hljs-meta">... </span>    <span class="hljs-built_in">print</span>(
<span class="hljs-meta">... </span>        <span class="hljs-string">f&quot;Detected <span class="hljs-subst">{model.config.id2label[label.item()]}</span> with confidence &quot;</span>
<span class="hljs-meta">... </span>        <span class="hljs-string">f&quot;<span class="hljs-subst">{<span class="hljs-built_in">round</span>(score.item(), <span class="hljs-number">3</span>)}</span> at location <span class="hljs-subst">{box}</span>&quot;</span>
<span class="hljs-meta">... </span>    )
Detected table <span class="hljs-keyword">with</span> confidence <span class="hljs-number">1.0</span> at location [<span class="hljs-number">202.1</span>, <span class="hljs-number">210.59</span>, <span class="hljs-number">1119.22</span>, <span class="hljs-number">385.09</span>]`}}),{c(){c=r("p"),T=n("Examples:"),_=m(),v(p.$$.fragment)},l(l){c=a(l,"P",{});var g=i(c);T=s(g,"Examples:"),g.forEach(o),_=h(l),w(p.$$.fragment,l)},m(l,g){u(l,c,g),e(c,T),u(l,_,g),x(p,l,g),b=!0},p:Cr,i(l){b||(y(p.$$.fragment,l),b=!0)},o(l){$(p.$$.fragment,l),b=!1},d(l){l&&o(c),l&&o(_),j(p,l)}}}function Ma(F){let c,T,_,p,b,l,g,z,Bt,vt,N,J,ot,le,Gt,rt,Vt,wt,P,Jt,de,Xt,Yt,Pe,Kt,Qt,xt,De,Zt,yt,Ae,at,eo,$t,Oe,to,jt,D,L,oo,ce,ro,ao,fe,no,so,io,S,lo,Ie,co,fo,Ne,mo,ho,po,me,uo,he,go,_o,kt,X,zr,Et,Y,bo,Le,To,vo,qt,A,wo,pe,xo,yo,ue,$o,jo,Ft,R,K,nt,ge,ko,st,Eo,Ct,q,_e,qo,H,Fo,Se,Co,Mo,be,zo,Po,Do,W,Ao,Re,Oo,Io,He,No,Lo,So,Q,Mt,U,Z,it,Te,Ro,lt,Ho,zt,k,ve,Wo,dt,Uo,Bo,we,Go,We,Vo,Jo,Xo,xe,Yo,ye,Ko,Qo,Zo,C,$e,er,B,tr,Ue,or,rr,ct,ar,nr,sr,ee,ir,te,Pt,G,oe,ft,je,lr,mt,dr,Dt,E,ke,cr,ht,fr,mr,Ee,hr,Be,pr,ur,gr,qe,_r,Fe,br,Tr,vr,M,Ce,wr,V,xr,Ge,yr,$r,pt,jr,kr,Er,re,qr,ae,At;return l=new Tt({}),le=new Tt({}),ge=new Tt({}),_e=new bt({props:{name:"class transformers.TableTransformerConfig",anchor:"transformers.TableTransformerConfig",parameters:[{name:"num_channels",val:" = 3"},{name:"num_queries",val:" = 100"},{name:"max_position_embeddings",val:" = 1024"},{name:"encoder_layers",val:" = 6"},{name:"encoder_ffn_dim",val:" = 2048"},{name:"encoder_attention_heads",val:" = 8"},{name:"decoder_layers",val:" = 6"},{name:"decoder_ffn_dim",val:" = 2048"},{name:"decoder_attention_heads",val:" = 8"},{name:"encoder_layerdrop",val:" = 0.0"},{name:"decoder_layerdrop",val:" = 0.0"},{name:"is_encoder_decoder",val:" = True"},{name:"activation_function",val:" = 'relu'"},{name:"d_model",val:" = 256"},{name:"dropout",val:" = 0.1"},{name:"attention_dropout",val:" = 0.0"},{name:"activation_dropout",val:" = 0.0"},{name:"init_std",val:" = 0.02"},{name:"init_xavier_std",val:" = 1.0"},{name:"classifier_dropout",val:" = 0.0"},{name:"scale_embedding",val:" = False"},{name:"auxiliary_loss",val:" = False"},{name:"position_embedding_type",val:" = 'sine'"},{name:"backbone",val:" = 'resnet50'"},{name:"use_pretrained_backbone",val:" = True"},{name:"dilation",val:" = False"},{name:"class_cost",val:" = 1"},{name:"bbox_cost",val:" = 5"},{name:"giou_cost",val:" = 2"},{name:"mask_loss_coefficient",val:" = 1"},{name:"dice_loss_coefficient",val:" = 1"},{name:"bbox_loss_coefficient",val:" = 5"},{name:"giou_loss_coefficient",val:" = 2"},{name:"eos_coefficient",val:" = 0.1"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TableTransformerConfig.num_channels",description:`<strong>num_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
The number of input channels.`,name:"num_channels"},{anchor:"transformers.TableTransformerConfig.num_queries",description:`<strong>num_queries</strong> (<code>int</code>, <em>optional</em>, defaults to 100) &#x2014;
Number of object queries, i.e. detection slots. This is the maximal number of objects
<a href="/docs/transformers/pr_19907/en/model_doc/table-transformer#transformers.TableTransformerModel">TableTransformerModel</a> can detect in a single image. For COCO, we recommend 100 queries.`,name:"num_queries"},{anchor:"transformers.TableTransformerConfig.d_model",description:`<strong>d_model</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimension of the layers.`,name:"d_model"},{anchor:"transformers.TableTransformerConfig.encoder_layers",description:`<strong>encoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 6) &#x2014;
Number of encoder layers.`,name:"encoder_layers"},{anchor:"transformers.TableTransformerConfig.decoder_layers",description:`<strong>decoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 6) &#x2014;
Number of decoder layers.`,name:"decoder_layers"},{anchor:"transformers.TableTransformerConfig.encoder_attention_heads",description:`<strong>encoder_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"encoder_attention_heads"},{anchor:"transformers.TableTransformerConfig.decoder_attention_heads",description:`<strong>decoder_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
Number of attention heads for each attention layer in the Transformer decoder.`,name:"decoder_attention_heads"},{anchor:"transformers.TableTransformerConfig.decoder_ffn_dim",description:`<strong>decoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
Dimension of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in decoder.`,name:"decoder_ffn_dim"},{anchor:"transformers.TableTransformerConfig.encoder_ffn_dim",description:`<strong>encoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
Dimension of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in decoder.`,name:"encoder_ffn_dim"},{anchor:"transformers.TableTransformerConfig.activation_function",description:`<strong>activation_function</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;relu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"activation_function"},{anchor:"transformers.TableTransformerConfig.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"dropout"},{anchor:"transformers.TableTransformerConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.TableTransformerConfig.activation_dropout",description:`<strong>activation_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for activations inside the fully connected layer.`,name:"activation_dropout"},{anchor:"transformers.TableTransformerConfig.init_std",description:`<strong>init_std</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"init_std"},{anchor:"transformers.TableTransformerConfig.init_xavier_std",description:`<strong>init_xavier_std</strong> (<code>float</code>, <em>optional</em>, defaults to 1) &#x2014;
The scaling factor used for the Xavier initialization gain in the HM Attention map module.`,name:"init_xavier_std"},{anchor:"transformers.TableTransformerConfig.encoder_layerdrop",description:`<strong>encoder_layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The LayerDrop probability for the encoder. See the [LayerDrop paper](see <a href="https://arxiv.org/abs/1909.11556" rel="nofollow">https://arxiv.org/abs/1909.11556</a>)
for more details.`,name:"encoder_layerdrop"},{anchor:"transformers.TableTransformerConfig.decoder_layerdrop",description:`<strong>decoder_layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The LayerDrop probability for the decoder. See the [LayerDrop paper](see <a href="https://arxiv.org/abs/1909.11556" rel="nofollow">https://arxiv.org/abs/1909.11556</a>)
for more details.`,name:"decoder_layerdrop"},{anchor:"transformers.TableTransformerConfig.auxiliary_loss",description:`<strong>auxiliary_loss</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether auxiliary decoding losses (loss at each decoder layer) are to be used.`,name:"auxiliary_loss"},{anchor:"transformers.TableTransformerConfig.position_embedding_type",description:`<strong>position_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;sine&quot;</code>) &#x2014;
Type of position embeddings to be used on top of the image features. One of <code>&quot;sine&quot;</code> or <code>&quot;learned&quot;</code>.`,name:"position_embedding_type"},{anchor:"transformers.TableTransformerConfig.backbone",description:`<strong>backbone</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;resnet50&quot;</code>) &#x2014;
Name of convolutional backbone to use. Supports any convolutional backbone from the timm package. For a
list of all available models, see <a href="https://rwightman.github.io/pytorch-image-models/#load-a-pretrained-model" rel="nofollow">this
page</a>.`,name:"backbone"},{anchor:"transformers.TableTransformerConfig.use_pretrained_backbone",description:`<strong>use_pretrained_backbone</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use pretrained weights for the backbone.`,name:"use_pretrained_backbone"},{anchor:"transformers.TableTransformerConfig.dilation",description:`<strong>dilation</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to replace stride with dilation in the last convolutional block (DC5).`,name:"dilation"},{anchor:"transformers.TableTransformerConfig.class_cost",description:`<strong>class_cost</strong> (<code>float</code>, <em>optional</em>, defaults to 1) &#x2014;
Relative weight of the classification error in the Hungarian matching cost.`,name:"class_cost"},{anchor:"transformers.TableTransformerConfig.bbox_cost",description:`<strong>bbox_cost</strong> (<code>float</code>, <em>optional</em>, defaults to 5) &#x2014;
Relative weight of the L1 error of the bounding box coordinates in the Hungarian matching cost.`,name:"bbox_cost"},{anchor:"transformers.TableTransformerConfig.giou_cost",description:`<strong>giou_cost</strong> (<code>float</code>, <em>optional</em>, defaults to 2) &#x2014;
Relative weight of the generalized IoU loss of the bounding box in the Hungarian matching cost.`,name:"giou_cost"},{anchor:"transformers.TableTransformerConfig.mask_loss_coefficient",description:`<strong>mask_loss_coefficient</strong> (<code>float</code>, <em>optional</em>, defaults to 1) &#x2014;
Relative weight of the Focal loss in the panoptic segmentation loss.`,name:"mask_loss_coefficient"},{anchor:"transformers.TableTransformerConfig.dice_loss_coefficient",description:`<strong>dice_loss_coefficient</strong> (<code>float</code>, <em>optional</em>, defaults to 1) &#x2014;
Relative weight of the DICE/F-1 loss in the panoptic segmentation loss.`,name:"dice_loss_coefficient"},{anchor:"transformers.TableTransformerConfig.bbox_loss_coefficient",description:`<strong>bbox_loss_coefficient</strong> (<code>float</code>, <em>optional</em>, defaults to 5) &#x2014;
Relative weight of the L1 bounding box loss in the object detection loss.`,name:"bbox_loss_coefficient"},{anchor:"transformers.TableTransformerConfig.giou_loss_coefficient",description:`<strong>giou_loss_coefficient</strong> (<code>float</code>, <em>optional</em>, defaults to 2) &#x2014;
Relative weight of the generalized IoU loss in the object detection loss.`,name:"giou_loss_coefficient"},{anchor:"transformers.TableTransformerConfig.eos_coefficient",description:`<strong>eos_coefficient</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
Relative classification weight of the &#x2018;no-object&#x2019; class in the object detection loss.`,name:"eos_coefficient"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/table_transformer/configuration_table_transformer.py#L36"}}),Q=new Fr({props:{anchor:"transformers.TableTransformerConfig.example",$$slots:{default:[ka]},$$scope:{ctx:F}}}),Te=new Tt({}),ve=new bt({props:{name:"class transformers.TableTransformerModel",anchor:"transformers.TableTransformerModel",parameters:[{name:"config",val:": TableTransformerConfig"}],parametersDescription:[{anchor:"transformers.TableTransformerModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_19907/en/model_doc/table-transformer#transformers.TableTransformerConfig">TableTransformerConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/table_transformer/modeling_table_transformer.py#L1130"}}),$e=new bt({props:{name:"forward",anchor:"transformers.TableTransformerModel.forward",parameters:[{name:"pixel_values",val:""},{name:"pixel_mask",val:" = None"},{name:"decoder_attention_mask",val:" = None"},{name:"encoder_outputs",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"decoder_inputs_embeds",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],parametersDescription:[{anchor:"transformers.TableTransformerModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it.</p>
<p>Pixel values can be obtained using <a href="/docs/transformers/pr_19907/en/model_doc/detr#transformers.DetrFeatureExtractor">DetrFeatureExtractor</a>. See <a href="/docs/transformers/pr_19907/en/model_doc/detr#transformers.DetrFeatureExtractor.__call__">DetrFeatureExtractor.<strong>call</strong>()</a> for
details.`,name:"pixel_values"},{anchor:"transformers.TableTransformerModel.forward.pixel_mask",description:`<strong>pixel_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, height, width)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding pixel values. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for pixels that are real (i.e. <strong>not masked</strong>),</li>
<li>0 for pixels that are padding (i.e. <strong>masked</strong>).</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"pixel_mask"},{anchor:"transformers.TableTransformerModel.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_queries)</code>, <em>optional</em>) &#x2014;
Not used by default. Can be used to mask object queries.`,name:"decoder_attention_mask"},{anchor:"transformers.TableTransformerModel.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.TableTransformerModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing the flattened feature map (output of the backbone + projection layer), you
can choose to directly pass a flattened representation of an image.`,name:"inputs_embeds"},{anchor:"transformers.TableTransformerModel.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_queries, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of initializing the queries with a tensor of zeros, you can choose to directly pass an
embedded representation.`,name:"decoder_inputs_embeds"},{anchor:"transformers.TableTransformerModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TableTransformerModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TableTransformerModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/table_transformer/modeling_table_transformer.py#L1167",returnDescription:`
<p>A <code>transformers.models.table_transformer.modeling_table_transformer.TableTransformerModelOutput</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_19907/en/model_doc/table-transformer#transformers.TableTransformerConfig"
>TableTransformerConfig</a>) and inputs.</p>
<ul>
<li><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the decoder of the model.</li>
<li><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of the decoder at the output of each
layer plus the initial embedding outputs.</li>
<li><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights of the decoder, after the attention softmax, used to compute the
weighted average in the self-attention heads.</li>
<li><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax,
used to compute the weighted average in the cross-attention heads.</li>
<li><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</li>
<li><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of the encoder at the output of each
layer plus the initial embedding outputs.</li>
<li><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights of the encoder, after the attention softmax, used to compute the
weighted average in the self-attention heads.</li>
<li><strong>intermediate_hidden_states</strong> (<code>torch.FloatTensor</code> of shape <code>(config.decoder_layers, batch_size, sequence_length, hidden_size)</code>, <em>optional</em>, returned when <code>config.auxiliary_loss=True</code>) \u2014 Intermediate decoder activations, i.e. the output of each decoder layer, each of them gone through a
layernorm.</li>
</ul>
`,returnType:`
<p><code>transformers.models.table_transformer.modeling_table_transformer.TableTransformerModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ee=new Ta({props:{$$slots:{default:[Ea]},$$scope:{ctx:F}}}),te=new Fr({props:{anchor:"transformers.TableTransformerModel.forward.example",$$slots:{default:[qa]},$$scope:{ctx:F}}}),je=new Tt({}),ke=new bt({props:{name:"class transformers.TableTransformerForObjectDetection",anchor:"transformers.TableTransformerForObjectDetection",parameters:[{name:"config",val:": TableTransformerConfig"}],parametersDescription:[{anchor:"transformers.TableTransformerForObjectDetection.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_19907/en/model_doc/table-transformer#transformers.TableTransformerConfig">TableTransformerConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/table_transformer/modeling_table_transformer.py#L1301"}}),Ce=new bt({props:{name:"forward",anchor:"transformers.TableTransformerForObjectDetection.forward",parameters:[{name:"pixel_values",val:""},{name:"pixel_mask",val:" = None"},{name:"decoder_attention_mask",val:" = None"},{name:"encoder_outputs",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"decoder_inputs_embeds",val:" = None"},{name:"labels",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],parametersDescription:[{anchor:"transformers.TableTransformerForObjectDetection.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it.</p>
<p>Pixel values can be obtained using <a href="/docs/transformers/pr_19907/en/model_doc/detr#transformers.DetrFeatureExtractor">DetrFeatureExtractor</a>. See <a href="/docs/transformers/pr_19907/en/model_doc/detr#transformers.DetrFeatureExtractor.__call__">DetrFeatureExtractor.<strong>call</strong>()</a> for
details.`,name:"pixel_values"},{anchor:"transformers.TableTransformerForObjectDetection.forward.pixel_mask",description:`<strong>pixel_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, height, width)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding pixel values. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for pixels that are real (i.e. <strong>not masked</strong>),</li>
<li>0 for pixels that are padding (i.e. <strong>masked</strong>).</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"pixel_mask"},{anchor:"transformers.TableTransformerForObjectDetection.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_queries)</code>, <em>optional</em>) &#x2014;
Not used by default. Can be used to mask object queries.`,name:"decoder_attention_mask"},{anchor:"transformers.TableTransformerForObjectDetection.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.TableTransformerForObjectDetection.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing the flattened feature map (output of the backbone + projection layer), you
can choose to directly pass a flattened representation of an image.`,name:"inputs_embeds"},{anchor:"transformers.TableTransformerForObjectDetection.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_queries, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of initializing the queries with a tensor of zeros, you can choose to directly pass an
embedded representation.`,name:"decoder_inputs_embeds"},{anchor:"transformers.TableTransformerForObjectDetection.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TableTransformerForObjectDetection.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TableTransformerForObjectDetection.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.TableTransformerForObjectDetection.forward.labels",description:`<strong>labels</strong> (<code>List[Dict]</code> of len <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the bipartite matching loss. List of dicts, each dictionary containing at least the
following 2 keys: &#x2018;class_labels&#x2019; and &#x2018;boxes&#x2019; (the class labels and bounding boxes of an image in the batch
respectively). The class labels themselves should be a <code>torch.LongTensor</code> of len <code>(number of bounding boxes in the image,)</code> and the boxes a <code>torch.FloatTensor</code> of shape <code>(number of bounding boxes in the image, 4)</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/table_transformer/modeling_table_transformer.py#L1328",returnDescription:`
<p>A <code>transformers.models.table_transformer.modeling_table_transformer.TableTransformerObjectDetectionOutput</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_19907/en/model_doc/table-transformer#transformers.TableTransformerConfig"
>TableTransformerConfig</a>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> are provided)) \u2014 Total loss as a linear combination of a negative log-likehood (cross-entropy) for class prediction and a
bounding box loss. The latter is defined as a linear combination of the L1 loss and the generalized
scale-invariant IoU loss.</li>
<li><strong>loss_dict</strong> (<code>Dict</code>, <em>optional</em>) \u2014 A dictionary containing the individual losses. Useful for logging.</li>
<li><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_queries, num_classes + 1)</code>) \u2014 Classification logits (including no-object) for all queries.</li>
<li><strong>pred_boxes</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_queries, 4)</code>) \u2014 Normalized boxes coordinates for all queries, represented as (center_x, center_y, width, height). These
values are normalized in [0, 1], relative to the size of each individual image in the batch (disregarding
possible padding). You can use <code>~TableTransformerFeatureExtractor.post_process_object_detection</code> to
retrieve the unnormalized bounding boxes.</li>
<li><strong>auxiliary_outputs</strong> (<code>list[Dict]</code>, <em>optional</em>) \u2014 Optional, only returned when auxilary losses are activated (i.e. <code>config.auxiliary_loss</code> is set to <code>True</code>)
and labels are provided. It is a list of dictionaries containing the two above keys (<code>logits</code> and
<code>pred_boxes</code>) for each decoder layer.</li>
<li><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the decoder of the model.</li>
<li><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of the decoder at the output of each
layer plus the initial embedding outputs.</li>
<li><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights of the decoder, after the attention softmax, used to compute the
weighted average in the self-attention heads.</li>
<li><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax,
used to compute the weighted average in the cross-attention heads.</li>
<li><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</li>
<li><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of the encoder at the output of each
layer plus the initial embedding outputs.</li>
<li><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights of the encoder, after the attention softmax, used to compute the
weighted average in the self-attention heads.</li>
</ul>
`,returnType:`
<p><code>transformers.models.table_transformer.modeling_table_transformer.TableTransformerObjectDetectionOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),re=new Ta({props:{$$slots:{default:[Fa]},$$scope:{ctx:F}}}),ae=new Fr({props:{anchor:"transformers.TableTransformerForObjectDetection.forward.example",$$slots:{default:[Ca]},$$scope:{ctx:F}}}),{c(){c=r("meta"),T=m(),_=r("h1"),p=r("a"),b=r("span"),v(l.$$.fragment),g=m(),z=r("span"),Bt=n("Table Transformer"),vt=m(),N=r("h2"),J=r("a"),ot=r("span"),v(le.$$.fragment),Gt=m(),rt=r("span"),Vt=n("Overview"),wt=m(),P=r("p"),Jt=n("The Table Transformer model was proposed in "),de=r("a"),Xt=n("PubTables-1M: Towards comprehensive table extraction from unstructured documents"),Yt=n(` by
Brandon Smock, Rohith Pesala, Robin Abraham. The authors introduce a new dataset, PubTables-1M, to benchmark progress in table extraction from unstructured documents,
as well as table structure recognition and functional analysis. The authors train 2 `),Pe=r("a"),Kt=n("DETR"),Qt=n(" models, one for table detection and one for table structure recognition, dubbed Table Transformers."),xt=m(),De=r("p"),Zt=n("The abstract from the paper is the following:"),yt=m(),Ae=r("p"),at=r("em"),eo=n(`Recently, significant progress has been made applying machine learning to the problem of table structure inference and extraction from unstructured documents.
However, one of the greatest challenges remains the creation of datasets with complete, unambiguous ground truth at scale. To address this, we develop a new, more
comprehensive dataset for table extraction, called PubTables-1M. PubTables-1M contains nearly one million tables from scientific articles, supports multiple input
modalities, and contains detailed header and location information for table structures, making it useful for a wide variety of modeling approaches. It also addresses a significant
source of ground truth inconsistency observed in prior datasets called oversegmentation, using a novel canonicalization procedure. We demonstrate that these improvements lead to a
significant increase in training performance and a more reliable estimate of model performance at evaluation for table structure recognition. Further, we show that transformer-based
object detection models trained on PubTables-1M produce excellent results for all three tasks of detection, structure recognition, and functional analysis without the need for any
special customization for these tasks.`),$t=m(),Oe=r("p"),to=n("Tips:"),jt=m(),D=r("ul"),L=r("li"),oo=n("The authors released 2 models, one for "),ce=r("a"),ro=n("table detection"),ao=n(" in documents, one for "),fe=r("a"),no=n("table structure recognition"),so=n(" (the task of recognizing the individual rows, columns etc. in a table)."),io=m(),S=r("li"),lo=n("One can use the "),Ie=r("a"),co=n("AutoFeatureExtractor"),fo=n(" API to prepare images and optional targets for the model. This will load a "),Ne=r("a"),mo=n("DetrFeatureExtractor"),ho=n(" behind the scenes."),po=m(),me=r("li"),uo=n("A demo notebook for the Table Transformer can be found [here]("),he=r("a"),go=n("https://github.com/NielsRogge/Transformers-Tutorials/tree/master/Table"),_o=n(" Transformer)."),kt=m(),X=r("img"),Et=m(),Y=r("small"),bo=n("Table detection and table structure recognition clarified. Taken from the "),Le=r("a"),To=n("original paper"),vo=n("."),qt=m(),A=r("p"),wo=n("This model was contributed by "),pe=r("a"),xo=n("nielsr"),yo=n(`. The original code can be
found `),ue=r("a"),$o=n("here"),jo=n("."),Ft=m(),R=r("h2"),K=r("a"),nt=r("span"),v(ge.$$.fragment),ko=m(),st=r("span"),Eo=n("TableTransformerConfig"),Ct=m(),q=r("div"),v(_e.$$.fragment),qo=m(),H=r("p"),Fo=n("This is the configuration class to store the configuration of a "),Se=r("a"),Co=n("TableTransformerModel"),Mo=n(`. It is used to
instantiate a Table Transformer model according to the specified arguments, defining the model architecture.
Instantiating a configuration with the defaults will yield a similar configuration to that of the Table Transformer
`),be=r("a"),zo=n("microsoft/table-transformer-table-detection"),Po=n(`
architecture.`),Do=m(),W=r("p"),Ao=n("Configuration objects inherit from "),Re=r("a"),Oo=n("PretrainedConfig"),Io=n(` and can be used to control the model outputs. Read the
documentation from `),He=r("a"),No=n("PretrainedConfig"),Lo=n(" for more information."),So=m(),v(Q.$$.fragment),Mt=m(),U=r("h2"),Z=r("a"),it=r("span"),v(Te.$$.fragment),Ro=m(),lt=r("span"),Ho=n("TableTransformerModel"),zt=m(),k=r("div"),v(ve.$$.fragment),Wo=m(),dt=r("p"),Uo=n(`The bare Table Transformer Model (consisting of a backbone and encoder-decoder Transformer) outputting raw
hidden-states without any specific head on top.`),Bo=m(),we=r("p"),Go=n("This model inherits from "),We=r("a"),Vo=n("PreTrainedModel"),Jo=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Xo=m(),xe=r("p"),Yo=n("This model is also a PyTorch "),ye=r("a"),Ko=n("torch.nn.Module"),Qo=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Zo=m(),C=r("div"),v($e.$$.fragment),er=m(),B=r("p"),tr=n("The "),Ue=r("a"),or=n("TableTransformerModel"),rr=n(" forward method, overrides the "),ct=r("code"),ar=n("__call__"),nr=n(" special method."),sr=m(),v(ee.$$.fragment),ir=m(),v(te.$$.fragment),Pt=m(),G=r("h2"),oe=r("a"),ft=r("span"),v(je.$$.fragment),lr=m(),mt=r("span"),dr=n("TableTransformerForObjectDetection"),Dt=m(),E=r("div"),v(ke.$$.fragment),cr=m(),ht=r("p"),fr=n(`Table Transformer Model (consisting of a backbone and encoder-decoder Transformer) with object detection heads on
top, for tasks such as COCO detection.`),mr=m(),Ee=r("p"),hr=n("This model inherits from "),Be=r("a"),pr=n("PreTrainedModel"),ur=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),gr=m(),qe=r("p"),_r=n("This model is also a PyTorch "),Fe=r("a"),br=n("torch.nn.Module"),Tr=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),vr=m(),M=r("div"),v(Ce.$$.fragment),wr=m(),V=r("p"),xr=n("The "),Ge=r("a"),yr=n("TableTransformerForObjectDetection"),$r=n(" forward method, overrides the "),pt=r("code"),jr=n("__call__"),kr=n(" special method."),Er=m(),v(re.$$.fragment),qr=m(),v(ae.$$.fragment),this.h()},l(t){const f=ya('[data-svelte="svelte-1phssyn"]',document.head);c=a(f,"META",{name:!0,content:!0}),f.forEach(o),T=h(t),_=a(t,"H1",{class:!0});var Me=i(_);p=a(Me,"A",{id:!0,class:!0,href:!0});var ut=i(p);b=a(ut,"SPAN",{});var gt=i(b);w(l.$$.fragment,gt),gt.forEach(o),ut.forEach(o),g=h(Me),z=a(Me,"SPAN",{});var _t=i(z);Bt=s(_t,"Table Transformer"),_t.forEach(o),Me.forEach(o),vt=h(t),N=a(t,"H2",{class:!0});var ze=i(N);J=a(ze,"A",{id:!0,class:!0,href:!0});var Pr=i(J);ot=a(Pr,"SPAN",{});var Dr=i(ot);w(le.$$.fragment,Dr),Dr.forEach(o),Pr.forEach(o),Gt=h(ze),rt=a(ze,"SPAN",{});var Ar=i(rt);Vt=s(Ar,"Overview"),Ar.forEach(o),ze.forEach(o),wt=h(t),P=a(t,"P",{});var Ve=i(P);Jt=s(Ve,"The Table Transformer model was proposed in "),de=a(Ve,"A",{href:!0,rel:!0});var Or=i(de);Xt=s(Or,"PubTables-1M: Towards comprehensive table extraction from unstructured documents"),Or.forEach(o),Yt=s(Ve,` by
Brandon Smock, Rohith Pesala, Robin Abraham. The authors introduce a new dataset, PubTables-1M, to benchmark progress in table extraction from unstructured documents,
as well as table structure recognition and functional analysis. The authors train 2 `),Pe=a(Ve,"A",{href:!0});var Ir=i(Pe);Kt=s(Ir,"DETR"),Ir.forEach(o),Qt=s(Ve," models, one for table detection and one for table structure recognition, dubbed Table Transformers."),Ve.forEach(o),xt=h(t),De=a(t,"P",{});var Nr=i(De);Zt=s(Nr,"The abstract from the paper is the following:"),Nr.forEach(o),yt=h(t),Ae=a(t,"P",{});var Lr=i(Ae);at=a(Lr,"EM",{});var Sr=i(at);eo=s(Sr,`Recently, significant progress has been made applying machine learning to the problem of table structure inference and extraction from unstructured documents.
However, one of the greatest challenges remains the creation of datasets with complete, unambiguous ground truth at scale. To address this, we develop a new, more
comprehensive dataset for table extraction, called PubTables-1M. PubTables-1M contains nearly one million tables from scientific articles, supports multiple input
modalities, and contains detailed header and location information for table structures, making it useful for a wide variety of modeling approaches. It also addresses a significant
source of ground truth inconsistency observed in prior datasets called oversegmentation, using a novel canonicalization procedure. We demonstrate that these improvements lead to a
significant increase in training performance and a more reliable estimate of model performance at evaluation for table structure recognition. Further, we show that transformer-based
object detection models trained on PubTables-1M produce excellent results for all three tasks of detection, structure recognition, and functional analysis without the need for any
special customization for these tasks.`),Sr.forEach(o),Lr.forEach(o),$t=h(t),Oe=a(t,"P",{});var Rr=i(Oe);to=s(Rr,"Tips:"),Rr.forEach(o),jt=h(t),D=a(t,"UL",{});var Je=i(D);L=a(Je,"LI",{});var Xe=i(L);oo=s(Xe,"The authors released 2 models, one for "),ce=a(Xe,"A",{href:!0,rel:!0});var Hr=i(ce);ro=s(Hr,"table detection"),Hr.forEach(o),ao=s(Xe," in documents, one for "),fe=a(Xe,"A",{href:!0,rel:!0});var Wr=i(fe);no=s(Wr,"table structure recognition"),Wr.forEach(o),so=s(Xe," (the task of recognizing the individual rows, columns etc. in a table)."),Xe.forEach(o),io=h(Je),S=a(Je,"LI",{});var Ye=i(S);lo=s(Ye,"One can use the "),Ie=a(Ye,"A",{href:!0});var Ur=i(Ie);co=s(Ur,"AutoFeatureExtractor"),Ur.forEach(o),fo=s(Ye," API to prepare images and optional targets for the model. This will load a "),Ne=a(Ye,"A",{href:!0});var Br=i(Ne);mo=s(Br,"DetrFeatureExtractor"),Br.forEach(o),ho=s(Ye," behind the scenes."),Ye.forEach(o),po=h(Je),me=a(Je,"LI",{});var Ot=i(me);uo=s(Ot,"A demo notebook for the Table Transformer can be found [here]("),he=a(Ot,"A",{href:!0,rel:!0});var Gr=i(he);go=s(Gr,"https://github.com/NielsRogge/Transformers-Tutorials/tree/master/Table"),Gr.forEach(o),_o=s(Ot," Transformer)."),Ot.forEach(o),Je.forEach(o),kt=h(t),X=a(t,"IMG",{src:!0,alt:!0,width:!0}),Et=h(t),Y=a(t,"SMALL",{});var It=i(Y);bo=s(It,"Table detection and table structure recognition clarified. Taken from the "),Le=a(It,"A",{href:!0});var Vr=i(Le);To=s(Vr,"original paper"),Vr.forEach(o),vo=s(It,"."),It.forEach(o),qt=h(t),A=a(t,"P",{});var Ke=i(A);wo=s(Ke,"This model was contributed by "),pe=a(Ke,"A",{href:!0,rel:!0});var Jr=i(pe);xo=s(Jr,"nielsr"),Jr.forEach(o),yo=s(Ke,`. The original code can be
found `),ue=a(Ke,"A",{href:!0,rel:!0});var Xr=i(ue);$o=s(Xr,"here"),Xr.forEach(o),jo=s(Ke,"."),Ke.forEach(o),Ft=h(t),R=a(t,"H2",{class:!0});var Nt=i(R);K=a(Nt,"A",{id:!0,class:!0,href:!0});var Yr=i(K);nt=a(Yr,"SPAN",{});var Kr=i(nt);w(ge.$$.fragment,Kr),Kr.forEach(o),Yr.forEach(o),ko=h(Nt),st=a(Nt,"SPAN",{});var Qr=i(st);Eo=s(Qr,"TableTransformerConfig"),Qr.forEach(o),Nt.forEach(o),Ct=h(t),q=a(t,"DIV",{class:!0});var ne=i(q);w(_e.$$.fragment,ne),qo=h(ne),H=a(ne,"P",{});var Qe=i(H);Fo=s(Qe,"This is the configuration class to store the configuration of a "),Se=a(Qe,"A",{href:!0});var Zr=i(Se);Co=s(Zr,"TableTransformerModel"),Zr.forEach(o),Mo=s(Qe,`. It is used to
instantiate a Table Transformer model according to the specified arguments, defining the model architecture.
Instantiating a configuration with the defaults will yield a similar configuration to that of the Table Transformer
`),be=a(Qe,"A",{href:!0,rel:!0});var ea=i(be);zo=s(ea,"microsoft/table-transformer-table-detection"),ea.forEach(o),Po=s(Qe,`
architecture.`),Qe.forEach(o),Do=h(ne),W=a(ne,"P",{});var Ze=i(W);Ao=s(Ze,"Configuration objects inherit from "),Re=a(Ze,"A",{href:!0});var ta=i(Re);Oo=s(ta,"PretrainedConfig"),ta.forEach(o),Io=s(Ze,` and can be used to control the model outputs. Read the
documentation from `),He=a(Ze,"A",{href:!0});var oa=i(He);No=s(oa,"PretrainedConfig"),oa.forEach(o),Lo=s(Ze," for more information."),Ze.forEach(o),So=h(ne),w(Q.$$.fragment,ne),ne.forEach(o),Mt=h(t),U=a(t,"H2",{class:!0});var Lt=i(U);Z=a(Lt,"A",{id:!0,class:!0,href:!0});var ra=i(Z);it=a(ra,"SPAN",{});var aa=i(it);w(Te.$$.fragment,aa),aa.forEach(o),ra.forEach(o),Ro=h(Lt),lt=a(Lt,"SPAN",{});var na=i(lt);Ho=s(na,"TableTransformerModel"),na.forEach(o),Lt.forEach(o),zt=h(t),k=a(t,"DIV",{class:!0});var O=i(k);w(ve.$$.fragment,O),Wo=h(O),dt=a(O,"P",{});var sa=i(dt);Uo=s(sa,`The bare Table Transformer Model (consisting of a backbone and encoder-decoder Transformer) outputting raw
hidden-states without any specific head on top.`),sa.forEach(o),Bo=h(O),we=a(O,"P",{});var St=i(we);Go=s(St,"This model inherits from "),We=a(St,"A",{href:!0});var ia=i(We);Vo=s(ia,"PreTrainedModel"),ia.forEach(o),Jo=s(St,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),St.forEach(o),Xo=h(O),xe=a(O,"P",{});var Rt=i(xe);Yo=s(Rt,"This model is also a PyTorch "),ye=a(Rt,"A",{href:!0,rel:!0});var la=i(ye);Ko=s(la,"torch.nn.Module"),la.forEach(o),Qo=s(Rt,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Rt.forEach(o),Zo=h(O),C=a(O,"DIV",{class:!0});var se=i(C);w($e.$$.fragment,se),er=h(se),B=a(se,"P",{});var et=i(B);tr=s(et,"The "),Ue=a(et,"A",{href:!0});var da=i(Ue);or=s(da,"TableTransformerModel"),da.forEach(o),rr=s(et," forward method, overrides the "),ct=a(et,"CODE",{});var ca=i(ct);ar=s(ca,"__call__"),ca.forEach(o),nr=s(et," special method."),et.forEach(o),sr=h(se),w(ee.$$.fragment,se),ir=h(se),w(te.$$.fragment,se),se.forEach(o),O.forEach(o),Pt=h(t),G=a(t,"H2",{class:!0});var Ht=i(G);oe=a(Ht,"A",{id:!0,class:!0,href:!0});var fa=i(oe);ft=a(fa,"SPAN",{});var ma=i(ft);w(je.$$.fragment,ma),ma.forEach(o),fa.forEach(o),lr=h(Ht),mt=a(Ht,"SPAN",{});var ha=i(mt);dr=s(ha,"TableTransformerForObjectDetection"),ha.forEach(o),Ht.forEach(o),Dt=h(t),E=a(t,"DIV",{class:!0});var I=i(E);w(ke.$$.fragment,I),cr=h(I),ht=a(I,"P",{});var pa=i(ht);fr=s(pa,`Table Transformer Model (consisting of a backbone and encoder-decoder Transformer) with object detection heads on
top, for tasks such as COCO detection.`),pa.forEach(o),mr=h(I),Ee=a(I,"P",{});var Wt=i(Ee);hr=s(Wt,"This model inherits from "),Be=a(Wt,"A",{href:!0});var ua=i(Be);pr=s(ua,"PreTrainedModel"),ua.forEach(o),ur=s(Wt,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Wt.forEach(o),gr=h(I),qe=a(I,"P",{});var Ut=i(qe);_r=s(Ut,"This model is also a PyTorch "),Fe=a(Ut,"A",{href:!0,rel:!0});var ga=i(Fe);br=s(ga,"torch.nn.Module"),ga.forEach(o),Tr=s(Ut,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ut.forEach(o),vr=h(I),M=a(I,"DIV",{class:!0});var ie=i(M);w(Ce.$$.fragment,ie),wr=h(ie),V=a(ie,"P",{});var tt=i(V);xr=s(tt,"The "),Ge=a(tt,"A",{href:!0});var _a=i(Ge);yr=s(_a,"TableTransformerForObjectDetection"),_a.forEach(o),$r=s(tt," forward method, overrides the "),pt=a(tt,"CODE",{});var ba=i(pt);jr=s(ba,"__call__"),ba.forEach(o),kr=s(tt," special method."),tt.forEach(o),Er=h(ie),w(re.$$.fragment,ie),qr=h(ie),w(ae.$$.fragment,ie),ie.forEach(o),I.forEach(o),this.h()},h(){d(c,"name","hf:doc:metadata"),d(c,"content",JSON.stringify(za)),d(p,"id","table-transformer"),d(p,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(p,"href","#table-transformer"),d(_,"class","relative group"),d(J,"id","overview"),d(J,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(J,"href","#overview"),d(N,"class","relative group"),d(de,"href","https://arxiv.org/abs/2110.00061"),d(de,"rel","nofollow"),d(Pe,"href","detr"),d(ce,"href","https://huggingface.co/microsoft/table-transformer-detection"),d(ce,"rel","nofollow"),d(fe,"href","https://huggingface.co/microsoft/table-transformer-structure-recognition"),d(fe,"rel","nofollow"),d(Ie,"href","/docs/transformers/pr_19907/en/model_doc/auto#transformers.AutoFeatureExtractor"),d(Ne,"href","/docs/transformers/pr_19907/en/model_doc/detr#transformers.DetrFeatureExtractor"),d(he,"href","https://github.com/NielsRogge/Transformers-Tutorials/tree/master/Table"),d(he,"rel","nofollow"),$a(X.src,zr="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/table_transformer_architecture.jpeg")||d(X,"src",zr),d(X,"alt","drawing"),d(X,"width","600"),d(Le,"href","https://arxiv.org/abs/2110.00061"),d(pe,"href","https://huggingface.co/nielsr"),d(pe,"rel","nofollow"),d(ue,"href","https://github.com/microsoft/table-transformer"),d(ue,"rel","nofollow"),d(K,"id","transformers.TableTransformerConfig"),d(K,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(K,"href","#transformers.TableTransformerConfig"),d(R,"class","relative group"),d(Se,"href","/docs/transformers/pr_19907/en/model_doc/table-transformer#transformers.TableTransformerModel"),d(be,"href","https://huggingface.co/microsoft/table-transformer-table-detection"),d(be,"rel","nofollow"),d(Re,"href","/docs/transformers/pr_19907/en/main_classes/configuration#transformers.PretrainedConfig"),d(He,"href","/docs/transformers/pr_19907/en/main_classes/configuration#transformers.PretrainedConfig"),d(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Z,"id","transformers.TableTransformerModel"),d(Z,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Z,"href","#transformers.TableTransformerModel"),d(U,"class","relative group"),d(We,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel"),d(ye,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(ye,"rel","nofollow"),d(Ue,"href","/docs/transformers/pr_19907/en/model_doc/table-transformer#transformers.TableTransformerModel"),d(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(oe,"id","transformers.TableTransformerForObjectDetection"),d(oe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(oe,"href","#transformers.TableTransformerForObjectDetection"),d(G,"class","relative group"),d(Be,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel"),d(Fe,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Fe,"rel","nofollow"),d(Ge,"href","/docs/transformers/pr_19907/en/model_doc/table-transformer#transformers.TableTransformerForObjectDetection"),d(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,f){e(document.head,c),u(t,T,f),u(t,_,f),e(_,p),e(p,b),x(l,b,null),e(_,g),e(_,z),e(z,Bt),u(t,vt,f),u(t,N,f),e(N,J),e(J,ot),x(le,ot,null),e(N,Gt),e(N,rt),e(rt,Vt),u(t,wt,f),u(t,P,f),e(P,Jt),e(P,de),e(de,Xt),e(P,Yt),e(P,Pe),e(Pe,Kt),e(P,Qt),u(t,xt,f),u(t,De,f),e(De,Zt),u(t,yt,f),u(t,Ae,f),e(Ae,at),e(at,eo),u(t,$t,f),u(t,Oe,f),e(Oe,to),u(t,jt,f),u(t,D,f),e(D,L),e(L,oo),e(L,ce),e(ce,ro),e(L,ao),e(L,fe),e(fe,no),e(L,so),e(D,io),e(D,S),e(S,lo),e(S,Ie),e(Ie,co),e(S,fo),e(S,Ne),e(Ne,mo),e(S,ho),e(D,po),e(D,me),e(me,uo),e(me,he),e(he,go),e(me,_o),u(t,kt,f),u(t,X,f),u(t,Et,f),u(t,Y,f),e(Y,bo),e(Y,Le),e(Le,To),e(Y,vo),u(t,qt,f),u(t,A,f),e(A,wo),e(A,pe),e(pe,xo),e(A,yo),e(A,ue),e(ue,$o),e(A,jo),u(t,Ft,f),u(t,R,f),e(R,K),e(K,nt),x(ge,nt,null),e(R,ko),e(R,st),e(st,Eo),u(t,Ct,f),u(t,q,f),x(_e,q,null),e(q,qo),e(q,H),e(H,Fo),e(H,Se),e(Se,Co),e(H,Mo),e(H,be),e(be,zo),e(H,Po),e(q,Do),e(q,W),e(W,Ao),e(W,Re),e(Re,Oo),e(W,Io),e(W,He),e(He,No),e(W,Lo),e(q,So),x(Q,q,null),u(t,Mt,f),u(t,U,f),e(U,Z),e(Z,it),x(Te,it,null),e(U,Ro),e(U,lt),e(lt,Ho),u(t,zt,f),u(t,k,f),x(ve,k,null),e(k,Wo),e(k,dt),e(dt,Uo),e(k,Bo),e(k,we),e(we,Go),e(we,We),e(We,Vo),e(we,Jo),e(k,Xo),e(k,xe),e(xe,Yo),e(xe,ye),e(ye,Ko),e(xe,Qo),e(k,Zo),e(k,C),x($e,C,null),e(C,er),e(C,B),e(B,tr),e(B,Ue),e(Ue,or),e(B,rr),e(B,ct),e(ct,ar),e(B,nr),e(C,sr),x(ee,C,null),e(C,ir),x(te,C,null),u(t,Pt,f),u(t,G,f),e(G,oe),e(oe,ft),x(je,ft,null),e(G,lr),e(G,mt),e(mt,dr),u(t,Dt,f),u(t,E,f),x(ke,E,null),e(E,cr),e(E,ht),e(ht,fr),e(E,mr),e(E,Ee),e(Ee,hr),e(Ee,Be),e(Be,pr),e(Ee,ur),e(E,gr),e(E,qe),e(qe,_r),e(qe,Fe),e(Fe,br),e(qe,Tr),e(E,vr),e(E,M),x(Ce,M,null),e(M,wr),e(M,V),e(V,xr),e(V,Ge),e(Ge,yr),e(V,$r),e(V,pt),e(pt,jr),e(V,kr),e(M,Er),x(re,M,null),e(M,qr),x(ae,M,null),At=!0},p(t,[f]){const Me={};f&2&&(Me.$$scope={dirty:f,ctx:t}),Q.$set(Me);const ut={};f&2&&(ut.$$scope={dirty:f,ctx:t}),ee.$set(ut);const gt={};f&2&&(gt.$$scope={dirty:f,ctx:t}),te.$set(gt);const _t={};f&2&&(_t.$$scope={dirty:f,ctx:t}),re.$set(_t);const ze={};f&2&&(ze.$$scope={dirty:f,ctx:t}),ae.$set(ze)},i(t){At||(y(l.$$.fragment,t),y(le.$$.fragment,t),y(ge.$$.fragment,t),y(_e.$$.fragment,t),y(Q.$$.fragment,t),y(Te.$$.fragment,t),y(ve.$$.fragment,t),y($e.$$.fragment,t),y(ee.$$.fragment,t),y(te.$$.fragment,t),y(je.$$.fragment,t),y(ke.$$.fragment,t),y(Ce.$$.fragment,t),y(re.$$.fragment,t),y(ae.$$.fragment,t),At=!0)},o(t){$(l.$$.fragment,t),$(le.$$.fragment,t),$(ge.$$.fragment,t),$(_e.$$.fragment,t),$(Q.$$.fragment,t),$(Te.$$.fragment,t),$(ve.$$.fragment,t),$($e.$$.fragment,t),$(ee.$$.fragment,t),$(te.$$.fragment,t),$(je.$$.fragment,t),$(ke.$$.fragment,t),$(Ce.$$.fragment,t),$(re.$$.fragment,t),$(ae.$$.fragment,t),At=!1},d(t){o(c),t&&o(T),t&&o(_),j(l),t&&o(vt),t&&o(N),j(le),t&&o(wt),t&&o(P),t&&o(xt),t&&o(De),t&&o(yt),t&&o(Ae),t&&o($t),t&&o(Oe),t&&o(jt),t&&o(D),t&&o(kt),t&&o(X),t&&o(Et),t&&o(Y),t&&o(qt),t&&o(A),t&&o(Ft),t&&o(R),j(ge),t&&o(Ct),t&&o(q),j(_e),j(Q),t&&o(Mt),t&&o(U),j(Te),t&&o(zt),t&&o(k),j(ve),j($e),j(ee),j(te),t&&o(Pt),t&&o(G),j(je),t&&o(Dt),t&&o(E),j(ke),j(Ce),j(re),j(ae)}}}const za={local:"table-transformer",sections:[{local:"overview",title:"Overview"},{local:"transformers.TableTransformerConfig",title:"TableTransformerConfig"},{local:"transformers.TableTransformerModel",title:"TableTransformerModel"},{local:"transformers.TableTransformerForObjectDetection",title:"TableTransformerForObjectDetection"}],title:"Table Transformer"};function Pa(F){return ja(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Sa extends va{constructor(c){super();wa(this,c,Pa,Ma,xa,{})}}export{Sa as default,za as metadata};
