import{s as ft,o as ut,n as Se}from"../chunks/scheduler.9bc65507.js";import{S as gt,i as _t,g as a,s as d,u as y,A as vt,h as s,f as t,c,j as u,v as $,y as g,k as h,o as l,a as i,w as M,d as T,t as C,x as V}from"../chunks/index.78c82d43.js";import{T as bt}from"../chunks/Tip.87d55b76.js";import{D as Ge}from"../chunks/Docstring.f3d04bd2.js";import{C as ht}from"../chunks/CodeBlock.48618ec2.js";import{I as ze}from"../chunks/IconCopyLink.bedaa44d.js";import{E as pt}from"../chunks/ExampleCodeBlock.872b014d.js";function wt(z){let r,_="Example:",p,m,f;return m=new ht({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFZpdERldENvbmZpZyUyQyUyMFZpdERldE1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMFZpdERldCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwVml0RGV0Q29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwbW9kZWwlMjAod2l0aCUyMHJhbmRvbSUyMHdlaWdodHMpJTIwZnJvbSUyMHRoZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMFZpdERldE1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> VitDetConfig, VitDetModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a VitDet configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = VitDetConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = VitDetModel(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(){r=a("p"),r.textContent=_,p=d(),y(m.$$.fragment)},l(o){r=s(o,"P",{"data-svelte-h":!0}),g(r)!=="svelte-11lpom8"&&(r.textContent=_),p=c(o),$(m.$$.fragment,o)},m(o,v){i(o,r,v),i(o,p,v),M(m,o,v),f=!0},p:Se,i(o){f||(T(m.$$.fragment,o),f=!0)},o(o){C(m.$$.fragment,o),f=!1},d(o){o&&(t(r),t(p)),V(m,o)}}}function yt(z){let r,_=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){r=a("p"),r.innerHTML=_},l(p){r=s(p,"P",{"data-svelte-h":!0}),g(r)!=="svelte-fincs2"&&(r.innerHTML=_)},m(p,m){i(p,r,m)},p:Se,d(p){p&&t(r)}}}function $t(z){let r,_="Examples:",p,m,f;return m=new ht({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFZpdERldENvbmZpZyUyQyUyMFZpdERldE1vZGVsJTBBaW1wb3J0JTIwdG9yY2glMEElMEFjb25maWclMjAlM0QlMjBWaXREZXRDb25maWcoKSUwQW1vZGVsJTIwJTNEJTIwVml0RGV0TW9kZWwoY29uZmlnKSUwQSUwQXBpeGVsX3ZhbHVlcyUyMCUzRCUyMHRvcmNoLnJhbmRuKDElMkMlMjAzJTJDJTIwMjI0JTJDJTIwMjI0KSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwocGl4ZWxfdmFsdWVzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGUlMEFsaXN0KGxhc3RfaGlkZGVuX3N0YXRlcy5zaGFwZSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> VitDetConfig, VitDetModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>config = VitDetConfig()
<span class="hljs-meta">&gt;&gt;&gt; </span>model = VitDetModel(config)

<span class="hljs-meta">&gt;&gt;&gt; </span>pixel_values = torch.randn(<span class="hljs-number">1</span>, <span class="hljs-number">3</span>, <span class="hljs-number">224</span>, <span class="hljs-number">224</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(pixel_values)

<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">768</span>, <span class="hljs-number">14</span>, <span class="hljs-number">14</span>]`}}),{c(){r=a("p"),r.textContent=_,p=d(),y(m.$$.fragment)},l(o){r=s(o,"P",{"data-svelte-h":!0}),g(r)!=="svelte-kvfsh7"&&(r.textContent=_),p=c(o),$(m.$$.fragment,o)},m(o,v){i(o,r,v),i(o,p,v),M(m,o,v),f=!0},p:Se,i(o){f||(T(m.$$.fragment,o),f=!0)},o(o){C(m.$$.fragment,o),f=!1},d(o){o&&(t(r),t(p)),V(m,o)}}}function Mt(z){let r,_,p,m,f,o,v,H,Ee,ee,Ae="ViTDet",ue,D,E,de,N,Ze,te,qe="Overview",ge,F,Be=`The ViTDet model was proposed in <a href="https://arxiv.org/abs/2203.16527" rel="nofollow">Exploring Plain Vision Transformer Backbones for Object Detection</a> by Yanghao Li, Hanzi Mao, Ross Girshick, Kaiming He.
VitDet leverages the plain <a href="vit">Vision Transformer</a> for the task of object detection.`,_e,L,Xe="The abstract from the paper is the following:",ve,G,Oe="<em>We explore the plain, non-hierarchical Vision Transformer (ViT) as a backbone network for object detection. This design enables the original ViT architecture to be fine-tuned for object detection without needing to redesign a hierarchical backbone for pre-training. With minimal adaptations for fine-tuning, our plain-backbone detector can achieve competitive results. Surprisingly, we observe: (i) it is sufficient to build a simple feature pyramid from a single-scale feature map (without the common FPN design) and (ii) it is sufficient to use window attention (without shifting) aided with very few cross-window propagation blocks. With plain ViT backbones pre-trained as Masked Autoencoders (MAE), our detector, named ViTDet, can compete with the previous leading methods that were all based on hierarchical backbones, reaching up to 61.3 AP_box on the COCO dataset using only ImageNet-1K pre-training. We hope our study will draw attention to research on plain-backbone detectors.</em>",be,S,Qe="Tips:",we,A,Ye="<li>For the moment, only the backbone is available.</li>",ye,q,Ke=`This model was contributed by <a href="https://huggingface.co/nielsr" rel="nofollow">nielsr</a>.
The original code can be found <a href="https://github.com/facebookresearch/detectron2/tree/main/projects/ViTDet" rel="nofollow">here</a>.`,$e,k,Z,ce,B,Pe,oe,et="VitDetConfig",Me,b,X,We,ne,tt=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.33.3/en/model_doc/vitdet#transformers.VitDetModel">VitDetModel</a>. It is used to instantiate an
VitDet 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 VitDet
<a href="https://huggingface.co/google/vitdet-base-patch16-224" rel="nofollow">google/vitdet-base-patch16-224</a> architecture.`,Ie,ae,ot=`Configuration objects inherit from <a href="/docs/transformers/v4.33.3/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/v4.33.3/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Je,P,Te,j,W,me,O,Ue,se,nt="VitDetModel",Ce,x,Q,Re,re,at=`The bare VitDet Transformer model outputting raw hidden-states without any specific head on top.
This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,He,w,Y,Ne,ie,st='The <a href="/docs/transformers/v4.33.3/en/model_doc/vitdet#transformers.VitDetModel">VitDetModel</a> forward method, overrides the <code>__call__</code> special method.',Fe,I,Le,J,Ve,pe,xe;return H=new ze({}),N=new ze({}),B=new ze({}),X=new Ge({props:{name:"class transformers.VitDetConfig",anchor:"transformers.VitDetConfig",parameters:[{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"mlp_ratio",val:" = 4"},{name:"hidden_act",val:" = 'gelu'"},{name:"dropout_prob",val:" = 0.0"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-06"},{name:"image_size",val:" = 224"},{name:"pretrain_image_size",val:" = 224"},{name:"patch_size",val:" = 16"},{name:"num_channels",val:" = 3"},{name:"qkv_bias",val:" = True"},{name:"drop_path_rate",val:" = 0.0"},{name:"window_block_indices",val:" = []"},{name:"residual_block_indices",val:" = []"},{name:"use_absolute_position_embeddings",val:" = True"},{name:"use_relative_position_embeddings",val:" = False"},{name:"window_size",val:" = 0"},{name:"out_features",val:" = None"},{name:"out_indices",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.VitDetConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.VitDetConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.VitDetConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.VitDetConfig.mlp_ratio",description:`<strong>mlp_ratio</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Ratio of mlp hidden dim to embedding dim.`,name:"mlp_ratio"},{anchor:"transformers.VitDetConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&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;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.VitDetConfig.dropout_prob",description:`<strong>dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"dropout_prob"},{anchor:"transformers.VitDetConfig.initializer_range",description:`<strong>initializer_range</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:"initializer_range"},{anchor:"transformers.VitDetConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-6) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.VitDetConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 224) &#x2014;
The size (resolution) of each image.`,name:"image_size"},{anchor:"transformers.VitDetConfig.pretrain_image_size",description:`<strong>pretrain_image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 224) &#x2014;
The size (resolution) of each image during pretraining.`,name:"pretrain_image_size"},{anchor:"transformers.VitDetConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
The size (resolution) of each patch.`,name:"patch_size"},{anchor:"transformers.VitDetConfig.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.VitDetConfig.qkv_bias",description:`<strong>qkv_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to add a bias to the queries, keys and values.`,name:"qkv_bias"},{anchor:"transformers.VitDetConfig.drop_path_rate",description:`<strong>drop_path_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Stochastic depth rate.`,name:"drop_path_rate"},{anchor:"transformers.VitDetConfig.window_block_indices",description:`<strong>window_block_indices</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
List of indices of blocks that should have window attention instead of regular global self-attention.`,name:"window_block_indices"},{anchor:"transformers.VitDetConfig.residual_block_indices",description:`<strong>residual_block_indices</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
List of indices of blocks that should have an extra residual block after the MLP.`,name:"residual_block_indices"},{anchor:"transformers.VitDetConfig.use_absolute_position_embeddings",description:`<strong>use_absolute_position_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to add absolute position embeddings to the patch embeddings.`,name:"use_absolute_position_embeddings"},{anchor:"transformers.VitDetConfig.use_relative_position_embeddings",description:`<strong>use_relative_position_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to add relative position embeddings to the attention maps.`,name:"use_relative_position_embeddings"},{anchor:"transformers.VitDetConfig.window_size",description:`<strong>window_size</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The size of the attention window.`,name:"window_size"},{anchor:"transformers.VitDetConfig.out_features",description:`<strong>out_features</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
If used as backbone, list of features to output. Can be any of <code>&quot;stem&quot;</code>, <code>&quot;stage1&quot;</code>, <code>&quot;stage2&quot;</code>, etc.
(depending on how many stages the model has). If unset and <code>out_indices</code> is set, will default to the
corresponding stages. If unset and <code>out_indices</code> is unset, will default to the last stage.`,name:"out_features"},{anchor:"transformers.VitDetConfig.out_indices",description:`<strong>out_indices</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
If used as backbone, list of indices of features to output. Can be any of 0, 1, 2, etc. (depending on how
many stages the model has). If unset and <code>out_features</code> is set, will default to the corresponding stages.
If unset and <code>out_features</code> is unset, will default to the last stage.`,name:"out_indices"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/vitdet/configuration_vitdet.py#L30"}}),P=new pt({props:{anchor:"transformers.VitDetConfig.example",$$slots:{default:[wt]},$$scope:{ctx:z}}}),O=new ze({}),Q=new Ge({props:{name:"class transformers.VitDetModel",anchor:"transformers.VitDetModel",parameters:[{name:"config",val:": VitDetConfig"}],parametersDescription:[{anchor:"transformers.VitDetModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/vitdet#transformers.VitDetConfig">VitDetConfig</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/v4.33.3/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/v4.33.3/src/transformers/models/vitdet/modeling_vitdet.py#L712"}}),Y=new Ge({props:{name:"forward",anchor:"transformers.VitDetModel.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.VitDetModel.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. Pixel values can be obtained using <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.33.3/en/model_doc/mobilevit#transformers.MobileViTFeatureExtractor.__call__">ViTImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.VitDetModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.VitDetModel.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.VitDetModel.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.VitDetModel.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/v4.33.3/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/vitdet/modeling_vitdet.py#L734",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.3/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> 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/v4.33.3/en/model_doc/vitdet#transformers.VitDetConfig"
>VitDetConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>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>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>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>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.33.3/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),I=new bt({props:{$$slots:{default:[yt]},$$scope:{ctx:z}}}),J=new pt({props:{anchor:"transformers.VitDetModel.forward.example",$$slots:{default:[$t]},$$scope:{ctx:z}}}),{c(){r=a("meta"),_=d(),p=a("p"),m=d(),f=a("h1"),o=a("a"),v=a("span"),y(H.$$.fragment),Ee=d(),ee=a("span"),ee.textContent=Ae,ue=d(),D=a("h2"),E=a("a"),de=a("span"),y(N.$$.fragment),Ze=d(),te=a("span"),te.textContent=qe,ge=d(),F=a("p"),F.innerHTML=Be,_e=d(),L=a("p"),L.textContent=Xe,ve=d(),G=a("p"),G.innerHTML=Oe,be=d(),S=a("p"),S.textContent=Qe,we=d(),A=a("ul"),A.innerHTML=Ye,ye=d(),q=a("p"),q.innerHTML=Ke,$e=d(),k=a("h2"),Z=a("a"),ce=a("span"),y(B.$$.fragment),Pe=d(),oe=a("span"),oe.textContent=et,Me=d(),b=a("div"),y(X.$$.fragment),We=d(),ne=a("p"),ne.innerHTML=tt,Ie=d(),ae=a("p"),ae.innerHTML=ot,Je=d(),y(P.$$.fragment),Te=d(),j=a("h2"),W=a("a"),me=a("span"),y(O.$$.fragment),Ue=d(),se=a("span"),se.textContent=nt,Ce=d(),x=a("div"),y(Q.$$.fragment),Re=d(),re=a("p"),re.innerHTML=at,He=d(),w=a("div"),y(Y.$$.fragment),Ne=d(),ie=a("p"),ie.innerHTML=st,Fe=d(),y(I.$$.fragment),Le=d(),y(J.$$.fragment),Ve=d(),pe=a("p"),this.h()},l(e){const n=vt("svelte-1phssyn",document.head);r=s(n,"META",{name:!0,content:!0}),n.forEach(t),_=c(e),p=s(e,"P",{}),u(p).forEach(t),m=c(e),f=s(e,"H1",{class:!0});var K=u(f);o=s(K,"A",{id:!0,class:!0,href:!0});var he=u(o);v=s(he,"SPAN",{});var fe=u(v);$(H.$$.fragment,fe),fe.forEach(t),he.forEach(t),Ee=c(K),ee=s(K,"SPAN",{"data-svelte-h":!0}),g(ee)!=="svelte-130po1t"&&(ee.textContent=Ae),K.forEach(t),ue=c(e),D=s(e,"H2",{class:!0});var De=u(D);E=s(De,"A",{id:!0,class:!0,href:!0});var rt=u(E);de=s(rt,"SPAN",{});var it=u(de);$(N.$$.fragment,it),it.forEach(t),rt.forEach(t),Ze=c(De),te=s(De,"SPAN",{"data-svelte-h":!0}),g(te)!=="svelte-1jsw1pg"&&(te.textContent=qe),De.forEach(t),ge=c(e),F=s(e,"P",{"data-svelte-h":!0}),g(F)!=="svelte-brze68"&&(F.innerHTML=Be),_e=c(e),L=s(e,"P",{"data-svelte-h":!0}),g(L)!=="svelte-vfdo9a"&&(L.textContent=Xe),ve=c(e),G=s(e,"P",{"data-svelte-h":!0}),g(G)!=="svelte-dasg8s"&&(G.innerHTML=Oe),be=c(e),S=s(e,"P",{"data-svelte-h":!0}),g(S)!=="svelte-axv494"&&(S.textContent=Qe),we=c(e),A=s(e,"UL",{"data-svelte-h":!0}),g(A)!=="svelte-3gbtxg"&&(A.innerHTML=Ye),ye=c(e),q=s(e,"P",{"data-svelte-h":!0}),g(q)!=="svelte-14aeur3"&&(q.innerHTML=Ke),$e=c(e),k=s(e,"H2",{class:!0});var ke=u(k);Z=s(ke,"A",{id:!0,class:!0,href:!0});var lt=u(Z);ce=s(lt,"SPAN",{});var dt=u(ce);$(B.$$.fragment,dt),dt.forEach(t),lt.forEach(t),Pe=c(ke),oe=s(ke,"SPAN",{"data-svelte-h":!0}),g(oe)!=="svelte-18xlncz"&&(oe.textContent=et),ke.forEach(t),Me=c(e),b=s(e,"DIV",{class:!0});var U=u(b);$(X.$$.fragment,U),We=c(U),ne=s(U,"P",{"data-svelte-h":!0}),g(ne)!=="svelte-6cpqsj"&&(ne.innerHTML=tt),Ie=c(U),ae=s(U,"P",{"data-svelte-h":!0}),g(ae)!=="svelte-cfh5wl"&&(ae.innerHTML=ot),Je=c(U),$(P.$$.fragment,U),U.forEach(t),Te=c(e),j=s(e,"H2",{class:!0});var je=u(j);W=s(je,"A",{id:!0,class:!0,href:!0});var ct=u(W);me=s(ct,"SPAN",{});var mt=u(me);$(O.$$.fragment,mt),mt.forEach(t),ct.forEach(t),Ue=c(je),se=s(je,"SPAN",{"data-svelte-h":!0}),g(se)!=="svelte-1pxn4ne"&&(se.textContent=nt),je.forEach(t),Ce=c(e),x=s(e,"DIV",{class:!0});var le=u(x);$(Q.$$.fragment,le),Re=c(le),re=s(le,"P",{"data-svelte-h":!0}),g(re)!=="svelte-1cui7vp"&&(re.innerHTML=at),He=c(le),w=s(le,"DIV",{class:!0});var R=u(w);$(Y.$$.fragment,R),Ne=c(R),ie=s(R,"P",{"data-svelte-h":!0}),g(ie)!=="svelte-120azsl"&&(ie.innerHTML=st),Fe=c(R),$(I.$$.fragment,R),Le=c(R),$(J.$$.fragment,R),R.forEach(t),le.forEach(t),Ve=c(e),pe=s(e,"P",{}),u(pe).forEach(t),this.h()},h(){h(r,"name","hf:doc:metadata"),h(r,"content",JSON.stringify(Tt)),h(o,"id","vitdet"),h(o,"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"),h(o,"href","#vitdet"),h(f,"class","relative group"),h(E,"id","overview"),h(E,"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"),h(E,"href","#overview"),h(D,"class","relative group"),h(Z,"id","transformers.VitDetConfig"),h(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"),h(Z,"href","#transformers.VitDetConfig"),h(k,"class","relative group"),h(b,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(W,"id","transformers.VitDetModel"),h(W,"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"),h(W,"href","#transformers.VitDetModel"),h(j,"class","relative group"),h(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,n){l(document.head,r),i(e,_,n),i(e,p,n),i(e,m,n),i(e,f,n),l(f,o),l(o,v),M(H,v,null),l(f,Ee),l(f,ee),i(e,ue,n),i(e,D,n),l(D,E),l(E,de),M(N,de,null),l(D,Ze),l(D,te),i(e,ge,n),i(e,F,n),i(e,_e,n),i(e,L,n),i(e,ve,n),i(e,G,n),i(e,be,n),i(e,S,n),i(e,we,n),i(e,A,n),i(e,ye,n),i(e,q,n),i(e,$e,n),i(e,k,n),l(k,Z),l(Z,ce),M(B,ce,null),l(k,Pe),l(k,oe),i(e,Me,n),i(e,b,n),M(X,b,null),l(b,We),l(b,ne),l(b,Ie),l(b,ae),l(b,Je),M(P,b,null),i(e,Te,n),i(e,j,n),l(j,W),l(W,me),M(O,me,null),l(j,Ue),l(j,se),i(e,Ce,n),i(e,x,n),M(Q,x,null),l(x,Re),l(x,re),l(x,He),l(x,w),M(Y,w,null),l(w,Ne),l(w,ie),l(w,Fe),M(I,w,null),l(w,Le),M(J,w,null),i(e,Ve,n),i(e,pe,n),xe=!0},p(e,[n]){const K={};n&2&&(K.$$scope={dirty:n,ctx:e}),P.$set(K);const he={};n&2&&(he.$$scope={dirty:n,ctx:e}),I.$set(he);const fe={};n&2&&(fe.$$scope={dirty:n,ctx:e}),J.$set(fe)},i(e){xe||(T(H.$$.fragment,e),T(N.$$.fragment,e),T(B.$$.fragment,e),T(X.$$.fragment,e),T(P.$$.fragment,e),T(O.$$.fragment,e),T(Q.$$.fragment,e),T(Y.$$.fragment,e),T(I.$$.fragment,e),T(J.$$.fragment,e),xe=!0)},o(e){C(H.$$.fragment,e),C(N.$$.fragment,e),C(B.$$.fragment,e),C(X.$$.fragment,e),C(P.$$.fragment,e),C(O.$$.fragment,e),C(Q.$$.fragment,e),C(Y.$$.fragment,e),C(I.$$.fragment,e),C(J.$$.fragment,e),xe=!1},d(e){e&&(t(_),t(p),t(m),t(f),t(ue),t(D),t(ge),t(F),t(_e),t(L),t(ve),t(G),t(be),t(S),t(we),t(A),t(ye),t(q),t($e),t(k),t(Me),t(b),t(Te),t(j),t(Ce),t(x),t(Ve),t(pe)),t(r),V(H),V(N),V(B),V(X),V(P),V(O),V(Q),V(Y),V(I),V(J)}}}const Tt={local:"vitdet",sections:[{local:"overview",title:"Overview"},{local:"transformers.VitDetConfig",title:"VitDetConfig"},{local:"transformers.VitDetModel",title:"VitDetModel"}],title:"ViTDet"};function Ct(z){return ut(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Zt extends gt{constructor(r){super(),_t(this,r,Ct,Mt,ft,{})}}export{Zt as component};
