import{S as pr,i as hr,s as fr,e as s,k as m,w as b,t as r,M as ur,c as n,d as t,m as p,a,x as y,h as i,b as l,N as gr,G as o,g as h,y as v,q as w,o as T,B as x,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 je}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,j,_,u,$;return u=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"),j=r("Example:"),_=m(),b(u.$$.fragment)},l(c){f=n(c,"P",{});var g=a(f);j=i(g,"Example:"),g.forEach(t),_=p(c),y(u.$$.fragment,c)},m(c,g){h(c,f,g),o(f,j),h(c,_,g),v(u,c,g),$=!0},p:aa,i(c){$||(w(u.$$.fragment,c),$=!0)},o(c){T(u.$$.fragment,c),$=!1},d(c){c&&t(f),c&&t(_),x(u,c)}}}function vr(U){let f,j,_,u,$;return{c(){f=s("p"),j=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s("code"),u=r("Module"),$=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 g=a(f);j=i(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n(g,"CODE",{});var z=a(_);u=i(z,"Module"),z.forEach(t),$=i(g,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),g.forEach(t)},m(c,g){h(c,f,g),o(f,j),o(f,_),o(_,u),o(f,$)},d(c){c&&t(f)}}}function wr(U){let f,j,_,u,$;return u=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"),j=r("Example:"),_=m(),b(u.$$.fragment)},l(c){f=n(c,"P",{});var g=a(f);j=i(g,"Example:"),g.forEach(t),_=p(c),y(u.$$.fragment,c)},m(c,g){h(c,f,g),o(f,j),h(c,_,g),v(u,c,g),$=!0},p:aa,i(c){$||(w(u.$$.fragment,c),$=!0)},o(c){T(u.$$.fragment,c),$=!1},d(c){c&&t(f),c&&t(_),x(u,c)}}}function Tr(U){let f,j,_,u,$;return{c(){f=s("p"),j=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s("code"),u=r("Module"),$=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 g=a(f);j=i(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n(g,"CODE",{});var z=a(_);u=i(z,"Module"),z.forEach(t),$=i(g,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),g.forEach(t)},m(c,g){h(c,f,g),o(f,j),o(f,_),o(_,u),o(f,$)},d(c){c&&t(f)}}}function xr(U){let f,j,_,u,$;return u=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"),j=r("Examples:"),_=m(),b(u.$$.fragment)},l(c){f=n(c,"P",{});var g=a(f);j=i(g,"Examples:"),g.forEach(t),_=p(c),y(u.$$.fragment,c)},m(c,g){h(c,f,g),o(f,j),h(c,_,g),v(u,c,g),$=!0},p:aa,i(c){$||(w(u.$$.fragment,c),$=!0)},o(c){T(u.$$.fragment,c),$=!1},d(c){c&&t(f),c&&t(_),x(u,c)}}}function $r(U){let f,j,_,u,$,c,g,z,Xt,lt,R,H,Po,Ye,Ht,Jo,Kt,ct,N,es,Me,os,ts,ro,ss,ns,dt,io,as,mt,lo,No,rs,pt,co,is,ht,mo,P,ls,po,cs,ds,ho,ms,ps,Do,hs,fs,ft,K,ia,ut,ee,us,fo,gs,_s,gt,D,bs,Ce,ys,vs,Ee,ws,Ts,_t,S,oe,Fo,Ie,xs,Ro,$s,bt,uo,js,yt,Ue,vt,te,L,Ys,go,Ms,Cs,ke,Es,Is,Us,_o,ks,bo,Os,wt,yo,zs,Tt,W,se,So,Oe,Ps,Lo,Js,xt,M,ze,Ns,A,Ds,vo,Fs,Rs,Pe,Ss,Ls,Ws,Z,As,wo,Zs,qs,To,Vs,Gs,Bs,ne,$t,q,ae,Wo,Je,Qs,Ao,Xs,jt,Y,Ne,Hs,Zo,Ks,en,re,De,on,qo,tn,sn,ie,Fe,nn,Vo,an,rn,le,Re,ln,Se,cn,xo,dn,mn,Yt,V,ce,Go,Le,pn,Bo,hn,Mt,C,We,fn,de,Ae,un,Qo,gn,_n,me,Ze,bn,Xo,yn,vn,pe,qe,wn,Ve,Tn,$o,xn,$n,Ct,G,he,Ho,Ge,jn,Ko,Yn,Et,J,Be,Mn,Qe,Cn,Xe,En,In,Un,k,He,kn,B,On,jo,zn,Pn,et,Jn,Nn,Dn,fe,Fn,ue,It,Q,ge,ot,Ke,Rn,tt,Sn,Ut,E,eo,Ln,st,Wn,An,oo,Zn,to,qn,Vn,Gn,O,so,Bn,X,Qn,Yo,Xn,Hn,nt,Kn,ea,oa,_e,ta,be,kt;return c=new je({}),Ye=new je({}),Ie=new je({}),Ue=new br({props:{pipeline:"object-detection"}}),Oe=new je({}),ze=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/main/src/transformers/models/yolos/configuration_yolos.py#L35"}}),ne=new na({props:{anchor:"transformers.YolosConfig.example",$$slots:{default:[yr]},$$scope:{ctx:U}}}),Je=new je({}),Ne=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/main/src/transformers/models/yolos/image_processing_yolos.py#L672"}}),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[transformers.utils.generic.TensorType, str, NoneType] = None"},{name:"data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension] = <ChannelDimension.FIRST: 'channels_first'>"},{name:"input_data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension, NoneType] = None"},{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"},{anchor:"transformers.YolosImageProcessor.preprocess.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>) &#x2014;
The channel dimension format for the input image. If unset, the channel dimension format is inferred
from the input image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li><code>&quot;none&quot;</code> or <code>ChannelDimension.NONE</code>: image in (height, width) format.</li>
</ul>`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/yolos/image_processing_yolos.py#L1010"}}),Fe=new I({props:{name:"pad",anchor:"transformers.YolosImageProcessor.pad",parameters:[{name:"images",val:": typing.List[numpy.ndarray]"},{name:"constant_values",val:": typing.Union[float, typing.Iterable[float]] = 0"},{name:"return_pixel_mask",val:": bool = False"},{name:"return_tensors",val:": typing.Union[transformers.utils.generic.TensorType, str, NoneType] = None"},{name:"data_format",val:": typing.Optional[transformers.image_utils.ChannelDimension] = None"},{name:"input_data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension, NoneType] = 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.constant_values",description:`<strong>constant_values</strong> (<code>float</code> or <code>Iterable[float]</code>, <em>optional</em>) &#x2014;
The value to use for the padding if <code>mode</code> is <code>&quot;constant&quot;</code>.`,name:"constant_values"},{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.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>) &#x2014;
The type of tensors to return. Can be one of:<ul>
<li>Unset: Return a list of <code>np.ndarray</code>.</li>
<li><code>TensorType.TENSORFLOW</code> or <code>&apos;tf&apos;</code>: Return a batch of type <code>tf.Tensor</code>.</li>
<li><code>TensorType.PYTORCH</code> or <code>&apos;pt&apos;</code>: Return a batch of type <code>torch.Tensor</code>.</li>
<li><code>TensorType.NUMPY</code> or <code>&apos;np&apos;</code>: Return a batch of type <code>np.ndarray</code>.</li>
<li><code>TensorType.JAX</code> or <code>&apos;jax&apos;</code>: Return a batch of type <code>jax.numpy.ndarray</code>.</li>
</ul>`,name:"return_tensors"},{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"},{anchor:"transformers.YolosImageProcessor.pad.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>) &#x2014;
The channel dimension format of the input image. If not provided, it will be inferred.`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/yolos/image_processing_yolos.py#L955"}}),Re=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/main/src/transformers/models/yolos/image_processing_yolos.py#L1286",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>
`}}),Le=new je({}),We=new I({props:{name:"class transformers.YolosFeatureExtractor",anchor:"transformers.YolosFeatureExtractor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/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/main/src/transformers/image_processing_utils.py#L544"}}),Ze=new I({props:{name:"pad",anchor:"transformers.YolosFeatureExtractor.pad",parameters:[{name:"images",val:": typing.List[numpy.ndarray]"},{name:"constant_values",val:": typing.Union[float, typing.Iterable[float]] = 0"},{name:"return_pixel_mask",val:": bool = False"},{name:"return_tensors",val:": typing.Union[transformers.utils.generic.TensorType, str, NoneType] = None"},{name:"data_format",val:": typing.Optional[transformers.image_utils.ChannelDimension] = None"},{name:"input_data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension, NoneType] = 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.constant_values",description:`<strong>constant_values</strong> (<code>float</code> or <code>Iterable[float]</code>, <em>optional</em>) &#x2014;
The value to use for the padding if <code>mode</code> is <code>&quot;constant&quot;</code>.`,name:"constant_values"},{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.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>) &#x2014;
The type of tensors to return. Can be one of:<ul>
<li>Unset: Return a list of <code>np.ndarray</code>.</li>
<li><code>TensorType.TENSORFLOW</code> or <code>&apos;tf&apos;</code>: Return a batch of type <code>tf.Tensor</code>.</li>
<li><code>TensorType.PYTORCH</code> or <code>&apos;pt&apos;</code>: Return a batch of type <code>torch.Tensor</code>.</li>
<li><code>TensorType.NUMPY</code> or <code>&apos;np&apos;</code>: Return a batch of type <code>np.ndarray</code>.</li>
<li><code>TensorType.JAX</code> or <code>&apos;jax&apos;</code>: Return a batch of type <code>jax.numpy.ndarray</code>.</li>
</ul>`,name:"return_tensors"},{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"},{anchor:"transformers.YolosFeatureExtractor.pad.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>) &#x2014;
The channel dimension format of the input image. If not provided, it will be inferred.`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/yolos/image_processing_yolos.py#L955"}}),qe=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/main/src/transformers/models/yolos/image_processing_yolos.py#L1286",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 je({}),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/main/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/main/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/main/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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/main/en/model_doc/donut#transformers.DonutFeatureExtractor.__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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/yolos/modeling_yolos.py#L625",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/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}}}),ue=new na({props:{anchor:"transformers.YolosModel.forward.example",$$slots:{default:[wr]},$$scope:{ctx:U}}}),Ke=new je({}),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/main/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/main/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/main/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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/main/en/model_doc/donut#transformers.DonutFeatureExtractor.__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/main/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/main/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/main/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:[xr]},$$scope:{ctx:U}}}),{c(){f=s("meta"),j=m(),_=s("h1"),u=s("a"),$=s("span"),b(c.$$.fragment),g=m(),z=s("span"),Xt=r("YOLOS"),lt=m(),R=s("h2"),H=s("a"),Po=s("span"),b(Ye.$$.fragment),Ht=m(),Jo=s("span"),Kt=r("Overview"),ct=m(),N=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"),No=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"),ut=m(),ee=s("small"),us=r("YOLOS architecture. Taken from the "),fo=s("a"),gs=r("original paper"),_s=r("."),gt=m(),D=s("p"),bs=r("This model was contributed by "),Ce=s("a"),ys=r("nielsr"),vs=r(". The original code can be found "),Ee=s("a"),ws=r("here"),Ts=r("."),_t=m(),S=s("h2"),oe=s("a"),Fo=s("span"),b(Ie.$$.fragment),xs=m(),Ro=s("span"),$s=r("Resources"),bt=m(),uo=s("p"),js=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"),L=s("li"),Ys=r("All example notebooks illustrating inference + fine-tuning "),go=s("a"),Ms=r("YolosForObjectDetection"),Cs=r(" on a custom dataset can be found "),ke=s("a"),Es=r("here"),Is=r("."),Us=m(),_o=s("li"),ks=r("See also: "),bo=s("a"),Os=r("Object detection task guide"),wt=m(),yo=s("p"),zs=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(),W=s("h2"),se=s("a"),So=s("span"),b(Oe.$$.fragment),Ps=m(),Lo=s("span"),Js=r("YolosConfig"),xt=m(),M=s("div"),b(ze.$$.fragment),Ns=m(),A=s("p"),Ds=r("This is the configuration class to store the configuration of a "),vo=s("a"),Fs=r("YolosModel"),Rs=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"),Ss=r("hustvl/yolos-base"),Ls=r(" architecture."),Ws=m(),Z=s("p"),As=r("Configuration objects inherit from "),wo=s("a"),Zs=r("PretrainedConfig"),qs=r(` and can be used to control the model outputs. Read the
documentation from `),To=s("a"),Vs=r("PretrainedConfig"),Gs=r(" for more information."),Bs=m(),b(ne.$$.fragment),$t=m(),q=s("h2"),ae=s("a"),Wo=s("span"),b(Je.$$.fragment),Qs=m(),Ao=s("span"),Xs=r("YolosImageProcessor"),jt=m(),Y=s("div"),b(Ne.$$.fragment),Hs=m(),Zo=s("p"),Ks=r("Constructs a Detr image processor."),en=m(),re=s("div"),b(De.$$.fragment),on=m(),qo=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(Fe.$$.fragment),nn=m(),Vo=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(Re.$$.fragment),ln=m(),Se=s("p"),cn=r("Converts the raw output of "),xo=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(),V=s("h2"),ce=s("a"),Go=s("span"),b(Le.$$.fragment),pn=m(),Bo=s("span"),hn=r("YolosFeatureExtractor"),Mt=m(),C=s("div"),b(We.$$.fragment),fn=m(),de=s("div"),b(Ae.$$.fragment),un=m(),Qo=s("p"),gn=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(qe.$$.fragment),wn=m(),Ve=s("p"),Tn=r("Converts the raw output of "),$o=s("a"),xn=r("YolosForObjectDetection"),$n=r(` into final bounding boxes in (top_left_x, top_left_y,
bottom_right_x, bottom_right_y) format. Only supports PyTorch.`),Ct=m(),G=s("h2"),he=s("a"),Ho=s("span"),b(Ge.$$.fragment),jn=m(),Ko=s("span"),Yn=r("YolosModel"),Et=m(),J=s("div"),b(Be.$$.fragment),Mn=m(),Qe=s("p"),Cn=r(`The bare YOLOS Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Xe=s("a"),En=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"),On=r("The "),jo=s("a"),zn=r("YolosModel"),Pn=r(" forward method, overrides the "),et=s("code"),Jn=r("__call__"),Nn=r(" special method."),Dn=m(),b(fe.$$.fragment),Fn=m(),b(ue.$$.fragment),It=m(),Q=s("h2"),ge=s("a"),ot=s("span"),b(Ke.$$.fragment),Rn=m(),tt=s("span"),Sn=r("YolosForObjectDetection"),Ut=m(),E=s("div"),b(eo.$$.fragment),Ln=m(),st=s("p"),Wn=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"),qn=r("torch.nn.Module"),Vn=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(),O=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=ur('[data-svelte="svelte-1phssyn"]',document.head);f=n(d,"META",{name:!0,content:!0}),d.forEach(t),j=p(e),_=n(e,"H1",{class:!0});var no=a(_);u=n(no,"A",{id:!0,class:!0,href:!0});var at=a(u);$=n(at,"SPAN",{});var rt=a($);y(c.$$.fragment,rt),rt.forEach(t),at.forEach(t),g=p(no),z=n(no,"SPAN",{});var it=a(z);Xt=i(it,"YOLOS"),it.forEach(t),no.forEach(t),lt=p(e),R=n(e,"H2",{class:!0});var ao=a(R);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),N=n(e,"P",{});var Mo=a(N);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);No=n(fa,"EM",{});var ua=a(No);rs=i(ua,"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."),ua.forEach(t),fa.forEach(t),pt=p(e),co=n(e,"P",{});var ga=a(co);is=i(ga,"Tips:"),ga.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}),ut=p(e),ee=n(e,"SMALL",{});var Ot=a(ee);us=i(Ot,"YOLOS architecture. Taken from the "),fo=n(Ot,"A",{href:!0});var wa=a(fo);gs=i(wa,"original paper"),wa.forEach(t),_s=i(Ot,"."),Ot.forEach(t),gt=p(e),D=n(e,"P",{});var Co=a(D);bs=i(Co,"This model was contributed by "),Ce=n(Co,"A",{href:!0,rel:!0});var Ta=a(Ce);ys=i(Ta,"nielsr"),Ta.forEach(t),vs=i(Co,". The original code can be found "),Ee=n(Co,"A",{href:!0,rel:!0});var xa=a(Ee);ws=i(xa,"here"),xa.forEach(t),Ts=i(Co,"."),Co.forEach(t),_t=p(e),S=n(e,"H2",{class:!0});var zt=a(S);oe=n(zt,"A",{id:!0,class:!0,href:!0});var $a=a(oe);Fo=n($a,"SPAN",{});var ja=a(Fo);y(Ie.$$.fragment,ja),ja.forEach(t),$a.forEach(t),xs=p(zt),Ro=n(zt,"SPAN",{});var Ya=a(Ro);$s=i(Ya,"Resources"),Ya.forEach(t),zt.forEach(t),bt=p(e),uo=n(e,"P",{});var Ma=a(uo);js=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);L=n(Pt,"LI",{});var Eo=a(L);Ys=i(Eo,"All example notebooks illustrating inference + fine-tuning "),go=n(Eo,"A",{href:!0});var Ca=a(go);Ms=i(Ca,"YolosForObjectDetection"),Ca.forEach(t),Cs=i(Eo," on a custom dataset can be found "),ke=n(Eo,"A",{href:!0,rel:!0});var Ea=a(ke);Es=i(Ea,"here"),Ea.forEach(t),Is=i(Eo,"."),Eo.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);Os=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);zs=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),W=n(e,"H2",{class:!0});var Jt=a(W);se=n(Jt,"A",{id:!0,class:!0,href:!0});var ka=a(se);So=n(ka,"SPAN",{});var Oa=a(So);y(Oe.$$.fragment,Oa),Oa.forEach(t),ka.forEach(t),Ps=p(Jt),Lo=n(Jt,"SPAN",{});var za=a(Lo);Js=i(za,"YolosConfig"),za.forEach(t),Jt.forEach(t),xt=p(e),M=n(e,"DIV",{class:!0});var ve=a(M);y(ze.$$.fragment,ve),Ns=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);Fs=i(Pa,"YolosModel"),Pa.forEach(t),Rs=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);Ss=i(Ja,"hustvl/yolos-base"),Ja.forEach(t),Ls=i(Io," architecture."),Io.forEach(t),Ws=p(ve),Z=n(ve,"P",{});var Uo=a(Z);As=i(Uo,"Configuration objects inherit from "),wo=n(Uo,"A",{href:!0});var Na=a(wo);Zs=i(Na,"PretrainedConfig"),Na.forEach(t),qs=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);Vs=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),$t=p(e),q=n(e,"H2",{class:!0});var Nt=a(q);ae=n(Nt,"A",{id:!0,class:!0,href:!0});var Fa=a(ae);Wo=n(Fa,"SPAN",{});var Ra=a(Wo);y(Je.$$.fragment,Ra),Ra.forEach(t),Fa.forEach(t),Qs=p(Nt),Ao=n(Nt,"SPAN",{});var Sa=a(Ao);Xs=i(Sa,"YolosImageProcessor"),Sa.forEach(t),Nt.forEach(t),jt=p(e),Y=n(e,"DIV",{class:!0});var F=a(Y);y(Ne.$$.fragment,F),Hs=p(F),Zo=n(F,"P",{});var La=a(Zo);Ks=i(La,"Constructs a Detr image processor."),La.forEach(t),en=p(F),re=n(F,"DIV",{class:!0});var Dt=a(re);y(De.$$.fragment,Dt),on=p(Dt),qo=n(Dt,"P",{});var Wa=a(qo);tn=i(Wa,"Preprocess an image or a batch of images so that it can be used by the model."),Wa.forEach(t),Dt.forEach(t),sn=p(F),ie=n(F,"DIV",{class:!0});var Ft=a(ie);y(Fe.$$.fragment,Ft),nn=p(Ft),Vo=n(Ft,"P",{});var Aa=a(Vo);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),Ft.forEach(t),rn=p(F),le=n(F,"DIV",{class:!0});var Rt=a(le);y(Re.$$.fragment,Rt),ln=p(Rt),Se=n(Rt,"P",{});var St=a(Se);cn=i(St,"Converts the raw output of "),xo=n(St,"A",{href:!0});var Za=a(xo);dn=i(Za,"YolosForObjectDetection"),Za.forEach(t),mn=i(St,` into final bounding boxes in (top_left_x, top_left_y,
bottom_right_x, bottom_right_y) format. Only supports PyTorch.`),St.forEach(t),Rt.forEach(t),F.forEach(t),Yt=p(e),V=n(e,"H2",{class:!0});var Lt=a(V);ce=n(Lt,"A",{id:!0,class:!0,href:!0});var qa=a(ce);Go=n(qa,"SPAN",{});var Va=a(Go);y(Le.$$.fragment,Va),Va.forEach(t),qa.forEach(t),pn=p(Lt),Bo=n(Lt,"SPAN",{});var Ga=a(Bo);hn=i(Ga,"YolosFeatureExtractor"),Ga.forEach(t),Lt.forEach(t),Mt=p(e),C=n(e,"DIV",{class:!0});var we=a(C);y(We.$$.fragment,we),fn=p(we),de=n(we,"DIV",{class:!0});var Wt=a(de);y(Ae.$$.fragment,Wt),un=p(Wt),Qo=n(Wt,"P",{});var Ba=a(Qo);gn=i(Ba,"Preprocess an image or a batch of images."),Ba.forEach(t),Wt.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(qe.$$.fragment,Zt),wn=p(Zt),Ve=n(Zt,"P",{});var qt=a(Ve);Tn=i(qt,"Converts the raw output of "),$o=n(qt,"A",{href:!0});var Xa=a($o);xn=i(Xa,"YolosForObjectDetection"),Xa.forEach(t),$n=i(qt,` into final bounding boxes in (top_left_x, top_left_y,
bottom_right_x, bottom_right_y) format. Only supports PyTorch.`),qt.forEach(t),Zt.forEach(t),we.forEach(t),Ct=p(e),G=n(e,"H2",{class:!0});var Vt=a(G);he=n(Vt,"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),jn=p(Vt),Ko=n(Vt,"SPAN",{});var er=a(Ko);Yn=i(er,"YolosModel"),er.forEach(t),Vt.forEach(t),Et=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);Cn=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);En=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 Oo=a(B);On=i(Oo,"The "),jo=n(Oo,"A",{href:!0});var tr=a(jo);zn=i(tr,"YolosModel"),tr.forEach(t),Pn=i(Oo," forward method, overrides the "),et=n(Oo,"CODE",{});var sr=a(et);Jn=i(sr,"__call__"),sr.forEach(t),Nn=i(Oo," special method."),Oo.forEach(t),Dn=p(Te),y(fe.$$.fragment,Te),Fn=p(Te),y(ue.$$.fragment,Te),Te.forEach(t),ko.forEach(t),It=p(e),Q=n(e,"H2",{class:!0});var Bt=a(Q);ge=n(Bt,"A",{id:!0,class:!0,href:!0});var nr=a(ge);ot=n(nr,"SPAN",{});var ar=a(ot);y(Ke.$$.fragment,ar),ar.forEach(t),nr.forEach(t),Rn=p(Bt),tt=n(Bt,"SPAN",{});var rr=a(tt);Sn=i(rr,"YolosForObjectDetection"),rr.forEach(t),Bt.forEach(t),Ut=p(e),E=n(e,"DIV",{class:!0});var xe=a(E);y(eo.$$.fragment,xe),Ln=p(xe),st=n(xe,"P",{});var ir=a(st);Wn=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(xe),oo=n(xe,"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);qn=i(lr,"torch.nn.Module"),lr.forEach(t),Vn=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(xe),O=n(xe,"DIV",{class:!0});var $e=a(O);y(so.$$.fragment,$e),Bn=p($e),X=n($e,"P",{});var zo=a(X);Qn=i(zo,"The "),Yo=n(zo,"A",{href:!0});var cr=a(Yo);Xn=i(cr,"YolosForObjectDetection"),cr.forEach(t),Hn=i(zo," forward method, overrides the "),nt=n(zo,"CODE",{});var dr=a(nt);Kn=i(dr,"__call__"),dr.forEach(t),ea=i(zo," special method."),zo.forEach(t),oa=p($e),y(_e.$$.fragment,$e),ta=p($e),y(be.$$.fragment,$e),$e.forEach(t),xe.forEach(t),this.h()},h(){l(f,"name","hf:doc:metadata"),l(f,"content",JSON.stringify(jr)),l(u,"id","yolos"),l(u,"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(u,"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(R,"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/main/en/model_doc/yolos#transformers.YolosImageProcessor"),l(ho,"href","detr"),gr(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(Ce,"href","https://huggingface.co/nielsr"),l(Ce,"rel","nofollow"),l(Ee,"href","https://github.com/hustvl/YOLOS"),l(Ee,"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(S,"class","relative group"),l(go,"href","/docs/transformers/main/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(W,"class","relative group"),l(vo,"href","/docs/transformers/main/en/model_doc/yolos#transformers.YolosModel"),l(Pe,"href","https://huggingface.co/hustvl/yolos-base"),l(Pe,"rel","nofollow"),l(wo,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),l(To,"href","/docs/transformers/main/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(q,"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(xo,"href","/docs/transformers/main/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(V,"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($o,"href","/docs/transformers/main/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(C,"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(jo,"href","/docs/transformers/main/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(ge,"id","transformers.YolosForObjectDetection"),l(ge,"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(ge,"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/main/en/model_doc/yolos#transformers.YolosForObjectDetection"),l(O,"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")},m(e,d){o(document.head,f),h(e,j,d),h(e,_,d),o(_,u),o(u,$),v(c,$,null),o(_,g),o(_,z),o(z,Xt),h(e,lt,d),h(e,R,d),o(R,H),o(H,Po),v(Ye,Po,null),o(R,Ht),o(R,Jo),o(Jo,Kt),h(e,ct,d),h(e,N,d),o(N,es),o(N,Me),o(Me,os),o(N,ts),o(N,ro),o(ro,ss),o(N,ns),h(e,dt,d),h(e,io,d),o(io,as),h(e,mt,d),h(e,lo,d),o(lo,No),o(No,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,ut,d),h(e,ee,d),o(ee,us),o(ee,fo),o(fo,gs),o(ee,_s),h(e,gt,d),h(e,D,d),o(D,bs),o(D,Ce),o(Ce,ys),o(D,vs),o(D,Ee),o(Ee,ws),o(D,Ts),h(e,_t,d),h(e,S,d),o(S,oe),o(oe,Fo),v(Ie,Fo,null),o(S,xs),o(S,Ro),o(Ro,$s),h(e,bt,d),h(e,uo,d),o(uo,js),h(e,yt,d),v(Ue,e,d),h(e,vt,d),h(e,te,d),o(te,L),o(L,Ys),o(L,go),o(go,Ms),o(L,Cs),o(L,ke),o(ke,Es),o(L,Is),o(te,Us),o(te,_o),o(_o,ks),o(_o,bo),o(bo,Os),h(e,wt,d),h(e,yo,d),o(yo,zs),h(e,Tt,d),h(e,W,d),o(W,se),o(se,So),v(Oe,So,null),o(W,Ps),o(W,Lo),o(Lo,Js),h(e,xt,d),h(e,M,d),v(ze,M,null),o(M,Ns),o(M,A),o(A,Ds),o(A,vo),o(vo,Fs),o(A,Rs),o(A,Pe),o(Pe,Ss),o(A,Ls),o(M,Ws),o(M,Z),o(Z,As),o(Z,wo),o(wo,Zs),o(Z,qs),o(Z,To),o(To,Vs),o(Z,Gs),o(M,Bs),v(ne,M,null),h(e,$t,d),h(e,q,d),o(q,ae),o(ae,Wo),v(Je,Wo,null),o(q,Qs),o(q,Ao),o(Ao,Xs),h(e,jt,d),h(e,Y,d),v(Ne,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,qo),o(qo,tn),o(Y,sn),o(Y,ie),v(Fe,ie,null),o(ie,nn),o(ie,Vo),o(Vo,an),o(Y,rn),o(Y,le),v(Re,le,null),o(le,ln),o(le,Se),o(Se,cn),o(Se,xo),o(xo,dn),o(Se,mn),h(e,Yt,d),h(e,V,d),o(V,ce),o(ce,Go),v(Le,Go,null),o(V,pn),o(V,Bo),o(Bo,hn),h(e,Mt,d),h(e,C,d),v(We,C,null),o(C,fn),o(C,de),v(Ae,de,null),o(de,un),o(de,Qo),o(Qo,gn),o(C,_n),o(C,me),v(Ze,me,null),o(me,bn),o(me,Xo),o(Xo,yn),o(C,vn),o(C,pe),v(qe,pe,null),o(pe,wn),o(pe,Ve),o(Ve,Tn),o(Ve,$o),o($o,xn),o(Ve,$n),h(e,Ct,d),h(e,G,d),o(G,he),o(he,Ho),v(Ge,Ho,null),o(G,jn),o(G,Ko),o(Ko,Yn),h(e,Et,d),h(e,J,d),v(Be,J,null),o(J,Mn),o(J,Qe),o(Qe,Cn),o(Qe,Xe),o(Xe,En),o(Qe,In),o(J,Un),o(J,k),v(He,k,null),o(k,kn),o(k,B),o(B,On),o(B,jo),o(jo,zn),o(B,Pn),o(B,et),o(et,Jn),o(B,Nn),o(k,Dn),v(fe,k,null),o(k,Fn),v(ue,k,null),h(e,It,d),h(e,Q,d),o(Q,ge),o(ge,ot),v(Ke,ot,null),o(Q,Rn),o(Q,tt),o(tt,Sn),h(e,Ut,d),h(e,E,d),v(eo,E,null),o(E,Ln),o(E,st),o(st,Wn),o(E,An),o(E,oo),o(oo,Zn),o(oo,to),o(to,qn),o(oo,Vn),o(E,Gn),o(E,O),v(so,O,null),o(O,Bn),o(O,X),o(X,Qn),o(X,Yo),o(Yo,Xn),o(X,Hn),o(X,nt),o(nt,Kn),o(X,ea),o(O,oa),v(_e,O,null),o(O,ta),v(be,O,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}),ue.$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(Oe.$$.fragment,e),w(ze.$$.fragment,e),w(ne.$$.fragment,e),w(Je.$$.fragment,e),w(Ne.$$.fragment,e),w(De.$$.fragment,e),w(Fe.$$.fragment,e),w(Re.$$.fragment,e),w(Le.$$.fragment,e),w(We.$$.fragment,e),w(Ae.$$.fragment,e),w(Ze.$$.fragment,e),w(qe.$$.fragment,e),w(Ge.$$.fragment,e),w(Be.$$.fragment,e),w(He.$$.fragment,e),w(fe.$$.fragment,e),w(ue.$$.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(Oe.$$.fragment,e),T(ze.$$.fragment,e),T(ne.$$.fragment,e),T(Je.$$.fragment,e),T(Ne.$$.fragment,e),T(De.$$.fragment,e),T(Fe.$$.fragment,e),T(Re.$$.fragment,e),T(Le.$$.fragment,e),T(We.$$.fragment,e),T(Ae.$$.fragment,e),T(Ze.$$.fragment,e),T(qe.$$.fragment,e),T(Ge.$$.fragment,e),T(Be.$$.fragment,e),T(He.$$.fragment,e),T(fe.$$.fragment,e),T(ue.$$.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(j),e&&t(_),x(c),e&&t(lt),e&&t(R),x(Ye),e&&t(ct),e&&t(N),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(ut),e&&t(ee),e&&t(gt),e&&t(D),e&&t(_t),e&&t(S),x(Ie),e&&t(bt),e&&t(uo),e&&t(yt),x(Ue,e),e&&t(vt),e&&t(te),e&&t(wt),e&&t(yo),e&&t(Tt),e&&t(W),x(Oe),e&&t(xt),e&&t(M),x(ze),x(ne),e&&t($t),e&&t(q),x(Je),e&&t(jt),e&&t(Y),x(Ne),x(De),x(Fe),x(Re),e&&t(Yt),e&&t(V),x(Le),e&&t(Mt),e&&t(C),x(We),x(Ae),x(Ze),x(qe),e&&t(Ct),e&&t(G),x(Ge),e&&t(Et),e&&t(J),x(Be),x(He),x(fe),x(ue),e&&t(It),e&&t(Q),x(Ke),e&&t(Ut),e&&t(E),x(eo),x(so),x(_e),x(be)}}}const jr={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 zr extends pr{constructor(f){super();hr(this,f,Yr,$r,fr,{})}}export{zr as default,jr as metadata};
