import{S as pr,i as hr,s as fr,e as s,k as m,w as b,t as r,M as gr,c as n,d as t,m as p,a,x as y,h as i,b as l,N as ur,G as o,g as h,y as v,q as w,o as T,B as $,v as _r,L as aa}from"../../chunks/vendor-hf-doc-builder.js";import{T as mr}from"../../chunks/Tip-hf-doc-builder.js";import{D as I}from"../../chunks/Docstring-hf-doc-builder.js";import{C as ra}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as xe}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as na}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";import{P as br}from"../../chunks/PipelineTag-hf-doc-builder.js";function yr(U){let f,x,_,g,j;return g=new ra({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFlvbG9zQ29uZmlnJTJDJTIwWW9sb3NNb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBZT0xPUyUyMGh1c3R2bCUyRnlvbG9zLWJhc2UlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwWW9sb3NDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwaHVzdHZsJTJGeW9sb3MtYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwWW9sb3NNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> YolosConfig, YolosModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a YOLOS hustvl/yolos-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = YolosConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the hustvl/yolos-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = YolosModel(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(){f=s("p"),x=r("Example:"),_=m(),b(g.$$.fragment)},l(c){f=n(c,"P",{});var u=a(f);x=i(u,"Example:"),u.forEach(t),_=p(c),y(g.$$.fragment,c)},m(c,u){h(c,f,u),o(f,x),h(c,_,u),v(g,c,u),j=!0},p:aa,i(c){j||(w(g.$$.fragment,c),j=!0)},o(c){T(g.$$.fragment,c),j=!1},d(c){c&&t(f),c&&t(_),$(g,c)}}}function vr(U){let f,x,_,g,j;return{c(){f=s("p"),x=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s("code"),g=r("Module"),j=r(`
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(c){f=n(c,"P",{});var u=a(f);x=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n(u,"CODE",{});var O=a(_);g=i(O,"Module"),O.forEach(t),j=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(c,u){h(c,f,u),o(f,x),o(f,_),o(_,g),o(f,j)},d(c){c&&t(f)}}}function wr(U){let f,x,_,g,j;return g=new ra({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFlvbG9zTW9kZWwlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaHVnZ2luZ2ZhY2UlMkZjYXRzLWltYWdlJTIyKSUwQWltYWdlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRlc3QlMjIlNUQlNUIlMjJpbWFnZSUyMiU1RCU1QjAlNUQlMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmh1c3R2bCUyRnlvbG9zLXNtYWxsJTIyKSUwQW1vZGVsJTIwJTNEJTIwWW9sb3NNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyaHVzdHZsJTJGeW9sb3Mtc21hbGwlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGUlMEFsaXN0KGxhc3RfaGlkZGVuX3N0YXRlcy5zaGFwZSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, YolosModel
<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> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;huggingface/cats-image&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;hustvl/yolos-small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = YolosModel.from_pretrained(<span class="hljs-string">&quot;hustvl/yolos-small&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(image, return_tensors=<span class="hljs-string">&quot;pt&quot;</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(**inputs)

<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">3401</span>, <span class="hljs-number">384</span>]`}}),{c(){f=s("p"),x=r("Example:"),_=m(),b(g.$$.fragment)},l(c){f=n(c,"P",{});var u=a(f);x=i(u,"Example:"),u.forEach(t),_=p(c),y(g.$$.fragment,c)},m(c,u){h(c,f,u),o(f,x),h(c,_,u),v(g,c,u),j=!0},p:aa,i(c){j||(w(g.$$.fragment,c),j=!0)},o(c){T(g.$$.fragment,c),j=!1},d(c){c&&t(f),c&&t(_),$(g,c)}}}function Tr(U){let f,x,_,g,j;return{c(){f=s("p"),x=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s("code"),g=r("Module"),j=r(`
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(c){f=n(c,"P",{});var u=a(f);x=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n(u,"CODE",{});var O=a(_);g=i(O,"Module"),O.forEach(t),j=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(c,u){h(c,f,u),o(f,x),o(f,_),o(_,g),o(f,j)},d(c){c&&t(f)}}}function $r(U){let f,x,_,g,j;return g=new ra({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMEF1dG9Nb2RlbEZvck9iamVjdERldGVjdGlvbiUwQWltcG9ydCUyMHRvcmNoJTBBZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJodXN0dmwlMkZ5b2xvcy10aW55JTIyKSUwQW1vZGVsJTIwJTNEJTIwQXV0b01vZGVsRm9yT2JqZWN0RGV0ZWN0aW9uLmZyb21fcHJldHJhaW5lZCglMjJodXN0dmwlMkZ5b2xvcy10aW55JTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZXMlM0RpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQSUyMyUyMGNvbnZlcnQlMjBvdXRwdXRzJTIwKGJvdW5kaW5nJTIwYm94ZXMlMjBhbmQlMjBjbGFzcyUyMGxvZ2l0cyklMjB0byUyMENPQ08lMjBBUEklMEF0YXJnZXRfc2l6ZXMlMjAlM0QlMjB0b3JjaC50ZW5zb3IoJTVCaW1hZ2Uuc2l6ZSU1QiUzQSUzQS0xJTVEJTVEKSUwQXJlc3VsdHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IucG9zdF9wcm9jZXNzX29iamVjdF9kZXRlY3Rpb24ob3V0cHV0cyUyQyUyMHRocmVzaG9sZCUzRDAuOSUyQyUyMHRhcmdldF9zaXplcyUzRHRhcmdldF9zaXplcyklNUIlMEElMjAlMjAlMjAlMjAwJTBBJTVEJTBBJTBBZm9yJTIwc2NvcmUlMkMlMjBsYWJlbCUyQyUyMGJveCUyMGluJTIwemlwKHJlc3VsdHMlNUIlMjJzY29yZXMlMjIlNUQlMkMlMjByZXN1bHRzJTVCJTIybGFiZWxzJTIyJTVEJTJDJTIwcmVzdWx0cyU1QiUyMmJveGVzJTIyJTVEKSUzQSUwQSUyMCUyMCUyMCUyMGJveCUyMCUzRCUyMCU1QnJvdW5kKGklMkMlMjAyKSUyMGZvciUyMGklMjBpbiUyMGJveC50b2xpc3QoKSU1RCUwQSUyMCUyMCUyMCUyMHByaW50KCUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGYlMjJEZXRlY3RlZCUyMCU3Qm1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QmxhYmVsLml0ZW0oKSU1RCU3RCUyMHdpdGglMjBjb25maWRlbmNlJTIwJTIyJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwZiUyMiU3QnJvdW5kKHNjb3JlLml0ZW0oKSUyQyUyMDMpJTdEJTIwYXQlMjBsb2NhdGlvbiUyMCU3QmJveCU3RCUyMiUwQSUyMCUyMCUyMCUyMCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, AutoModelForObjectDetection
<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><span class="hljs-keyword">import</span> requests

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;hustvl/yolos-tiny&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForObjectDetection.from_pretrained(<span class="hljs-string">&quot;hustvl/yolos-tiny&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(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 = image_processor.post_process_object_detection(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">... </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 remote <span class="hljs-keyword">with</span> confidence <span class="hljs-number">0.994</span> at location [<span class="hljs-number">46.96</span>, <span class="hljs-number">72.61</span>, <span class="hljs-number">181.02</span>, <span class="hljs-number">119.73</span>]
Detected remote <span class="hljs-keyword">with</span> confidence <span class="hljs-number">0.975</span> at location [<span class="hljs-number">340.66</span>, <span class="hljs-number">79.19</span>, <span class="hljs-number">372.59</span>, <span class="hljs-number">192.65</span>]
Detected cat <span class="hljs-keyword">with</span> confidence <span class="hljs-number">0.984</span> at location [<span class="hljs-number">12.27</span>, <span class="hljs-number">54.25</span>, <span class="hljs-number">319.42</span>, <span class="hljs-number">470.99</span>]
Detected remote <span class="hljs-keyword">with</span> confidence <span class="hljs-number">0.922</span> at location [<span class="hljs-number">41.66</span>, <span class="hljs-number">71.96</span>, <span class="hljs-number">178.7</span>, <span class="hljs-number">120.33</span>]
Detected cat <span class="hljs-keyword">with</span> confidence <span class="hljs-number">0.914</span> at location [<span class="hljs-number">342.34</span>, <span class="hljs-number">21.48</span>, <span class="hljs-number">638.64</span>, <span class="hljs-number">372.46</span>]`}}),{c(){f=s("p"),x=r("Examples:"),_=m(),b(g.$$.fragment)},l(c){f=n(c,"P",{});var u=a(f);x=i(u,"Examples:"),u.forEach(t),_=p(c),y(g.$$.fragment,c)},m(c,u){h(c,f,u),o(f,x),h(c,_,u),v(g,c,u),j=!0},p:aa,i(c){j||(w(g.$$.fragment,c),j=!0)},o(c){T(g.$$.fragment,c),j=!1},d(c){c&&t(f),c&&t(_),$(g,c)}}}function jr(U){let f,x,_,g,j,c,u,O,Xt,lt,S,H,Po,Ye,Ht,Jo,Kt,ct,F,es,Me,os,ts,ro,ss,ns,dt,io,as,mt,lo,Fo,rs,pt,co,is,ht,mo,P,ls,po,cs,ds,ho,ms,ps,Do,hs,fs,ft,K,ia,gt,ee,gs,fo,us,_s,ut,D,bs,Ee,ys,vs,Ce,ws,Ts,_t,L,oe,No,Ie,$s,So,js,bt,go,xs,yt,Ue,vt,te,W,Ys,uo,Ms,Es,ke,Cs,Is,Us,_o,ks,bo,zs,wt,yo,Os,Tt,R,se,Lo,ze,Ps,Wo,Js,$t,M,Oe,Fs,A,Ds,vo,Ns,Ss,Pe,Ls,Ws,Rs,Z,As,wo,Zs,Vs,To,qs,Gs,Bs,ne,jt,V,ae,Ro,Je,Qs,Ao,Xs,xt,Y,Fe,Hs,Zo,Ks,en,re,De,on,Vo,tn,sn,ie,Ne,nn,qo,an,rn,le,Se,ln,Le,cn,$o,dn,mn,Yt,q,ce,Go,We,pn,Bo,hn,Mt,E,Re,fn,de,Ae,gn,Qo,un,_n,me,Ze,bn,Xo,yn,vn,pe,Ve,wn,qe,Tn,jo,$n,jn,Et,G,he,Ho,Ge,xn,Ko,Yn,Ct,J,Be,Mn,Qe,En,Xe,Cn,In,Un,k,He,kn,B,zn,xo,On,Pn,et,Jn,Fn,Dn,fe,Nn,ge,It,Q,ue,ot,Ke,Sn,tt,Ln,Ut,C,eo,Wn,st,Rn,An,oo,Zn,to,Vn,qn,Gn,z,so,Bn,X,Qn,Yo,Xn,Hn,nt,Kn,ea,oa,_e,ta,be,kt;return c=new xe({}),Ye=new xe({}),Ie=new xe({}),Ue=new br({props:{pipeline:"object-detection"}}),ze=new xe({}),Oe=new I({props:{name:"class transformers.YolosConfig",anchor:"transformers.YolosConfig",parameters:[{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.0"},{name:"attention_probs_dropout_prob",val:" = 0.0"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"image_size",val:" = [512, 864]"},{name:"patch_size",val:" = 16"},{name:"num_channels",val:" = 3"},{name:"qkv_bias",val:" = True"},{name:"num_detection_tokens",val:" = 100"},{name:"use_mid_position_embeddings",val:" = True"},{name:"auxiliary_loss",val:" = False"},{name:"class_cost",val:" = 1"},{name:"bbox_cost",val:" = 5"},{name:"giou_cost",val:" = 2"},{name:"bbox_loss_coefficient",val:" = 5"},{name:"giou_loss_coefficient",val:" = 2"},{name:"eos_coefficient",val:" = 0.1"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.YolosConfig.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.YolosConfig.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.YolosConfig.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.YolosConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.YolosConfig.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.YolosConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probabilitiy for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.YolosConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.YolosConfig.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.YolosConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.YolosConfig.image_size",description:`<strong>image_size</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[512, 864]</code>) &#x2014;
The size (resolution) of each image.`,name:"image_size"},{anchor:"transformers.YolosConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>16</code>) &#x2014;
The size (resolution) of each patch.`,name:"patch_size"},{anchor:"transformers.YolosConfig.num_channels",description:`<strong>num_channels</strong> (<code>int</code>, <em>optional</em>, defaults to <code>3</code>) &#x2014;
The number of input channels.`,name:"num_channels"},{anchor:"transformers.YolosConfig.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.YolosConfig.num_detection_tokens",description:`<strong>num_detection_tokens</strong> (<code>int</code>, <em>optional</em>, defaults to <code>100</code>) &#x2014;
The number of detection tokens.`,name:"num_detection_tokens"},{anchor:"transformers.YolosConfig.use_mid_position_embeddings",description:`<strong>use_mid_position_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use the mid-layer position encodings.`,name:"use_mid_position_embeddings"},{anchor:"transformers.YolosConfig.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.YolosConfig.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.YolosConfig.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.YolosConfig.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.YolosConfig.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.YolosConfig.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.YolosConfig.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/v4.31.0/src/transformers/models/yolos/configuration_yolos.py#L35"}}),ne=new na({props:{anchor:"transformers.YolosConfig.example",$$slots:{default:[yr]},$$scope:{ctx:U}}}),Je=new xe({}),Fe=new I({props:{name:"class transformers.YolosImageProcessor",anchor:"transformers.YolosImageProcessor",parameters:[{name:"format",val:": typing.Union[str, transformers.models.yolos.image_processing_yolos.AnnotionFormat] = <AnnotionFormat.COCO_DETECTION: 'coco_detection'>"},{name:"do_resize",val:": bool = True"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": Resampling = <Resampling.BILINEAR: 2>"},{name:"do_rescale",val:": bool = True"},{name:"rescale_factor",val:": typing.Union[int, float] = 0.00392156862745098"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": typing.Union[float, typing.List[float]] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float]] = None"},{name:"do_pad",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.YolosImageProcessor.format",description:`<strong>format</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;coco_detection&quot;</code>) &#x2014;
Data format of the annotations. One of &#x201C;coco_detection&#x201D; or &#x201C;coco_panoptic&#x201D;.`,name:"format"},{anchor:"transformers.YolosImageProcessor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Controls whether to resize the image&#x2019;s (height, width) dimensions to the specified <code>size</code>. Can be
overridden by the <code>do_resize</code> parameter in the <code>preprocess</code> method.`,name:"do_resize"},{anchor:"transformers.YolosImageProcessor.size",description:`<strong>size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to <code>{&quot;shortest_edge&quot; -- 800, &quot;longest_edge&quot;: 1333}</code>):
Size of the image&#x2019;s (height, width) dimensions after resizing. Can be overridden by the <code>size</code> parameter in
the <code>preprocess</code> method.`,name:"size"},{anchor:"transformers.YolosImageProcessor.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>PILImageResampling.BILINEAR</code>) &#x2014;
Resampling filter to use if resizing the image.`,name:"resample"},{anchor:"transformers.YolosImageProcessor.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Controls whether to rescale the image by the specified scale <code>rescale_factor</code>. Can be overridden by the
<code>do_rescale</code> parameter in the <code>preprocess</code> method.`,name:"do_rescale"},{anchor:"transformers.YolosImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to <code>1/255</code>) &#x2014;
Scale factor to use if rescaling the image. Can be overridden by the <code>rescale_factor</code> parameter in the
<code>preprocess</code> method.
do_normalize &#x2014;
Controls whether to normalize the image. Can be overridden by the <code>do_normalize</code> parameter in the
<code>preprocess</code> method.`,name:"rescale_factor"},{anchor:"transformers.YolosImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_DEFAULT_MEAN</code>) &#x2014;
Mean values to use when normalizing the image. Can be a single value or a list of values, one for each
channel. Can be overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method.`,name:"image_mean"},{anchor:"transformers.YolosImageProcessor.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_DEFAULT_STD</code>) &#x2014;
Standard deviation values to use when normalizing the image. Can be a single value or a list of values, one
for each channel. Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.`,name:"image_std"},{anchor:"transformers.YolosImageProcessor.do_pad",description:`<strong>do_pad</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Controls whether to pad the image to the largest image in a batch and create a pixel mask. Can be
overridden by the <code>do_pad</code> parameter in the <code>preprocess</code> method.`,name:"do_pad"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/yolos/image_processing_yolos.py#L654"}}),De=new I({props:{name:"preprocess",anchor:"transformers.YolosImageProcessor.preprocess",parameters:[{name:"images",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), typing.List[ForwardRef('PIL.Image.Image')], typing.List[numpy.ndarray], typing.List[ForwardRef('torch.Tensor')]]"},{name:"annotations",val:": typing.Union[typing.Dict[str, typing.Union[int, str, typing.List[typing.Dict]]], typing.List[typing.Dict[str, typing.Union[int, str, typing.List[typing.Dict]]]], NoneType] = None"},{name:"return_segmentation_masks",val:": bool = None"},{name:"masks_path",val:": typing.Union[str, pathlib.Path, NoneType] = None"},{name:"do_resize",val:": typing.Optional[bool] = None"},{name:"size",val:": typing.Union[typing.Dict[str, int], NoneType] = None"},{name:"resample",val:" = None"},{name:"do_rescale",val:": typing.Optional[bool] = None"},{name:"rescale_factor",val:": typing.Union[int, float, NoneType] = None"},{name:"do_normalize",val:": typing.Optional[bool] = None"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"do_pad",val:": typing.Optional[bool] = None"},{name:"format",val:": typing.Union[str, transformers.models.yolos.image_processing_yolos.AnnotionFormat, NoneType] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension] = <ChannelDimension.FIRST: 'channels_first'>"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.YolosImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image or batch of images to preprocess.`,name:"images"},{anchor:"transformers.YolosImageProcessor.preprocess.annotations",description:`<strong>annotations</strong> (<code>AnnotationType</code> or <code>List[AnnotationType]</code>, <em>optional</em>) &#x2014;
List of annotations associated with the image or batch of images. If annotionation is for object
detection, the annotations should be a dictionary with the following keys:<ul>
<li>&#x201C;image_id&#x201D; (<code>int</code>): The image id.</li>
<li>&#x201C;annotations&#x201D; (<code>List[Dict]</code>): List of annotations for an image. Each annotation should be a
dictionary. An image can have no annotations, in which case the list should be empty.
If annotionation is for segmentation, the annotations should be a dictionary with the following keys:</li>
<li>&#x201C;image_id&#x201D; (<code>int</code>): The image id.</li>
<li>&#x201C;segments_info&#x201D; (<code>List[Dict]</code>): List of segments for an image. Each segment should be a dictionary.
An image can have no segments, in which case the list should be empty.</li>
<li>&#x201C;file_name&#x201D; (<code>str</code>): The file name of the image.</li>
</ul>`,name:"annotations"},{anchor:"transformers.YolosImageProcessor.preprocess.return_segmentation_masks",description:`<strong>return_segmentation_masks</strong> (<code>bool</code>, <em>optional</em>, defaults to self.return_segmentation_masks) &#x2014;
Whether to return segmentation masks.`,name:"return_segmentation_masks"},{anchor:"transformers.YolosImageProcessor.preprocess.masks_path",description:`<strong>masks_path</strong> (<code>str</code> or <code>pathlib.Path</code>, <em>optional</em>) &#x2014;
Path to the directory containing the segmentation masks.`,name:"masks_path"},{anchor:"transformers.YolosImageProcessor.preprocess.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to self.do_resize) &#x2014;
Whether to resize the image.`,name:"do_resize"},{anchor:"transformers.YolosImageProcessor.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to self.size) &#x2014;
Size of the image after resizing.`,name:"size"},{anchor:"transformers.YolosImageProcessor.preprocess.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to self.resample) &#x2014;
Resampling filter to use when resizing the image.`,name:"resample"},{anchor:"transformers.YolosImageProcessor.preprocess.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to self.do_rescale) &#x2014;
Whether to rescale the image.`,name:"do_rescale"},{anchor:"transformers.YolosImageProcessor.preprocess.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to self.rescale_factor) &#x2014;
Rescale factor to use when rescaling the image.`,name:"rescale_factor"},{anchor:"transformers.YolosImageProcessor.preprocess.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to self.do_normalize) &#x2014;
Whether to normalize the image.`,name:"do_normalize"},{anchor:"transformers.YolosImageProcessor.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to self.image_mean) &#x2014;
Mean to use when normalizing the image.`,name:"image_mean"},{anchor:"transformers.YolosImageProcessor.preprocess.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to self.image_std) &#x2014;
Standard deviation to use when normalizing the image.`,name:"image_std"},{anchor:"transformers.YolosImageProcessor.preprocess.do_pad",description:`<strong>do_pad</strong> (<code>bool</code>, <em>optional</em>, defaults to self.do_pad) &#x2014;
Whether to pad the image.`,name:"do_pad"},{anchor:"transformers.YolosImageProcessor.preprocess.format",description:`<strong>format</strong> (<code>str</code> or <code>AnnotionFormat</code>, <em>optional</em>, defaults to self.format) &#x2014;
Format of the annotations.`,name:"format"},{anchor:"transformers.YolosImageProcessor.preprocess.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>, defaults to self.return_tensors) &#x2014;
Type of tensors to return. If <code>None</code>, will return the list of images.`,name:"return_tensors"},{anchor:"transformers.YolosImageProcessor.preprocess.data_format",description:`<strong>data_format</strong> (<code>str</code> or <code>ChannelDimension</code>, <em>optional</em>, defaults to self.data_format) &#x2014;
The channel dimension format of the image. If not provided, it will be the same as the input image.`,name:"data_format"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/yolos/image_processing_yolos.py#L930"}}),Ne=new I({props:{name:"pad",anchor:"transformers.YolosImageProcessor.pad",parameters:[{name:"images",val:": typing.List[numpy.ndarray]"},{name:"return_pixel_mask",val:": bool = False"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"data_format",val:": typing.Optional[transformers.image_utils.ChannelDimension] = None"}],parametersDescription:[{anchor:"transformers.YolosImageProcessor.pad.image",description:`<strong>image</strong> (<code>np.ndarray</code>) &#x2014;
Image to pad.`,name:"image"},{anchor:"transformers.YolosImageProcessor.pad.return_pixel_mask",description:`<strong>return_pixel_mask</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to return a pixel mask.`,name:"return_pixel_mask"},{anchor:"transformers.YolosImageProcessor.pad.input_channel_dimension",description:`<strong>input_channel_dimension</strong> (<code>ChannelDimension</code>, <em>optional</em>) &#x2014;
The channel dimension format of the image. If not provided, it will be inferred from the input image.`,name:"input_channel_dimension"},{anchor:"transformers.YolosImageProcessor.pad.data_format",description:`<strong>data_format</strong> (<code>str</code> or <code>ChannelDimension</code>, <em>optional</em>) &#x2014;
The channel dimension format of the image. If not provided, it will be the same as the input image.`,name:"data_format"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/yolos/image_processing_yolos.py#L898"}}),Se=new I({props:{name:"post_process_object_detection",anchor:"transformers.YolosImageProcessor.post_process_object_detection",parameters:[{name:"outputs",val:""},{name:"threshold",val:": float = 0.5"},{name:"target_sizes",val:": typing.Union[transformers.utils.generic.TensorType, typing.List[typing.Tuple]] = None"}],parametersDescription:[{anchor:"transformers.YolosImageProcessor.post_process_object_detection.outputs",description:`<strong>outputs</strong> (<code>YolosObjectDetectionOutput</code>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.YolosImageProcessor.post_process_object_detection.threshold",description:`<strong>threshold</strong> (<code>float</code>, <em>optional</em>) &#x2014;
Score threshold to keep object detection predictions.`,name:"threshold"},{anchor:"transformers.YolosImageProcessor.post_process_object_detection.target_sizes",description:`<strong>target_sizes</strong> (<code>torch.Tensor</code> or <code>List[Tuple[int, int]]</code>, <em>optional</em>) &#x2014;
Tensor of shape <code>(batch_size, 2)</code> or list of tuples (<code>Tuple[int, int]</code>) containing the target size
<code>(height, width)</code> of each image in the batch. If unset, predictions will not be resized.`,name:"target_sizes"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/yolos/image_processing_yolos.py#L1178",returnDescription:`
<p>A list of dictionaries, each dictionary containing the scores, labels and boxes for an image
in the batch as predicted by the model.</p>
`,returnType:`
<p><code>List[Dict]</code></p>
`}}),We=new xe({}),Re=new I({props:{name:"class transformers.YolosFeatureExtractor",anchor:"transformers.YolosFeatureExtractor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/yolos/feature_extraction_yolos.py#L26"}}),Ae=new I({props:{name:"__call__",anchor:"transformers.YolosFeatureExtractor.__call__",parameters:[{name:"images",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/image_processing_utils.py#L492"}}),Ze=new I({props:{name:"pad",anchor:"transformers.YolosFeatureExtractor.pad",parameters:[{name:"images",val:": typing.List[numpy.ndarray]"},{name:"return_pixel_mask",val:": bool = False"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"data_format",val:": typing.Optional[transformers.image_utils.ChannelDimension] = None"}],parametersDescription:[{anchor:"transformers.YolosFeatureExtractor.pad.image",description:`<strong>image</strong> (<code>np.ndarray</code>) &#x2014;
Image to pad.`,name:"image"},{anchor:"transformers.YolosFeatureExtractor.pad.return_pixel_mask",description:`<strong>return_pixel_mask</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to return a pixel mask.`,name:"return_pixel_mask"},{anchor:"transformers.YolosFeatureExtractor.pad.input_channel_dimension",description:`<strong>input_channel_dimension</strong> (<code>ChannelDimension</code>, <em>optional</em>) &#x2014;
The channel dimension format of the image. If not provided, it will be inferred from the input image.`,name:"input_channel_dimension"},{anchor:"transformers.YolosFeatureExtractor.pad.data_format",description:`<strong>data_format</strong> (<code>str</code> or <code>ChannelDimension</code>, <em>optional</em>) &#x2014;
The channel dimension format of the image. If not provided, it will be the same as the input image.`,name:"data_format"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/yolos/image_processing_yolos.py#L898"}}),Ve=new I({props:{name:"post_process_object_detection",anchor:"transformers.YolosFeatureExtractor.post_process_object_detection",parameters:[{name:"outputs",val:""},{name:"threshold",val:": float = 0.5"},{name:"target_sizes",val:": typing.Union[transformers.utils.generic.TensorType, typing.List[typing.Tuple]] = None"}],parametersDescription:[{anchor:"transformers.YolosFeatureExtractor.post_process_object_detection.outputs",description:`<strong>outputs</strong> (<code>YolosObjectDetectionOutput</code>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.YolosFeatureExtractor.post_process_object_detection.threshold",description:`<strong>threshold</strong> (<code>float</code>, <em>optional</em>) &#x2014;
Score threshold to keep object detection predictions.`,name:"threshold"},{anchor:"transformers.YolosFeatureExtractor.post_process_object_detection.target_sizes",description:`<strong>target_sizes</strong> (<code>torch.Tensor</code> or <code>List[Tuple[int, int]]</code>, <em>optional</em>) &#x2014;
Tensor of shape <code>(batch_size, 2)</code> or list of tuples (<code>Tuple[int, int]</code>) containing the target size
<code>(height, width)</code> of each image in the batch. If unset, predictions will not be resized.`,name:"target_sizes"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/yolos/image_processing_yolos.py#L1178",returnDescription:`
<p>A list of dictionaries, each dictionary containing the scores, labels and boxes for an image
in the batch as predicted by the model.</p>
`,returnType:`
<p><code>List[Dict]</code></p>
`}}),Ge=new xe({}),Be=new I({props:{name:"class transformers.YolosModel",anchor:"transformers.YolosModel",parameters:[{name:"config",val:": YolosConfig"},{name:"add_pooling_layer",val:": bool = True"}],parametersDescription:[{anchor:"transformers.YolosModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/yolos#transformers.YolosConfig">YolosConfig</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.31.0/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.31.0/src/transformers/models/yolos/modeling_yolos.py#L597"}}),He=new I({props:{name:"forward",anchor:"transformers.YolosModel.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.YolosModel.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.31.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.31.0/en/model_doc/perceiver#transformers.PerceiverFeatureExtractor.__call__">YolosImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.YolosModel.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.YolosModel.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.YolosModel.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.YolosModel.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.31.0/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.31.0/src/transformers/models/yolos/modeling_yolos.py#L625",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</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.31.0/en/model_doc/yolos#transformers.YolosConfig"
>YolosConfig</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>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</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>) \u2014 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>) \u2014 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.31.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),fe=new mr({props:{$$slots:{default:[vr]},$$scope:{ctx:U}}}),ge=new na({props:{anchor:"transformers.YolosModel.forward.example",$$slots:{default:[wr]},$$scope:{ctx:U}}}),Ke=new xe({}),eo=new I({props:{name:"class transformers.YolosForObjectDetection",anchor:"transformers.YolosForObjectDetection",parameters:[{name:"config",val:": YolosConfig"}],parametersDescription:[{anchor:"transformers.YolosForObjectDetection.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/yolos#transformers.YolosConfig">YolosConfig</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.31.0/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.31.0/src/transformers/models/yolos/modeling_yolos.py#L705"}}),so=new I({props:{name:"forward",anchor:"transformers.YolosForObjectDetection.forward",parameters:[{name:"pixel_values",val:": FloatTensor"},{name:"labels",val:": typing.Optional[typing.List[typing.Dict]] = 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.YolosForObjectDetection.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.31.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.31.0/en/model_doc/perceiver#transformers.PerceiverFeatureExtractor.__call__">YolosImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.YolosForObjectDetection.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.YolosForObjectDetection.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.YolosForObjectDetection.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.YolosForObjectDetection.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.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.YolosForObjectDetection.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: <code>&apos;class_labels&apos;</code> and <code>&apos;boxes&apos;</code> (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/v4.31.0/src/transformers/models/yolos/modeling_yolos.py#L732",returnDescription:`
<p>A <code>transformers.models.yolos.modeling_yolos.YolosObjectDetectionOutput</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/v4.31.0/en/model_doc/yolos#transformers.YolosConfig"
>YolosConfig</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>post_process()</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>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, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of
the model at the output of each layer plus the optional initial embedding outputs.</li>
<li><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>) \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 after the attention softmax, used to compute the weighted average in
the self-attention heads.</li>
</ul>
`,returnType:`
<p><code>transformers.models.yolos.modeling_yolos.YolosObjectDetectionOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),_e=new mr({props:{$$slots:{default:[Tr]},$$scope:{ctx:U}}}),be=new na({props:{anchor:"transformers.YolosForObjectDetection.forward.example",$$slots:{default:[$r]},$$scope:{ctx:U}}}),{c(){f=s("meta"),x=m(),_=s("h1"),g=s("a"),j=s("span"),b(c.$$.fragment),u=m(),O=s("span"),Xt=r("YOLOS"),lt=m(),S=s("h2"),H=s("a"),Po=s("span"),b(Ye.$$.fragment),Ht=m(),Jo=s("span"),Kt=r("Overview"),ct=m(),F=s("p"),es=r("The YOLOS model was proposed in "),Me=s("a"),os=r("You Only Look at One Sequence: Rethinking Transformer in Vision through Object Detection"),ts=r(` by Yuxin Fang, Bencheng Liao, Xinggang Wang, Jiemin Fang, Jiyang Qi, Rui Wu, Jianwei Niu, Wenyu Liu.
YOLOS proposes to just leverage the plain `),ro=s("a"),ss=r("Vision Transformer (ViT)"),ns=r(" for object detection, inspired by DETR. It turns out that a base-sized encoder-only Transformer can also achieve 42 AP on COCO, similar to DETR and much more complex frameworks such as Faster R-CNN."),dt=m(),io=s("p"),as=r("The abstract from the paper is the following:"),mt=m(),lo=s("p"),Fo=s("em"),rs=r("Can Transformer perform 2D object- and region-level recognition from a pure sequence-to-sequence perspective with minimal knowledge about the 2D spatial structure? To answer this question, we present You Only Look at One Sequence (YOLOS), a series of object detection models based on the vanilla Vision Transformer with the fewest possible modifications, region priors, as well as inductive biases of the target task. We find that YOLOS pre-trained on the mid-sized ImageNet-1k dataset only can already achieve quite competitive performance on the challenging COCO object detection benchmark, e.g., YOLOS-Base directly adopted from BERT-Base architecture can obtain 42.0 box AP on COCO val. We also discuss the impacts as well as limitations of current pre-train schemes and model scaling strategies for Transformer in vision through YOLOS."),pt=m(),co=s("p"),is=r("Tips:"),ht=m(),mo=s("ul"),P=s("li"),ls=r("One can use "),po=s("a"),cs=r("YolosImageProcessor"),ds=r(" for preparing images (and optional targets) for the model. Contrary to "),ho=s("a"),ms=r("DETR"),ps=r(", YOLOS doesn\u2019t require a "),Do=s("code"),hs=r("pixel_mask"),fs=r(" to be created."),ft=m(),K=s("img"),gt=m(),ee=s("small"),gs=r("YOLOS architecture. Taken from the "),fo=s("a"),us=r("original paper"),_s=r("."),ut=m(),D=s("p"),bs=r("This model was contributed by "),Ee=s("a"),ys=r("nielsr"),vs=r(". The original code can be found "),Ce=s("a"),ws=r("here"),Ts=r("."),_t=m(),L=s("h2"),oe=s("a"),No=s("span"),b(Ie.$$.fragment),$s=m(),So=s("span"),js=r("Resources"),bt=m(),go=s("p"),xs=r("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with YOLOS."),yt=m(),b(Ue.$$.fragment),vt=m(),te=s("ul"),W=s("li"),Ys=r("All example notebooks illustrating inference + fine-tuning "),uo=s("a"),Ms=r("YolosForObjectDetection"),Es=r(" on a custom dataset can be found "),ke=s("a"),Cs=r("here"),Is=r("."),Us=m(),_o=s("li"),ks=r("See also: "),bo=s("a"),zs=r("Object detection task guide"),wt=m(),yo=s("p"),Os=r("If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),Tt=m(),R=s("h2"),se=s("a"),Lo=s("span"),b(ze.$$.fragment),Ps=m(),Wo=s("span"),Js=r("YolosConfig"),$t=m(),M=s("div"),b(Oe.$$.fragment),Fs=m(),A=s("p"),Ds=r("This is the configuration class to store the configuration of a "),vo=s("a"),Ns=r("YolosModel"),Ss=r(`. It is used to instantiate a YOLOS
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 YOLOS
`),Pe=s("a"),Ls=r("hustvl/yolos-base"),Ws=r(" architecture."),Rs=m(),Z=s("p"),As=r("Configuration objects inherit from "),wo=s("a"),Zs=r("PretrainedConfig"),Vs=r(` and can be used to control the model outputs. Read the
documentation from `),To=s("a"),qs=r("PretrainedConfig"),Gs=r(" for more information."),Bs=m(),b(ne.$$.fragment),jt=m(),V=s("h2"),ae=s("a"),Ro=s("span"),b(Je.$$.fragment),Qs=m(),Ao=s("span"),Xs=r("YolosImageProcessor"),xt=m(),Y=s("div"),b(Fe.$$.fragment),Hs=m(),Zo=s("p"),Ks=r("Constructs a Detr image processor."),en=m(),re=s("div"),b(De.$$.fragment),on=m(),Vo=s("p"),tn=r("Preprocess an image or a batch of images so that it can be used by the model."),sn=m(),ie=s("div"),b(Ne.$$.fragment),nn=m(),qo=s("p"),an=r(`Pads a batch of images to the bottom and right of the image with zeros to the size of largest height and width
in the batch and optionally returns their corresponding pixel mask.`),rn=m(),le=s("div"),b(Se.$$.fragment),ln=m(),Le=s("p"),cn=r("Converts the raw output of "),$o=s("a"),dn=r("YolosForObjectDetection"),mn=r(` into final bounding boxes in (top_left_x, top_left_y,
bottom_right_x, bottom_right_y) format. Only supports PyTorch.`),Yt=m(),q=s("h2"),ce=s("a"),Go=s("span"),b(We.$$.fragment),pn=m(),Bo=s("span"),hn=r("YolosFeatureExtractor"),Mt=m(),E=s("div"),b(Re.$$.fragment),fn=m(),de=s("div"),b(Ae.$$.fragment),gn=m(),Qo=s("p"),un=r("Preprocess an image or a batch of images."),_n=m(),me=s("div"),b(Ze.$$.fragment),bn=m(),Xo=s("p"),yn=r(`Pads a batch of images to the bottom and right of the image with zeros to the size of largest height and width
in the batch and optionally returns their corresponding pixel mask.`),vn=m(),pe=s("div"),b(Ve.$$.fragment),wn=m(),qe=s("p"),Tn=r("Converts the raw output of "),jo=s("a"),$n=r("YolosForObjectDetection"),jn=r(` into final bounding boxes in (top_left_x, top_left_y,
bottom_right_x, bottom_right_y) format. Only supports PyTorch.`),Et=m(),G=s("h2"),he=s("a"),Ho=s("span"),b(Ge.$$.fragment),xn=m(),Ko=s("span"),Yn=r("YolosModel"),Ct=m(),J=s("div"),b(Be.$$.fragment),Mn=m(),Qe=s("p"),En=r(`The bare YOLOS Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Xe=s("a"),Cn=r("torch.nn.Module"),In=r(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Un=m(),k=s("div"),b(He.$$.fragment),kn=m(),B=s("p"),zn=r("The "),xo=s("a"),On=r("YolosModel"),Pn=r(" forward method, overrides the "),et=s("code"),Jn=r("__call__"),Fn=r(" special method."),Dn=m(),b(fe.$$.fragment),Nn=m(),b(ge.$$.fragment),It=m(),Q=s("h2"),ue=s("a"),ot=s("span"),b(Ke.$$.fragment),Sn=m(),tt=s("span"),Ln=r("YolosForObjectDetection"),Ut=m(),C=s("div"),b(eo.$$.fragment),Wn=m(),st=s("p"),Rn=r("YOLOS Model (consisting of a ViT encoder) with object detection heads on top, for tasks such as COCO detection."),An=m(),oo=s("p"),Zn=r("This model is a PyTorch "),to=s("a"),Vn=r("torch.nn.Module"),qn=r(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Gn=m(),z=s("div"),b(so.$$.fragment),Bn=m(),X=s("p"),Qn=r("The "),Yo=s("a"),Xn=r("YolosForObjectDetection"),Hn=r(" forward method, overrides the "),nt=s("code"),Kn=r("__call__"),ea=r(" special method."),oa=m(),b(_e.$$.fragment),ta=m(),b(be.$$.fragment),this.h()},l(e){const d=gr('[data-svelte="svelte-1phssyn"]',document.head);f=n(d,"META",{name:!0,content:!0}),d.forEach(t),x=p(e),_=n(e,"H1",{class:!0});var no=a(_);g=n(no,"A",{id:!0,class:!0,href:!0});var at=a(g);j=n(at,"SPAN",{});var rt=a(j);y(c.$$.fragment,rt),rt.forEach(t),at.forEach(t),u=p(no),O=n(no,"SPAN",{});var it=a(O);Xt=i(it,"YOLOS"),it.forEach(t),no.forEach(t),lt=p(e),S=n(e,"H2",{class:!0});var ao=a(S);H=n(ao,"A",{id:!0,class:!0,href:!0});var la=a(H);Po=n(la,"SPAN",{});var ca=a(Po);y(Ye.$$.fragment,ca),ca.forEach(t),la.forEach(t),Ht=p(ao),Jo=n(ao,"SPAN",{});var da=a(Jo);Kt=i(da,"Overview"),da.forEach(t),ao.forEach(t),ct=p(e),F=n(e,"P",{});var Mo=a(F);es=i(Mo,"The YOLOS model was proposed in "),Me=n(Mo,"A",{href:!0,rel:!0});var ma=a(Me);os=i(ma,"You Only Look at One Sequence: Rethinking Transformer in Vision through Object Detection"),ma.forEach(t),ts=i(Mo,` by Yuxin Fang, Bencheng Liao, Xinggang Wang, Jiemin Fang, Jiyang Qi, Rui Wu, Jianwei Niu, Wenyu Liu.
YOLOS proposes to just leverage the plain `),ro=n(Mo,"A",{href:!0});var pa=a(ro);ss=i(pa,"Vision Transformer (ViT)"),pa.forEach(t),ns=i(Mo," for object detection, inspired by DETR. It turns out that a base-sized encoder-only Transformer can also achieve 42 AP on COCO, similar to DETR and much more complex frameworks such as Faster R-CNN."),Mo.forEach(t),dt=p(e),io=n(e,"P",{});var ha=a(io);as=i(ha,"The abstract from the paper is the following:"),ha.forEach(t),mt=p(e),lo=n(e,"P",{});var fa=a(lo);Fo=n(fa,"EM",{});var ga=a(Fo);rs=i(ga,"Can Transformer perform 2D object- and region-level recognition from a pure sequence-to-sequence perspective with minimal knowledge about the 2D spatial structure? To answer this question, we present You Only Look at One Sequence (YOLOS), a series of object detection models based on the vanilla Vision Transformer with the fewest possible modifications, region priors, as well as inductive biases of the target task. We find that YOLOS pre-trained on the mid-sized ImageNet-1k dataset only can already achieve quite competitive performance on the challenging COCO object detection benchmark, e.g., YOLOS-Base directly adopted from BERT-Base architecture can obtain 42.0 box AP on COCO val. We also discuss the impacts as well as limitations of current pre-train schemes and model scaling strategies for Transformer in vision through YOLOS."),ga.forEach(t),fa.forEach(t),pt=p(e),co=n(e,"P",{});var ua=a(co);is=i(ua,"Tips:"),ua.forEach(t),ht=p(e),mo=n(e,"UL",{});var _a=a(mo);P=n(_a,"LI",{});var ye=a(P);ls=i(ye,"One can use "),po=n(ye,"A",{href:!0});var ba=a(po);cs=i(ba,"YolosImageProcessor"),ba.forEach(t),ds=i(ye," for preparing images (and optional targets) for the model. Contrary to "),ho=n(ye,"A",{href:!0});var ya=a(ho);ms=i(ya,"DETR"),ya.forEach(t),ps=i(ye,", YOLOS doesn\u2019t require a "),Do=n(ye,"CODE",{});var va=a(Do);hs=i(va,"pixel_mask"),va.forEach(t),fs=i(ye," to be created."),ye.forEach(t),_a.forEach(t),ft=p(e),K=n(e,"IMG",{src:!0,alt:!0,width:!0}),gt=p(e),ee=n(e,"SMALL",{});var zt=a(ee);gs=i(zt,"YOLOS architecture. Taken from the "),fo=n(zt,"A",{href:!0});var wa=a(fo);us=i(wa,"original paper"),wa.forEach(t),_s=i(zt,"."),zt.forEach(t),ut=p(e),D=n(e,"P",{});var Eo=a(D);bs=i(Eo,"This model was contributed by "),Ee=n(Eo,"A",{href:!0,rel:!0});var Ta=a(Ee);ys=i(Ta,"nielsr"),Ta.forEach(t),vs=i(Eo,". The original code can be found "),Ce=n(Eo,"A",{href:!0,rel:!0});var $a=a(Ce);ws=i($a,"here"),$a.forEach(t),Ts=i(Eo,"."),Eo.forEach(t),_t=p(e),L=n(e,"H2",{class:!0});var Ot=a(L);oe=n(Ot,"A",{id:!0,class:!0,href:!0});var ja=a(oe);No=n(ja,"SPAN",{});var xa=a(No);y(Ie.$$.fragment,xa),xa.forEach(t),ja.forEach(t),$s=p(Ot),So=n(Ot,"SPAN",{});var Ya=a(So);js=i(Ya,"Resources"),Ya.forEach(t),Ot.forEach(t),bt=p(e),go=n(e,"P",{});var Ma=a(go);xs=i(Ma,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with YOLOS."),Ma.forEach(t),yt=p(e),y(Ue.$$.fragment,e),vt=p(e),te=n(e,"UL",{});var Pt=a(te);W=n(Pt,"LI",{});var Co=a(W);Ys=i(Co,"All example notebooks illustrating inference + fine-tuning "),uo=n(Co,"A",{href:!0});var Ea=a(uo);Ms=i(Ea,"YolosForObjectDetection"),Ea.forEach(t),Es=i(Co," on a custom dataset can be found "),ke=n(Co,"A",{href:!0,rel:!0});var Ca=a(ke);Cs=i(Ca,"here"),Ca.forEach(t),Is=i(Co,"."),Co.forEach(t),Us=p(Pt),_o=n(Pt,"LI",{});var sa=a(_o);ks=i(sa,"See also: "),bo=n(sa,"A",{href:!0});var Ia=a(bo);zs=i(Ia,"Object detection task guide"),Ia.forEach(t),sa.forEach(t),Pt.forEach(t),wt=p(e),yo=n(e,"P",{});var Ua=a(yo);Os=i(Ua,"If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),Ua.forEach(t),Tt=p(e),R=n(e,"H2",{class:!0});var Jt=a(R);se=n(Jt,"A",{id:!0,class:!0,href:!0});var ka=a(se);Lo=n(ka,"SPAN",{});var za=a(Lo);y(ze.$$.fragment,za),za.forEach(t),ka.forEach(t),Ps=p(Jt),Wo=n(Jt,"SPAN",{});var Oa=a(Wo);Js=i(Oa,"YolosConfig"),Oa.forEach(t),Jt.forEach(t),$t=p(e),M=n(e,"DIV",{class:!0});var ve=a(M);y(Oe.$$.fragment,ve),Fs=p(ve),A=n(ve,"P",{});var Io=a(A);Ds=i(Io,"This is the configuration class to store the configuration of a "),vo=n(Io,"A",{href:!0});var Pa=a(vo);Ns=i(Pa,"YolosModel"),Pa.forEach(t),Ss=i(Io,`. It is used to instantiate a YOLOS
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 YOLOS
`),Pe=n(Io,"A",{href:!0,rel:!0});var Ja=a(Pe);Ls=i(Ja,"hustvl/yolos-base"),Ja.forEach(t),Ws=i(Io," architecture."),Io.forEach(t),Rs=p(ve),Z=n(ve,"P",{});var Uo=a(Z);As=i(Uo,"Configuration objects inherit from "),wo=n(Uo,"A",{href:!0});var Fa=a(wo);Zs=i(Fa,"PretrainedConfig"),Fa.forEach(t),Vs=i(Uo,` and can be used to control the model outputs. Read the
documentation from `),To=n(Uo,"A",{href:!0});var Da=a(To);qs=i(Da,"PretrainedConfig"),Da.forEach(t),Gs=i(Uo," for more information."),Uo.forEach(t),Bs=p(ve),y(ne.$$.fragment,ve),ve.forEach(t),jt=p(e),V=n(e,"H2",{class:!0});var Ft=a(V);ae=n(Ft,"A",{id:!0,class:!0,href:!0});var Na=a(ae);Ro=n(Na,"SPAN",{});var Sa=a(Ro);y(Je.$$.fragment,Sa),Sa.forEach(t),Na.forEach(t),Qs=p(Ft),Ao=n(Ft,"SPAN",{});var La=a(Ao);Xs=i(La,"YolosImageProcessor"),La.forEach(t),Ft.forEach(t),xt=p(e),Y=n(e,"DIV",{class:!0});var N=a(Y);y(Fe.$$.fragment,N),Hs=p(N),Zo=n(N,"P",{});var Wa=a(Zo);Ks=i(Wa,"Constructs a Detr image processor."),Wa.forEach(t),en=p(N),re=n(N,"DIV",{class:!0});var Dt=a(re);y(De.$$.fragment,Dt),on=p(Dt),Vo=n(Dt,"P",{});var Ra=a(Vo);tn=i(Ra,"Preprocess an image or a batch of images so that it can be used by the model."),Ra.forEach(t),Dt.forEach(t),sn=p(N),ie=n(N,"DIV",{class:!0});var Nt=a(ie);y(Ne.$$.fragment,Nt),nn=p(Nt),qo=n(Nt,"P",{});var Aa=a(qo);an=i(Aa,`Pads a batch of images to the bottom and right of the image with zeros to the size of largest height and width
in the batch and optionally returns their corresponding pixel mask.`),Aa.forEach(t),Nt.forEach(t),rn=p(N),le=n(N,"DIV",{class:!0});var St=a(le);y(Se.$$.fragment,St),ln=p(St),Le=n(St,"P",{});var Lt=a(Le);cn=i(Lt,"Converts the raw output of "),$o=n(Lt,"A",{href:!0});var Za=a($o);dn=i(Za,"YolosForObjectDetection"),Za.forEach(t),mn=i(Lt,` into final bounding boxes in (top_left_x, top_left_y,
bottom_right_x, bottom_right_y) format. Only supports PyTorch.`),Lt.forEach(t),St.forEach(t),N.forEach(t),Yt=p(e),q=n(e,"H2",{class:!0});var Wt=a(q);ce=n(Wt,"A",{id:!0,class:!0,href:!0});var Va=a(ce);Go=n(Va,"SPAN",{});var qa=a(Go);y(We.$$.fragment,qa),qa.forEach(t),Va.forEach(t),pn=p(Wt),Bo=n(Wt,"SPAN",{});var Ga=a(Bo);hn=i(Ga,"YolosFeatureExtractor"),Ga.forEach(t),Wt.forEach(t),Mt=p(e),E=n(e,"DIV",{class:!0});var we=a(E);y(Re.$$.fragment,we),fn=p(we),de=n(we,"DIV",{class:!0});var Rt=a(de);y(Ae.$$.fragment,Rt),gn=p(Rt),Qo=n(Rt,"P",{});var Ba=a(Qo);un=i(Ba,"Preprocess an image or a batch of images."),Ba.forEach(t),Rt.forEach(t),_n=p(we),me=n(we,"DIV",{class:!0});var At=a(me);y(Ze.$$.fragment,At),bn=p(At),Xo=n(At,"P",{});var Qa=a(Xo);yn=i(Qa,`Pads a batch of images to the bottom and right of the image with zeros to the size of largest height and width
in the batch and optionally returns their corresponding pixel mask.`),Qa.forEach(t),At.forEach(t),vn=p(we),pe=n(we,"DIV",{class:!0});var Zt=a(pe);y(Ve.$$.fragment,Zt),wn=p(Zt),qe=n(Zt,"P",{});var Vt=a(qe);Tn=i(Vt,"Converts the raw output of "),jo=n(Vt,"A",{href:!0});var Xa=a(jo);$n=i(Xa,"YolosForObjectDetection"),Xa.forEach(t),jn=i(Vt,` into final bounding boxes in (top_left_x, top_left_y,
bottom_right_x, bottom_right_y) format. Only supports PyTorch.`),Vt.forEach(t),Zt.forEach(t),we.forEach(t),Et=p(e),G=n(e,"H2",{class:!0});var qt=a(G);he=n(qt,"A",{id:!0,class:!0,href:!0});var Ha=a(he);Ho=n(Ha,"SPAN",{});var Ka=a(Ho);y(Ge.$$.fragment,Ka),Ka.forEach(t),Ha.forEach(t),xn=p(qt),Ko=n(qt,"SPAN",{});var er=a(Ko);Yn=i(er,"YolosModel"),er.forEach(t),qt.forEach(t),Ct=p(e),J=n(e,"DIV",{class:!0});var ko=a(J);y(Be.$$.fragment,ko),Mn=p(ko),Qe=n(ko,"P",{});var Gt=a(Qe);En=i(Gt,`The bare YOLOS Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Xe=n(Gt,"A",{href:!0,rel:!0});var or=a(Xe);Cn=i(or,"torch.nn.Module"),or.forEach(t),In=i(Gt,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Gt.forEach(t),Un=p(ko),k=n(ko,"DIV",{class:!0});var Te=a(k);y(He.$$.fragment,Te),kn=p(Te),B=n(Te,"P",{});var zo=a(B);zn=i(zo,"The "),xo=n(zo,"A",{href:!0});var tr=a(xo);On=i(tr,"YolosModel"),tr.forEach(t),Pn=i(zo," forward method, overrides the "),et=n(zo,"CODE",{});var sr=a(et);Jn=i(sr,"__call__"),sr.forEach(t),Fn=i(zo," special method."),zo.forEach(t),Dn=p(Te),y(fe.$$.fragment,Te),Nn=p(Te),y(ge.$$.fragment,Te),Te.forEach(t),ko.forEach(t),It=p(e),Q=n(e,"H2",{class:!0});var Bt=a(Q);ue=n(Bt,"A",{id:!0,class:!0,href:!0});var nr=a(ue);ot=n(nr,"SPAN",{});var ar=a(ot);y(Ke.$$.fragment,ar),ar.forEach(t),nr.forEach(t),Sn=p(Bt),tt=n(Bt,"SPAN",{});var rr=a(tt);Ln=i(rr,"YolosForObjectDetection"),rr.forEach(t),Bt.forEach(t),Ut=p(e),C=n(e,"DIV",{class:!0});var $e=a(C);y(eo.$$.fragment,$e),Wn=p($e),st=n($e,"P",{});var ir=a(st);Rn=i(ir,"YOLOS Model (consisting of a ViT encoder) with object detection heads on top, for tasks such as COCO detection."),ir.forEach(t),An=p($e),oo=n($e,"P",{});var Qt=a(oo);Zn=i(Qt,"This model is a PyTorch "),to=n(Qt,"A",{href:!0,rel:!0});var lr=a(to);Vn=i(lr,"torch.nn.Module"),lr.forEach(t),qn=i(Qt,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Qt.forEach(t),Gn=p($e),z=n($e,"DIV",{class:!0});var je=a(z);y(so.$$.fragment,je),Bn=p(je),X=n(je,"P",{});var Oo=a(X);Qn=i(Oo,"The "),Yo=n(Oo,"A",{href:!0});var cr=a(Yo);Xn=i(cr,"YolosForObjectDetection"),cr.forEach(t),Hn=i(Oo," forward method, overrides the "),nt=n(Oo,"CODE",{});var dr=a(nt);Kn=i(dr,"__call__"),dr.forEach(t),ea=i(Oo," special method."),Oo.forEach(t),oa=p(je),y(_e.$$.fragment,je),ta=p(je),y(be.$$.fragment,je),je.forEach(t),$e.forEach(t),this.h()},h(){l(f,"name","hf:doc:metadata"),l(f,"content",JSON.stringify(xr)),l(g,"id","yolos"),l(g,"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"),l(g,"href","#yolos"),l(_,"class","relative group"),l(H,"id","overview"),l(H,"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"),l(H,"href","#overview"),l(S,"class","relative group"),l(Me,"href","https://arxiv.org/abs/2106.00666"),l(Me,"rel","nofollow"),l(ro,"href","vit"),l(po,"href","/docs/transformers/v4.31.0/en/model_doc/yolos#transformers.YolosImageProcessor"),l(ho,"href","detr"),ur(K.src,ia="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/yolos_architecture.png")||l(K,"src",ia),l(K,"alt","drawing"),l(K,"width","600"),l(fo,"href","https://arxiv.org/abs/2106.00666"),l(Ee,"href","https://huggingface.co/nielsr"),l(Ee,"rel","nofollow"),l(Ce,"href","https://github.com/hustvl/YOLOS"),l(Ce,"rel","nofollow"),l(oe,"id","resources"),l(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"),l(oe,"href","#resources"),l(L,"class","relative group"),l(uo,"href","/docs/transformers/v4.31.0/en/model_doc/yolos#transformers.YolosForObjectDetection"),l(ke,"href","https://github.com/NielsRogge/Transformers-Tutorials/tree/master/YOLOS"),l(ke,"rel","nofollow"),l(bo,"href","../tasks/object_detection"),l(se,"id","transformers.YolosConfig"),l(se,"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"),l(se,"href","#transformers.YolosConfig"),l(R,"class","relative group"),l(vo,"href","/docs/transformers/v4.31.0/en/model_doc/yolos#transformers.YolosModel"),l(Pe,"href","https://huggingface.co/hustvl/yolos-base"),l(Pe,"rel","nofollow"),l(wo,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(To,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ae,"id","transformers.YolosImageProcessor"),l(ae,"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"),l(ae,"href","#transformers.YolosImageProcessor"),l(V,"class","relative group"),l(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l($o,"href","/docs/transformers/v4.31.0/en/model_doc/yolos#transformers.YolosForObjectDetection"),l(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ce,"id","transformers.YolosFeatureExtractor"),l(ce,"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"),l(ce,"href","#transformers.YolosFeatureExtractor"),l(q,"class","relative group"),l(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(jo,"href","/docs/transformers/v4.31.0/en/model_doc/yolos#transformers.YolosForObjectDetection"),l(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(he,"id","transformers.YolosModel"),l(he,"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"),l(he,"href","#transformers.YolosModel"),l(G,"class","relative group"),l(Xe,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(Xe,"rel","nofollow"),l(xo,"href","/docs/transformers/v4.31.0/en/model_doc/yolos#transformers.YolosModel"),l(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ue,"id","transformers.YolosForObjectDetection"),l(ue,"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"),l(ue,"href","#transformers.YolosForObjectDetection"),l(Q,"class","relative group"),l(to,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(to,"rel","nofollow"),l(Yo,"href","/docs/transformers/v4.31.0/en/model_doc/yolos#transformers.YolosForObjectDetection"),l(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(C,"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,d){o(document.head,f),h(e,x,d),h(e,_,d),o(_,g),o(g,j),v(c,j,null),o(_,u),o(_,O),o(O,Xt),h(e,lt,d),h(e,S,d),o(S,H),o(H,Po),v(Ye,Po,null),o(S,Ht),o(S,Jo),o(Jo,Kt),h(e,ct,d),h(e,F,d),o(F,es),o(F,Me),o(Me,os),o(F,ts),o(F,ro),o(ro,ss),o(F,ns),h(e,dt,d),h(e,io,d),o(io,as),h(e,mt,d),h(e,lo,d),o(lo,Fo),o(Fo,rs),h(e,pt,d),h(e,co,d),o(co,is),h(e,ht,d),h(e,mo,d),o(mo,P),o(P,ls),o(P,po),o(po,cs),o(P,ds),o(P,ho),o(ho,ms),o(P,ps),o(P,Do),o(Do,hs),o(P,fs),h(e,ft,d),h(e,K,d),h(e,gt,d),h(e,ee,d),o(ee,gs),o(ee,fo),o(fo,us),o(ee,_s),h(e,ut,d),h(e,D,d),o(D,bs),o(D,Ee),o(Ee,ys),o(D,vs),o(D,Ce),o(Ce,ws),o(D,Ts),h(e,_t,d),h(e,L,d),o(L,oe),o(oe,No),v(Ie,No,null),o(L,$s),o(L,So),o(So,js),h(e,bt,d),h(e,go,d),o(go,xs),h(e,yt,d),v(Ue,e,d),h(e,vt,d),h(e,te,d),o(te,W),o(W,Ys),o(W,uo),o(uo,Ms),o(W,Es),o(W,ke),o(ke,Cs),o(W,Is),o(te,Us),o(te,_o),o(_o,ks),o(_o,bo),o(bo,zs),h(e,wt,d),h(e,yo,d),o(yo,Os),h(e,Tt,d),h(e,R,d),o(R,se),o(se,Lo),v(ze,Lo,null),o(R,Ps),o(R,Wo),o(Wo,Js),h(e,$t,d),h(e,M,d),v(Oe,M,null),o(M,Fs),o(M,A),o(A,Ds),o(A,vo),o(vo,Ns),o(A,Ss),o(A,Pe),o(Pe,Ls),o(A,Ws),o(M,Rs),o(M,Z),o(Z,As),o(Z,wo),o(wo,Zs),o(Z,Vs),o(Z,To),o(To,qs),o(Z,Gs),o(M,Bs),v(ne,M,null),h(e,jt,d),h(e,V,d),o(V,ae),o(ae,Ro),v(Je,Ro,null),o(V,Qs),o(V,Ao),o(Ao,Xs),h(e,xt,d),h(e,Y,d),v(Fe,Y,null),o(Y,Hs),o(Y,Zo),o(Zo,Ks),o(Y,en),o(Y,re),v(De,re,null),o(re,on),o(re,Vo),o(Vo,tn),o(Y,sn),o(Y,ie),v(Ne,ie,null),o(ie,nn),o(ie,qo),o(qo,an),o(Y,rn),o(Y,le),v(Se,le,null),o(le,ln),o(le,Le),o(Le,cn),o(Le,$o),o($o,dn),o(Le,mn),h(e,Yt,d),h(e,q,d),o(q,ce),o(ce,Go),v(We,Go,null),o(q,pn),o(q,Bo),o(Bo,hn),h(e,Mt,d),h(e,E,d),v(Re,E,null),o(E,fn),o(E,de),v(Ae,de,null),o(de,gn),o(de,Qo),o(Qo,un),o(E,_n),o(E,me),v(Ze,me,null),o(me,bn),o(me,Xo),o(Xo,yn),o(E,vn),o(E,pe),v(Ve,pe,null),o(pe,wn),o(pe,qe),o(qe,Tn),o(qe,jo),o(jo,$n),o(qe,jn),h(e,Et,d),h(e,G,d),o(G,he),o(he,Ho),v(Ge,Ho,null),o(G,xn),o(G,Ko),o(Ko,Yn),h(e,Ct,d),h(e,J,d),v(Be,J,null),o(J,Mn),o(J,Qe),o(Qe,En),o(Qe,Xe),o(Xe,Cn),o(Qe,In),o(J,Un),o(J,k),v(He,k,null),o(k,kn),o(k,B),o(B,zn),o(B,xo),o(xo,On),o(B,Pn),o(B,et),o(et,Jn),o(B,Fn),o(k,Dn),v(fe,k,null),o(k,Nn),v(ge,k,null),h(e,It,d),h(e,Q,d),o(Q,ue),o(ue,ot),v(Ke,ot,null),o(Q,Sn),o(Q,tt),o(tt,Ln),h(e,Ut,d),h(e,C,d),v(eo,C,null),o(C,Wn),o(C,st),o(st,Rn),o(C,An),o(C,oo),o(oo,Zn),o(oo,to),o(to,Vn),o(oo,qn),o(C,Gn),o(C,z),v(so,z,null),o(z,Bn),o(z,X),o(X,Qn),o(X,Yo),o(Yo,Xn),o(X,Hn),o(X,nt),o(nt,Kn),o(X,ea),o(z,oa),v(_e,z,null),o(z,ta),v(be,z,null),kt=!0},p(e,[d]){const no={};d&2&&(no.$$scope={dirty:d,ctx:e}),ne.$set(no);const at={};d&2&&(at.$$scope={dirty:d,ctx:e}),fe.$set(at);const rt={};d&2&&(rt.$$scope={dirty:d,ctx:e}),ge.$set(rt);const it={};d&2&&(it.$$scope={dirty:d,ctx:e}),_e.$set(it);const ao={};d&2&&(ao.$$scope={dirty:d,ctx:e}),be.$set(ao)},i(e){kt||(w(c.$$.fragment,e),w(Ye.$$.fragment,e),w(Ie.$$.fragment,e),w(Ue.$$.fragment,e),w(ze.$$.fragment,e),w(Oe.$$.fragment,e),w(ne.$$.fragment,e),w(Je.$$.fragment,e),w(Fe.$$.fragment,e),w(De.$$.fragment,e),w(Ne.$$.fragment,e),w(Se.$$.fragment,e),w(We.$$.fragment,e),w(Re.$$.fragment,e),w(Ae.$$.fragment,e),w(Ze.$$.fragment,e),w(Ve.$$.fragment,e),w(Ge.$$.fragment,e),w(Be.$$.fragment,e),w(He.$$.fragment,e),w(fe.$$.fragment,e),w(ge.$$.fragment,e),w(Ke.$$.fragment,e),w(eo.$$.fragment,e),w(so.$$.fragment,e),w(_e.$$.fragment,e),w(be.$$.fragment,e),kt=!0)},o(e){T(c.$$.fragment,e),T(Ye.$$.fragment,e),T(Ie.$$.fragment,e),T(Ue.$$.fragment,e),T(ze.$$.fragment,e),T(Oe.$$.fragment,e),T(ne.$$.fragment,e),T(Je.$$.fragment,e),T(Fe.$$.fragment,e),T(De.$$.fragment,e),T(Ne.$$.fragment,e),T(Se.$$.fragment,e),T(We.$$.fragment,e),T(Re.$$.fragment,e),T(Ae.$$.fragment,e),T(Ze.$$.fragment,e),T(Ve.$$.fragment,e),T(Ge.$$.fragment,e),T(Be.$$.fragment,e),T(He.$$.fragment,e),T(fe.$$.fragment,e),T(ge.$$.fragment,e),T(Ke.$$.fragment,e),T(eo.$$.fragment,e),T(so.$$.fragment,e),T(_e.$$.fragment,e),T(be.$$.fragment,e),kt=!1},d(e){t(f),e&&t(x),e&&t(_),$(c),e&&t(lt),e&&t(S),$(Ye),e&&t(ct),e&&t(F),e&&t(dt),e&&t(io),e&&t(mt),e&&t(lo),e&&t(pt),e&&t(co),e&&t(ht),e&&t(mo),e&&t(ft),e&&t(K),e&&t(gt),e&&t(ee),e&&t(ut),e&&t(D),e&&t(_t),e&&t(L),$(Ie),e&&t(bt),e&&t(go),e&&t(yt),$(Ue,e),e&&t(vt),e&&t(te),e&&t(wt),e&&t(yo),e&&t(Tt),e&&t(R),$(ze),e&&t($t),e&&t(M),$(Oe),$(ne),e&&t(jt),e&&t(V),$(Je),e&&t(xt),e&&t(Y),$(Fe),$(De),$(Ne),$(Se),e&&t(Yt),e&&t(q),$(We),e&&t(Mt),e&&t(E),$(Re),$(Ae),$(Ze),$(Ve),e&&t(Et),e&&t(G),$(Ge),e&&t(Ct),e&&t(J),$(Be),$(He),$(fe),$(ge),e&&t(It),e&&t(Q),$(Ke),e&&t(Ut),e&&t(C),$(eo),$(so),$(_e),$(be)}}}const xr={local:"yolos",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{local:"transformers.YolosConfig",title:"YolosConfig"},{local:"transformers.YolosImageProcessor",title:"YolosImageProcessor"},{local:"transformers.YolosFeatureExtractor",title:"YolosFeatureExtractor"},{local:"transformers.YolosModel",title:"YolosModel"},{local:"transformers.YolosForObjectDetection",title:"YolosForObjectDetection"}],title:"YOLOS"};function Yr(U){return _r(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Or extends pr{constructor(f){super();hr(this,f,Yr,jr,fr,{})}}export{Or as default,xr as metadata};
