import{S as va,i as wa,s as Ta,e as n,k as m,w as v,t as r,M as Da,c as s,d as t,m as h,a,x as w,h as i,b as c,N as Ma,G as o,g as p,y as T,q as D,o as M,B as x,v as xa,L as vs}from"../../chunks/vendor-hf-doc-builder.js";import{T as ya}from"../../chunks/Tip-hf-doc-builder.js";import{D as fe}from"../../chunks/Docstring-hf-doc-builder.js";import{C as ws}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Le}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as ys}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function ja(k){let f,y,_,u,b;return u=new ws({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERldGFDb25maWclMkMlMjBEZXRhTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwREVUQSUyMFNlbnNlVGltZSUyRmRlZm9ybWFibGUtZGV0ciUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBEZXRhQ29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwbW9kZWwlMjAod2l0aCUyMHJhbmRvbSUyMHdlaWdodHMpJTIwZnJvbSUyMHRoZSUyMFNlbnNlVGltZSUyRmRlZm9ybWFibGUtZGV0ciUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwRGV0YU1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DetaConfig, DetaModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a DETA SenseTime/deformable-detr style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = DetaConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the SenseTime/deformable-detr style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DetaModel(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=n("p"),y=r("Examples:"),_=m(),v(u.$$.fragment)},l(l){f=s(l,"P",{});var g=a(f);y=i(g,"Examples:"),g.forEach(t),_=h(l),w(u.$$.fragment,l)},m(l,g){p(l,f,g),o(f,y),p(l,_,g),T(u,l,g),b=!0},p:vs,i(l){b||(D(u.$$.fragment,l),b=!0)},o(l){M(u.$$.fragment,l),b=!1},d(l){l&&t(f),l&&t(_),x(u,l)}}}function Ea(k){let f,y,_,u,b;return{c(){f=n("p"),y=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n("code"),u=r("Module"),b=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(l){f=s(l,"P",{});var g=a(f);y=i(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(g,"CODE",{});var F=a(_);u=i(F,"Module"),F.forEach(t),b=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(l,g){p(l,f,g),o(f,y),o(f,_),o(_,u),o(f,b)},d(l){l&&t(f)}}}function $a(k){let f,y,_,u,b;return u=new ws({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMERldGFNb2RlbCUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWltcG9ydCUyMHJlcXVlc3RzJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyam96aGFuZzk3JTJGZGV0YS1zd2luLWxhcmdlLW8zNjUlMjIpJTBBbW9kZWwlMjAlM0QlMjBEZXRhTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmpvemhhbmc5NyUyRmRldGEtc3dpbi1sYXJnZS1vMzY1JTIyJTJDJTIwdHdvX3N0YWdlJTNERmFsc2UpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQWxpc3QobGFzdF9oaWRkZW5fc3RhdGVzLnNoYXBlKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, DetaModel
<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;jozhang97/deta-swin-large-o365&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DetaModel.from_pretrained(<span class="hljs-string">&quot;jozhang97/deta-swin-large-o365&quot;</span>, two_stage=<span class="hljs-literal">False</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>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">900</span>, <span class="hljs-number">256</span>]`}}),{c(){f=n("p"),y=r("Examples:"),_=m(),v(u.$$.fragment)},l(l){f=s(l,"P",{});var g=a(f);y=i(g,"Examples:"),g.forEach(t),_=h(l),w(u.$$.fragment,l)},m(l,g){p(l,f,g),o(f,y),p(l,_,g),T(u,l,g),b=!0},p:vs,i(l){b||(D(u.$$.fragment,l),b=!0)},o(l){M(u.$$.fragment,l),b=!1},d(l){l&&t(f),l&&t(_),x(u,l)}}}function Ca(k){let f,y,_,u,b;return{c(){f=n("p"),y=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n("code"),u=r("Module"),b=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(l){f=s(l,"P",{});var g=a(f);y=i(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(g,"CODE",{});var F=a(_);u=i(F,"Module"),F.forEach(t),b=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(l,g){p(l,f,g),o(f,y),o(f,_),o(_,u),o(f,b)},d(l){l&&t(f)}}}function ka(k){let f,y,_,u,b;return u=new ws({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMERldGFGb3JPYmplY3REZXRlY3Rpb24lMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFpbXBvcnQlMjByZXF1ZXN0cyUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmpvemhhbmc5NyUyRmRldGEtc3dpbi1sYXJnZSUyMiklMEFtb2RlbCUyMCUzRCUyMERldGFGb3JPYmplY3REZXRlY3Rpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmpvemhhbmc5NyUyRmRldGEtc3dpbi1sYXJnZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEElMjMlMjBjb252ZXJ0JTIwb3V0cHV0cyUyMChib3VuZGluZyUyMGJveGVzJTIwYW5kJTIwY2xhc3MlMjBsb2dpdHMpJTIwdG8lMjBDT0NPJTIwQVBJJTBBdGFyZ2V0X3NpemVzJTIwJTNEJTIwdG9yY2gudGVuc29yKCU1QmltYWdlLnNpemUlNUIlM0ElM0EtMSU1RCU1RCklMEFyZXN1bHRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yLnBvc3RfcHJvY2Vzc19vYmplY3RfZGV0ZWN0aW9uKG91dHB1dHMlMkMlMjB0aHJlc2hvbGQlM0QwLjUlMkMlMjB0YXJnZXRfc2l6ZXMlM0R0YXJnZXRfc2l6ZXMpJTVCJTBBJTIwJTIwJTIwJTIwMCUwQSU1RCUwQWZvciUyMHNjb3JlJTJDJTIwbGFiZWwlMkMlMjBib3glMjBpbiUyMHppcChyZXN1bHRzJTVCJTIyc2NvcmVzJTIyJTVEJTJDJTIwcmVzdWx0cyU1QiUyMmxhYmVscyUyMiU1RCUyQyUyMHJlc3VsdHMlNUIlMjJib3hlcyUyMiU1RCklM0ElMEElMjAlMjAlMjAlMjBib3glMjAlM0QlMjAlNUJyb3VuZChpJTJDJTIwMiklMjBmb3IlMjBpJTIwaW4lMjBib3gudG9saXN0KCklNUQlMEElMjAlMjAlMjAlMjBwcmludCglMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBmJTIyRGV0ZWN0ZWQlMjAlN0Jtb2RlbC5jb25maWcuaWQybGFiZWwlNUJsYWJlbC5pdGVtKCklNUQlN0QlMjB3aXRoJTIwY29uZmlkZW5jZSUyMCUyMiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGYlMjIlN0Jyb3VuZChzY29yZS5pdGVtKCklMkMlMjAzKSU3RCUyMGF0JTIwbG9jYXRpb24lMjAlN0Jib3glN0QlMjIlMEElMjAlMjAlMjAlMjAp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, DetaForObjectDetection
<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;jozhang97/deta-swin-large&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DetaForObjectDetection.from_pretrained(<span class="hljs-string">&quot;jozhang97/deta-swin-large&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.5</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 cat <span class="hljs-keyword">with</span> confidence <span class="hljs-number">0.683</span> at location [<span class="hljs-number">345.85</span>, <span class="hljs-number">23.68</span>, <span class="hljs-number">639.86</span>, <span class="hljs-number">372.83</span>]
Detected cat <span class="hljs-keyword">with</span> confidence <span class="hljs-number">0.683</span> at location [<span class="hljs-number">8.8</span>, <span class="hljs-number">52.49</span>, <span class="hljs-number">316.93</span>, <span class="hljs-number">473.45</span>]
Detected remote <span class="hljs-keyword">with</span> confidence <span class="hljs-number">0.568</span> at location [<span class="hljs-number">40.02</span>, <span class="hljs-number">73.75</span>, <span class="hljs-number">175.96</span>, <span class="hljs-number">117.33</span>]
Detected remote <span class="hljs-keyword">with</span> confidence <span class="hljs-number">0.546</span> at location [<span class="hljs-number">333.68</span>, <span class="hljs-number">77.13</span>, <span class="hljs-number">370.12</span>, <span class="hljs-number">187.51</span>]`}}),{c(){f=n("p"),y=r("Examples:"),_=m(),v(u.$$.fragment)},l(l){f=s(l,"P",{});var g=a(f);y=i(g,"Examples:"),g.forEach(t),_=h(l),w(u.$$.fragment,l)},m(l,g){p(l,f,g),o(f,y),p(l,_,g),T(u,l,g),b=!0},p:vs,i(l){b||(D(u.$$.fragment,l),b=!0)},o(l){M(u.$$.fragment,l),b=!1},d(l){l&&t(f),l&&t(_),x(u,l)}}}function Ia(k){let f,y,_,u,b,l,g,F,Mt,qo,J,G,bo,ue,xt,yo,jt,Zo,N,Et,ge,$t,Ct,Ve,kt,It,Oo,Be,zt,Wo,Ge,vo,Ft,So,Xe,Nt,Lo,He,_e,Pt,Ye,Ut,At,Vo,X,Ts,Bo,H,Jt,Qe,Rt,qt,Go,P,Zt,be,Ot,Wt,ye,St,Lt,Xo,R,Y,wo,ve,Vt,To,Bt,Ho,Ke,Gt,Yo,Q,we,Xt,Te,Ht,Yt,Qt,eo,Kt,oo,en,Qo,to,on,Ko,q,K,Do,De,tn,Mo,nn,et,$,Me,sn,Z,an,no,rn,ln,xe,cn,dn,mn,O,hn,so,pn,fn,ao,un,gn,_n,ee,ot,W,oe,xo,je,bn,jo,yn,tt,C,Ee,vn,Eo,wn,Tn,te,$e,Dn,$o,Mn,xn,ne,Ce,jn,ke,En,ro,$n,Cn,nt,S,se,Co,Ie,kn,ko,In,st,j,ze,zn,Io,Fn,Nn,Fe,Pn,io,Un,An,Jn,Ne,Rn,Pe,qn,Zn,On,I,Ue,Wn,L,Sn,lo,Ln,Vn,zo,Bn,Gn,Xn,ae,Hn,re,at,V,ie,Fo,Ae,Yn,No,Qn,rt,E,Je,Kn,Po,es,os,Re,ts,co,ns,ss,as,qe,rs,Ze,is,ls,cs,z,Oe,ds,B,ms,mo,hs,ps,Uo,fs,us,gs,le,_s,ce,it;return l=new Le({}),ue=new Le({}),ve=new Le({}),De=new Le({}),Me=new fe({props:{name:"class transformers.DetaConfig",anchor:"transformers.DetaConfig",parameters:[{name:"backbone_config",val:" = None"},{name:"num_queries",val:" = 900"},{name:"max_position_embeddings",val:" = 2048"},{name:"encoder_layers",val:" = 6"},{name:"encoder_ffn_dim",val:" = 2048"},{name:"encoder_attention_heads",val:" = 8"},{name:"decoder_layers",val:" = 6"},{name:"decoder_ffn_dim",val:" = 1024"},{name:"decoder_attention_heads",val:" = 8"},{name:"encoder_layerdrop",val:" = 0.0"},{name:"is_encoder_decoder",val:" = True"},{name:"activation_function",val:" = 'relu'"},{name:"d_model",val:" = 256"},{name:"dropout",val:" = 0.1"},{name:"attention_dropout",val:" = 0.0"},{name:"activation_dropout",val:" = 0.0"},{name:"init_std",val:" = 0.02"},{name:"init_xavier_std",val:" = 1.0"},{name:"return_intermediate",val:" = True"},{name:"auxiliary_loss",val:" = False"},{name:"position_embedding_type",val:" = 'sine'"},{name:"num_feature_levels",val:" = 5"},{name:"encoder_n_points",val:" = 4"},{name:"decoder_n_points",val:" = 4"},{name:"two_stage",val:" = True"},{name:"two_stage_num_proposals",val:" = 300"},{name:"with_box_refine",val:" = True"},{name:"assign_first_stage",val:" = True"},{name:"class_cost",val:" = 1"},{name:"bbox_cost",val:" = 5"},{name:"giou_cost",val:" = 2"},{name:"mask_loss_coefficient",val:" = 1"},{name:"dice_loss_coefficient",val:" = 1"},{name:"bbox_loss_coefficient",val:" = 5"},{name:"giou_loss_coefficient",val:" = 2"},{name:"eos_coefficient",val:" = 0.1"},{name:"focal_alpha",val:" = 0.25"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DetaConfig.backbone_config",description:`<strong>backbone_config</strong> (<code>PretrainedConfig</code> or <code>dict</code>, <em>optional</em>, defaults to <code>ResNetConfig()</code>) &#x2014;
The configuration of the backbone model.`,name:"backbone_config"},{anchor:"transformers.DetaConfig.num_queries",description:`<strong>num_queries</strong> (<code>int</code>, <em>optional</em>, defaults to 900) &#x2014;
Number of object queries, i.e. detection slots. This is the maximal number of objects <a href="/docs/transformers/v4.33.0/en/model_doc/deta#transformers.DetaModel">DetaModel</a> can
detect in a single image. In case <code>two_stage</code> is set to <code>True</code>, we use <code>two_stage_num_proposals</code> instead.`,name:"num_queries"},{anchor:"transformers.DetaConfig.d_model",description:`<strong>d_model</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimension of the layers.`,name:"d_model"},{anchor:"transformers.DetaConfig.encoder_layers",description:`<strong>encoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 6) &#x2014;
Number of encoder layers.`,name:"encoder_layers"},{anchor:"transformers.DetaConfig.decoder_layers",description:`<strong>decoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 6) &#x2014;
Number of decoder layers.`,name:"decoder_layers"},{anchor:"transformers.DetaConfig.encoder_attention_heads",description:`<strong>encoder_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"encoder_attention_heads"},{anchor:"transformers.DetaConfig.decoder_attention_heads",description:`<strong>decoder_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
Number of attention heads for each attention layer in the Transformer decoder.`,name:"decoder_attention_heads"},{anchor:"transformers.DetaConfig.decoder_ffn_dim",description:`<strong>decoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
Dimension of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in decoder.`,name:"decoder_ffn_dim"},{anchor:"transformers.DetaConfig.encoder_ffn_dim",description:`<strong>encoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
Dimension of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in decoder.`,name:"encoder_ffn_dim"},{anchor:"transformers.DetaConfig.activation_function",description:`<strong>activation_function</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;relu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"activation_function"},{anchor:"transformers.DetaConfig.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"dropout"},{anchor:"transformers.DetaConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.DetaConfig.activation_dropout",description:`<strong>activation_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for activations inside the fully connected layer.`,name:"activation_dropout"},{anchor:"transformers.DetaConfig.init_std",description:`<strong>init_std</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"init_std"},{anchor:"transformers.DetaConfig.init_xavier_std",description:`<strong>init_xavier_std</strong> (<code>float</code>, <em>optional</em>, defaults to 1) &#x2014;
The scaling factor used for the Xavier initialization gain in the HM Attention map module.`,name:"init_xavier_std"},{anchor:"transformers.DetaConfig.encoder_layerdrop",description:`<strong>encoder_layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The LayerDrop probability for the encoder. See the [LayerDrop paper](see <a href="https://arxiv.org/abs/1909.11556" rel="nofollow">https://arxiv.org/abs/1909.11556</a>)
for more details.`,name:"encoder_layerdrop"},{anchor:"transformers.DetaConfig.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.DetaConfig.position_embedding_type",description:`<strong>position_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;sine&quot;</code>) &#x2014;
Type of position embeddings to be used on top of the image features. One of <code>&quot;sine&quot;</code> or <code>&quot;learned&quot;</code>.`,name:"position_embedding_type"},{anchor:"transformers.DetaConfig.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.DetaConfig.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.DetaConfig.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.DetaConfig.mask_loss_coefficient",description:`<strong>mask_loss_coefficient</strong> (<code>float</code>, <em>optional</em>, defaults to 1) &#x2014;
Relative weight of the Focal loss in the panoptic segmentation loss.`,name:"mask_loss_coefficient"},{anchor:"transformers.DetaConfig.dice_loss_coefficient",description:`<strong>dice_loss_coefficient</strong> (<code>float</code>, <em>optional</em>, defaults to 1) &#x2014;
Relative weight of the DICE/F-1 loss in the panoptic segmentation loss.`,name:"dice_loss_coefficient"},{anchor:"transformers.DetaConfig.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.DetaConfig.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.DetaConfig.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"},{anchor:"transformers.DetaConfig.num_feature_levels",description:`<strong>num_feature_levels</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
The number of input feature levels.`,name:"num_feature_levels"},{anchor:"transformers.DetaConfig.encoder_n_points",description:`<strong>encoder_n_points</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
The number of sampled keys in each feature level for each attention head in the encoder.`,name:"encoder_n_points"},{anchor:"transformers.DetaConfig.decoder_n_points",description:`<strong>decoder_n_points</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
The number of sampled keys in each feature level for each attention head in the decoder.`,name:"decoder_n_points"},{anchor:"transformers.DetaConfig.two_stage",description:`<strong>two_stage</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to apply a two-stage deformable DETR, where the region proposals are also generated by a variant of
DETA, which are further fed into the decoder for iterative bounding box refinement.`,name:"two_stage"},{anchor:"transformers.DetaConfig.two_stage_num_proposals",description:`<strong>two_stage_num_proposals</strong> (<code>int</code>, <em>optional</em>, defaults to 300) &#x2014;
The number of region proposals to be generated, in case <code>two_stage</code> is set to <code>True</code>.`,name:"two_stage_num_proposals"},{anchor:"transformers.DetaConfig.with_box_refine",description:`<strong>with_box_refine</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to apply iterative bounding box refinement, where each decoder layer refines the bounding boxes
based on the predictions from the previous layer.`,name:"with_box_refine"},{anchor:"transformers.DetaConfig.focal_alpha",description:`<strong>focal_alpha</strong> (<code>float</code>, <em>optional</em>, defaults to 0.25) &#x2014;
Alpha parameter in the focal loss.`,name:"focal_alpha"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/deta/configuration_deta.py#L30"}}),ee=new ys({props:{anchor:"transformers.DetaConfig.example",$$slots:{default:[ja]},$$scope:{ctx:k}}}),je=new Le({}),Ee=new fe({props:{name:"class transformers.DetaImageProcessor",anchor:"transformers.DetaImageProcessor",parameters:[{name:"format",val:": typing.Union[str, transformers.models.deta.image_processing_deta.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.DetaImageProcessor.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.DetaImageProcessor.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.DetaImageProcessor.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.DetaImageProcessor.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.DetaImageProcessor.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.DetaImageProcessor.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.DetaImageProcessor.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.DetaImageProcessor.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.DetaImageProcessor.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.33.0/src/transformers/models/deta/image_processing_deta.py#L468"}}),$e=new fe({props:{name:"preprocess",anchor:"transformers.DetaImageProcessor.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.List[typing.Dict], typing.List[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.deta.image_processing_deta.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:"input_data_format",val:": typing.Union[transformers.image_utils.ChannelDimension, str, NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DetaImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image or batch of images to preprocess. Expects a single or batch of images with pixel values ranging
from 0 to 255. If passing in images with pixel values between 0 and 1, set <code>do_rescale=False</code>.`,name:"images"},{anchor:"transformers.DetaImageProcessor.preprocess.annotations",description:`<strong>annotations</strong> (<code>List[Dict]</code> or <code>List[List[Dict]]</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.DetaImageProcessor.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.DetaImageProcessor.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.DetaImageProcessor.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.DetaImageProcessor.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.DetaImageProcessor.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.DetaImageProcessor.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.DetaImageProcessor.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.DetaImageProcessor.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.DetaImageProcessor.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.DetaImageProcessor.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.DetaImageProcessor.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.DetaImageProcessor.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.DetaImageProcessor.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.DetaImageProcessor.preprocess.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>, defaults to <code>ChannelDimension.FIRST</code>) &#x2014;
The channel dimension format for the output 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>Unset: Use the channel dimension format of the input image.</li>
</ul>`,name:"data_format"},{anchor:"transformers.DetaImageProcessor.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/v4.33.0/src/transformers/models/deta/image_processing_deta.py#L774"}}),Ce=new fe({props:{name:"post_process_object_detection",anchor:"transformers.DetaImageProcessor.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"},{name:"nms_threshold",val:": float = 0.7"}],parametersDescription:[{anchor:"transformers.DetaImageProcessor.post_process_object_detection.outputs",description:`<strong>outputs</strong> (<code>DetrObjectDetectionOutput</code>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.DetaImageProcessor.post_process_object_detection.threshold",description:`<strong>threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
Score threshold to keep object detection predictions.`,name:"threshold"},{anchor:"transformers.DetaImageProcessor.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
(height, width) of each image in the batch. If left to None, predictions will not be resized.`,name:"target_sizes"},{anchor:"transformers.DetaImageProcessor.post_process_object_detection.nms_threshold",description:`<strong>nms_threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.7) &#x2014;
NMS threshold.`,name:"nms_threshold"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/deta/image_processing_deta.py#L1011",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>
`}}),Ie=new Le({}),ze=new fe({props:{name:"class transformers.DetaModel",anchor:"transformers.DetaModel",parameters:[{name:"config",val:": DetaConfig"}],parametersDescription:[{anchor:"transformers.DetaModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/deta#transformers.DetaConfig">DetaConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/v4.33.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.33.0/src/transformers/models/deta/modeling_deta.py#L1367"}}),Ue=new fe({props:{name:"forward",anchor:"transformers.DetaModel.forward",parameters:[{name:"pixel_values",val:": FloatTensor"},{name:"pixel_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_outputs",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[torch.FloatTensor] = 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.DetaModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it.</p>
<p>Pixel values can be obtained using <a href="/docs/transformers/v4.33.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <code>AutoImageProcessor.__call__()</code> for details.`,name:"pixel_values"},{anchor:"transformers.DetaModel.forward.pixel_mask",description:`<strong>pixel_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, height, width)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding pixel values. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for pixels that are real (i.e. <strong>not masked</strong>),</li>
<li>0 for pixels that are padding (i.e. <strong>masked</strong>).</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"pixel_mask"},{anchor:"transformers.DetaModel.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_queries)</code>, <em>optional</em>) &#x2014;
Not used by default. Can be used to mask object queries.`,name:"decoder_attention_mask"},{anchor:"transformers.DetaModel.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.DetaModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing the flattened feature map (output of the backbone + projection layer), you
can choose to directly pass a flattened representation of an image.`,name:"inputs_embeds"},{anchor:"transformers.DetaModel.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_queries, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of initializing the queries with a tensor of zeros, you can choose to directly pass an
embedded representation.`,name:"decoder_inputs_embeds"},{anchor:"transformers.DetaModel.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.DetaModel.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.DetaModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.33.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.33.0/src/transformers/models/deta/modeling_deta.py#L1532",returnDescription:`
<p>A <code>transformers.models.deta.modeling_deta.DetaModelOutput</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.33.0/en/model_doc/deta#transformers.DetaConfig"
>DetaConfig</a>) and inputs.</p>
<ul>
<li><strong>init_reference_points</strong> (<code>torch.FloatTensor</code> of shape  <code>(batch_size, num_queries, 4)</code>) \u2014 Initial reference points sent through the Transformer decoder.</li>
<li><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_queries, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the decoder of the model.</li>
<li><strong>intermediate_hidden_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.decoder_layers, num_queries, hidden_size)</code>) \u2014 Stacked intermediate hidden states (output of each layer of the decoder).</li>
<li><strong>intermediate_reference_points</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.decoder_layers, num_queries, 4)</code>) \u2014 Stacked intermediate reference points (reference points of each layer of the decoder).</li>
<li><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, num_queries, hidden_size)</code>. Hidden-states of the decoder at the output of each layer
plus the initial embedding outputs.</li>
<li><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, num_queries, num_queries)</code>. Attentions weights of the decoder, after the attention softmax, used to compute the weighted
average in the self-attention heads.</li>
<li><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_queries, num_heads, 4, 4)</code>.
Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</li>
<li><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</li>
<li><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of the encoder at the output of each
layer plus the initial embedding outputs.</li>
<li><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_queries, num_heads, 4, 4)</code>.
Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</li>
<li><strong>enc_outputs_class</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>, <em>optional</em>, returned when <code>config.with_box_refine=True</code> and <code>config.two_stage=True</code>) \u2014 Predicted bounding boxes scores where the top <code>config.two_stage_num_proposals</code> scoring bounding boxes are
picked as region proposals in the first stage. Output of bounding box binary classification (i.e.
foreground and background).</li>
<li><strong>enc_outputs_coord_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, 4)</code>, <em>optional</em>, returned when <code>config.with_box_refine=True</code> and <code>config.two_stage=True</code>) \u2014 Logits of predicted bounding boxes coordinates in the first stage.</li>
</ul>
`,returnType:`
<p><code>transformers.models.deta.modeling_deta.DetaModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ae=new ya({props:{$$slots:{default:[Ea]},$$scope:{ctx:k}}}),re=new ys({props:{anchor:"transformers.DetaModel.forward.example",$$slots:{default:[$a]},$$scope:{ctx:k}}}),Ae=new Le({}),Je=new fe({props:{name:"class transformers.DetaForObjectDetection",anchor:"transformers.DetaForObjectDetection",parameters:[{name:"config",val:": DetaConfig"}],parametersDescription:[{anchor:"transformers.DetaForObjectDetection.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/deta#transformers.DetaConfig">DetaConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/v4.33.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.33.0/src/transformers/models/deta/modeling_deta.py#L1784"}}),Oe=new fe({props:{name:"forward",anchor:"transformers.DetaForObjectDetection.forward",parameters:[{name:"pixel_values",val:": FloatTensor"},{name:"pixel_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_outputs",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[typing.List[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.DetaForObjectDetection.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it.</p>
<p>Pixel values can be obtained using <a href="/docs/transformers/v4.33.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <code>AutoImageProcessor.__call__()</code> for details.`,name:"pixel_values"},{anchor:"transformers.DetaForObjectDetection.forward.pixel_mask",description:`<strong>pixel_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, height, width)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding pixel values. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for pixels that are real (i.e. <strong>not masked</strong>),</li>
<li>0 for pixels that are padding (i.e. <strong>masked</strong>).</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"pixel_mask"},{anchor:"transformers.DetaForObjectDetection.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_queries)</code>, <em>optional</em>) &#x2014;
Not used by default. Can be used to mask object queries.`,name:"decoder_attention_mask"},{anchor:"transformers.DetaForObjectDetection.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.DetaForObjectDetection.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing the flattened feature map (output of the backbone + projection layer), you
can choose to directly pass a flattened representation of an image.`,name:"inputs_embeds"},{anchor:"transformers.DetaForObjectDetection.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_queries, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of initializing the queries with a tensor of zeros, you can choose to directly pass an
embedded representation.`,name:"decoder_inputs_embeds"},{anchor:"transformers.DetaForObjectDetection.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.DetaForObjectDetection.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.DetaForObjectDetection.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.33.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.DetaForObjectDetection.forward.labels",description:`<strong>labels</strong> (<code>List[Dict]</code> of len <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the bipartite matching loss. List of dicts, each dictionary containing at least the
following 2 keys: &#x2018;class_labels&#x2019; and &#x2018;boxes&#x2019; (the class labels and bounding boxes of an image in the batch
respectively). The class labels themselves should be a <code>torch.LongTensor</code> of len <code>(number of bounding boxes in the image,)</code> and the boxes a <code>torch.FloatTensor</code> of shape <code>(number of bounding boxes in the image, 4)</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/deta/modeling_deta.py#L1837",returnDescription:`
<p>A <code>transformers.models.deta.modeling_deta.DetaObjectDetectionOutput</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.33.0/en/model_doc/deta#transformers.DetaConfig"
>DetaConfig</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>~DetaProcessor.post_process_object_detection</code> to retrieve the
unnormalized bounding boxes.</li>
<li><strong>auxiliary_outputs</strong> (<code>list[Dict]</code>, <em>optional</em>) \u2014 Optional, only returned when auxilary losses are activated (i.e. <code>config.auxiliary_loss</code> is set to <code>True</code>)
and labels are provided. It is a list of dictionaries containing the two above keys (<code>logits</code> and
<code>pred_boxes</code>) for each decoder layer.</li>
<li><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_queries, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the decoder of the model.</li>
<li><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, num_queries, hidden_size)</code>. Hidden-states of the decoder at the output of each layer
plus the initial embedding outputs.</li>
<li><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, num_queries, num_queries)</code>. Attentions weights of the decoder, after the attention softmax, used to compute the weighted
average in the self-attention heads.</li>
<li><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_queries, num_heads, 4, 4)</code>.
Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</li>
<li><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</li>
<li><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of the encoder at the output of each
layer plus the initial embedding outputs.</li>
<li><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, sequence_length, num_heads, 4, 4)</code>. Attentions weights of the encoder, after the attention softmax, used to compute the weighted average
in the self-attention heads.</li>
<li><strong>intermediate_hidden_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.decoder_layers, num_queries, hidden_size)</code>) \u2014 Stacked intermediate hidden states (output of each layer of the decoder).</li>
<li><strong>intermediate_reference_points</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.decoder_layers, num_queries, 4)</code>) \u2014 Stacked intermediate reference points (reference points of each layer of the decoder).</li>
<li><strong>init_reference_points</strong> (<code>torch.FloatTensor</code> of shape  <code>(batch_size, num_queries, 4)</code>) \u2014 Initial reference points sent through the Transformer decoder.</li>
<li><strong>enc_outputs_class</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>, <em>optional</em>, returned when <code>config.with_box_refine=True</code> and <code>config.two_stage=True</code>) \u2014 Predicted bounding boxes scores where the top <code>config.two_stage_num_proposals</code> scoring bounding boxes are
picked as region proposals in the first stage. Output of bounding box binary classification (i.e.
foreground and background).</li>
<li><strong>enc_outputs_coord_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, 4)</code>, <em>optional</em>, returned when <code>config.with_box_refine=True</code> and <code>config.two_stage=True</code>) \u2014 Logits of predicted bounding boxes coordinates in the first stage.</li>
</ul>
`,returnType:`
<p><code>transformers.models.deta.modeling_deta.DetaObjectDetectionOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),le=new ya({props:{$$slots:{default:[Ca]},$$scope:{ctx:k}}}),ce=new ys({props:{anchor:"transformers.DetaForObjectDetection.forward.example",$$slots:{default:[ka]},$$scope:{ctx:k}}}),{c(){f=n("meta"),y=m(),_=n("h1"),u=n("a"),b=n("span"),v(l.$$.fragment),g=m(),F=n("span"),Mt=r("DETA"),qo=m(),J=n("h2"),G=n("a"),bo=n("span"),v(ue.$$.fragment),xt=m(),yo=n("span"),jt=r("Overview"),Zo=m(),N=n("p"),Et=r("The DETA model was proposed in "),ge=n("a"),$t=r("NMS Strikes Back"),Ct=r(` by Jeffrey Ouyang-Zhang, Jang Hyun Cho, Xingyi Zhou, Philipp Kr\xE4henb\xFChl.
DETA (short for Detection Transformers with Assignment) improves `),Ve=n("a"),kt=r("Deformable DETR"),It=r(` by replacing the one-to-one bipartite Hungarian matching loss
with one-to-many label assignments used in traditional detectors with non-maximum suppression (NMS). This leads to significant gains of up to 2.5 mAP.`),Oo=m(),Be=n("p"),zt=r("The abstract from the paper is the following:"),Wo=m(),Ge=n("p"),vo=n("em"),Ft=r("Detection Transformer (DETR) directly transforms queries to unique objects by using one-to-one bipartite matching during training and enables end-to-end object detection. Recently, these models have surpassed traditional detectors on COCO with undeniable elegance. However, they differ from traditional detectors in multiple designs, including model architecture and training schedules, and thus the effectiveness of one-to-one matching is not fully understood. In this work, we conduct a strict comparison between the one-to-one Hungarian matching in DETRs and the one-to-many label assignments in traditional detectors with non-maximum supervision (NMS). Surprisingly, we observe one-to-many assignments with NMS consistently outperform standard one-to-one matching under the same setting, with a significant gain of up to 2.5 mAP. Our detector that trains Deformable-DETR with traditional IoU-based label assignment achieved 50.2 COCO mAP within 12 epochs (1x schedule) with ResNet50 backbone, outperforming all existing traditional or transformer-based detectors in this setting. On multiple datasets, schedules, and architectures, we consistently show bipartite matching is unnecessary for performant detection transformers. Furthermore, we attribute the success of detection transformers to their expressive transformer architecture."),So=m(),Xe=n("p"),Nt=r("Tips:"),Lo=m(),He=n("ul"),_e=n("li"),Pt=r("One can use "),Ye=n("a"),Ut=r("DetaImageProcessor"),At=r(" to prepare images and optional targets for the model."),Vo=m(),X=n("img"),Bo=m(),H=n("small"),Jt=r("DETA overview. Taken from the "),Qe=n("a"),Rt=r("original paper"),qt=r("."),Go=m(),P=n("p"),Zt=r("This model was contributed by "),be=n("a"),Ot=r("nielsr"),Wt=r(`.
The original code can be found `),ye=n("a"),St=r("here"),Lt=r("."),Xo=m(),R=n("h2"),Y=n("a"),wo=n("span"),v(ve.$$.fragment),Vt=m(),To=n("span"),Bt=r("Resources"),Ho=m(),Ke=n("p"),Gt=r("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with DETA."),Yo=m(),Q=n("ul"),we=n("li"),Xt=r("Demo notebooks for DETA can be found "),Te=n("a"),Ht=r("here"),Yt=r("."),Qt=m(),eo=n("li"),Kt=r("See also: "),oo=n("a"),en=r("Object detection task guide"),Qo=m(),to=n("p"),on=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."),Ko=m(),q=n("h2"),K=n("a"),Do=n("span"),v(De.$$.fragment),tn=m(),Mo=n("span"),nn=r("DetaConfig"),et=m(),$=n("div"),v(Me.$$.fragment),sn=m(),Z=n("p"),an=r("This is the configuration class to store the configuration of a "),no=n("a"),rn=r("DetaModel"),ln=r(`. It is used to instantiate a DETA
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 DETA
`),xe=n("a"),cn=r("SenseTime/deformable-detr"),dn=r(" architecture."),mn=m(),O=n("p"),hn=r("Configuration objects inherit from "),so=n("a"),pn=r("PretrainedConfig"),fn=r(` and can be used to control the model outputs. Read the
documentation from `),ao=n("a"),un=r("PretrainedConfig"),gn=r(" for more information."),_n=m(),v(ee.$$.fragment),ot=m(),W=n("h2"),oe=n("a"),xo=n("span"),v(je.$$.fragment),bn=m(),jo=n("span"),yn=r("DetaImageProcessor"),tt=m(),C=n("div"),v(Ee.$$.fragment),vn=m(),Eo=n("p"),wn=r("Constructs a Deformable DETR image processor."),Tn=m(),te=n("div"),v($e.$$.fragment),Dn=m(),$o=n("p"),Mn=r("Preprocess an image or a batch of images so that it can be used by the model."),xn=m(),ne=n("div"),v(Ce.$$.fragment),jn=m(),ke=n("p"),En=r("Converts the output of "),ro=n("a"),$n=r("DetaForObjectDetection"),Cn=r(` into final bounding boxes in (top_left_x, top_left_y,
bottom_right_x, bottom_right_y) format. Only supports PyTorch.`),nt=m(),S=n("h2"),se=n("a"),Co=n("span"),v(Ie.$$.fragment),kn=m(),ko=n("span"),In=r("DetaModel"),st=m(),j=n("div"),v(ze.$$.fragment),zn=m(),Io=n("p"),Fn=r(`The bare DETA Model (consisting of a backbone and encoder-decoder Transformer) outputting raw hidden-states without
any specific head on top.`),Nn=m(),Fe=n("p"),Pn=r("This model inherits from "),io=n("a"),Un=r("PreTrainedModel"),An=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Jn=m(),Ne=n("p"),Rn=r("This model is also a PyTorch "),Pe=n("a"),qn=r("torch.nn.Module"),Zn=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),On=m(),I=n("div"),v(Ue.$$.fragment),Wn=m(),L=n("p"),Sn=r("The "),lo=n("a"),Ln=r("DetaModel"),Vn=r(" forward method, overrides the "),zo=n("code"),Bn=r("__call__"),Gn=r(" special method."),Xn=m(),v(ae.$$.fragment),Hn=m(),v(re.$$.fragment),at=m(),V=n("h2"),ie=n("a"),Fo=n("span"),v(Ae.$$.fragment),Yn=m(),No=n("span"),Qn=r("DetaForObjectDetection"),rt=m(),E=n("div"),v(Je.$$.fragment),Kn=m(),Po=n("p"),es=r(`DETA Model (consisting of a backbone and encoder-decoder Transformer) with object detection heads on top, for tasks
such as COCO detection.`),os=m(),Re=n("p"),ts=r("This model inherits from "),co=n("a"),ns=r("PreTrainedModel"),ss=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),as=m(),qe=n("p"),rs=r("This model is also a PyTorch "),Ze=n("a"),is=r("torch.nn.Module"),ls=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),cs=m(),z=n("div"),v(Oe.$$.fragment),ds=m(),B=n("p"),ms=r("The "),mo=n("a"),hs=r("DetaForObjectDetection"),ps=r(" forward method, overrides the "),Uo=n("code"),fs=r("__call__"),us=r(" special method."),gs=m(),v(le.$$.fragment),_s=m(),v(ce.$$.fragment),this.h()},l(e){const d=Da('[data-svelte="svelte-1phssyn"]',document.head);f=s(d,"META",{name:!0,content:!0}),d.forEach(t),y=h(e),_=s(e,"H1",{class:!0});var We=a(_);u=s(We,"A",{id:!0,class:!0,href:!0});var Ao=a(u);b=s(Ao,"SPAN",{});var Jo=a(b);w(l.$$.fragment,Jo),Jo.forEach(t),Ao.forEach(t),g=h(We),F=s(We,"SPAN",{});var Ro=a(F);Mt=i(Ro,"DETA"),Ro.forEach(t),We.forEach(t),qo=h(e),J=s(e,"H2",{class:!0});var Se=a(J);G=s(Se,"A",{id:!0,class:!0,href:!0});var Ds=a(G);bo=s(Ds,"SPAN",{});var Ms=a(bo);w(ue.$$.fragment,Ms),Ms.forEach(t),Ds.forEach(t),xt=h(Se),yo=s(Se,"SPAN",{});var xs=a(yo);jt=i(xs,"Overview"),xs.forEach(t),Se.forEach(t),Zo=h(e),N=s(e,"P",{});var ho=a(N);Et=i(ho,"The DETA model was proposed in "),ge=s(ho,"A",{href:!0,rel:!0});var js=a(ge);$t=i(js,"NMS Strikes Back"),js.forEach(t),Ct=i(ho,` by Jeffrey Ouyang-Zhang, Jang Hyun Cho, Xingyi Zhou, Philipp Kr\xE4henb\xFChl.
DETA (short for Detection Transformers with Assignment) improves `),Ve=s(ho,"A",{href:!0});var Es=a(Ve);kt=i(Es,"Deformable DETR"),Es.forEach(t),It=i(ho,` by replacing the one-to-one bipartite Hungarian matching loss
with one-to-many label assignments used in traditional detectors with non-maximum suppression (NMS). This leads to significant gains of up to 2.5 mAP.`),ho.forEach(t),Oo=h(e),Be=s(e,"P",{});var $s=a(Be);zt=i($s,"The abstract from the paper is the following:"),$s.forEach(t),Wo=h(e),Ge=s(e,"P",{});var Cs=a(Ge);vo=s(Cs,"EM",{});var ks=a(vo);Ft=i(ks,"Detection Transformer (DETR) directly transforms queries to unique objects by using one-to-one bipartite matching during training and enables end-to-end object detection. Recently, these models have surpassed traditional detectors on COCO with undeniable elegance. However, they differ from traditional detectors in multiple designs, including model architecture and training schedules, and thus the effectiveness of one-to-one matching is not fully understood. In this work, we conduct a strict comparison between the one-to-one Hungarian matching in DETRs and the one-to-many label assignments in traditional detectors with non-maximum supervision (NMS). Surprisingly, we observe one-to-many assignments with NMS consistently outperform standard one-to-one matching under the same setting, with a significant gain of up to 2.5 mAP. Our detector that trains Deformable-DETR with traditional IoU-based label assignment achieved 50.2 COCO mAP within 12 epochs (1x schedule) with ResNet50 backbone, outperforming all existing traditional or transformer-based detectors in this setting. On multiple datasets, schedules, and architectures, we consistently show bipartite matching is unnecessary for performant detection transformers. Furthermore, we attribute the success of detection transformers to their expressive transformer architecture."),ks.forEach(t),Cs.forEach(t),So=h(e),Xe=s(e,"P",{});var Is=a(Xe);Nt=i(Is,"Tips:"),Is.forEach(t),Lo=h(e),He=s(e,"UL",{});var zs=a(He);_e=s(zs,"LI",{});var lt=a(_e);Pt=i(lt,"One can use "),Ye=s(lt,"A",{href:!0});var Fs=a(Ye);Ut=i(Fs,"DetaImageProcessor"),Fs.forEach(t),At=i(lt," to prepare images and optional targets for the model."),lt.forEach(t),zs.forEach(t),Vo=h(e),X=s(e,"IMG",{src:!0,alt:!0,width:!0}),Bo=h(e),H=s(e,"SMALL",{});var ct=a(H);Jt=i(ct,"DETA overview. Taken from the "),Qe=s(ct,"A",{href:!0});var Ns=a(Qe);Rt=i(Ns,"original paper"),Ns.forEach(t),qt=i(ct,"."),ct.forEach(t),Go=h(e),P=s(e,"P",{});var po=a(P);Zt=i(po,"This model was contributed by "),be=s(po,"A",{href:!0,rel:!0});var Ps=a(be);Ot=i(Ps,"nielsr"),Ps.forEach(t),Wt=i(po,`.
The original code can be found `),ye=s(po,"A",{href:!0,rel:!0});var Us=a(ye);St=i(Us,"here"),Us.forEach(t),Lt=i(po,"."),po.forEach(t),Xo=h(e),R=s(e,"H2",{class:!0});var dt=a(R);Y=s(dt,"A",{id:!0,class:!0,href:!0});var As=a(Y);wo=s(As,"SPAN",{});var Js=a(wo);w(ve.$$.fragment,Js),Js.forEach(t),As.forEach(t),Vt=h(dt),To=s(dt,"SPAN",{});var Rs=a(To);Bt=i(Rs,"Resources"),Rs.forEach(t),dt.forEach(t),Ho=h(e),Ke=s(e,"P",{});var qs=a(Ke);Gt=i(qs,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with DETA."),qs.forEach(t),Yo=h(e),Q=s(e,"UL",{});var mt=a(Q);we=s(mt,"LI",{});var ht=a(we);Xt=i(ht,"Demo notebooks for DETA can be found "),Te=s(ht,"A",{href:!0,rel:!0});var Zs=a(Te);Ht=i(Zs,"here"),Zs.forEach(t),Yt=i(ht,"."),ht.forEach(t),Qt=h(mt),eo=s(mt,"LI",{});var bs=a(eo);Kt=i(bs,"See also: "),oo=s(bs,"A",{href:!0});var Os=a(oo);en=i(Os,"Object detection task guide"),Os.forEach(t),bs.forEach(t),mt.forEach(t),Qo=h(e),to=s(e,"P",{});var Ws=a(to);on=i(Ws,"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."),Ws.forEach(t),Ko=h(e),q=s(e,"H2",{class:!0});var pt=a(q);K=s(pt,"A",{id:!0,class:!0,href:!0});var Ss=a(K);Do=s(Ss,"SPAN",{});var Ls=a(Do);w(De.$$.fragment,Ls),Ls.forEach(t),Ss.forEach(t),tn=h(pt),Mo=s(pt,"SPAN",{});var Vs=a(Mo);nn=i(Vs,"DetaConfig"),Vs.forEach(t),pt.forEach(t),et=h(e),$=s(e,"DIV",{class:!0});var de=a($);w(Me.$$.fragment,de),sn=h(de),Z=s(de,"P",{});var fo=a(Z);an=i(fo,"This is the configuration class to store the configuration of a "),no=s(fo,"A",{href:!0});var Bs=a(no);rn=i(Bs,"DetaModel"),Bs.forEach(t),ln=i(fo,`. It is used to instantiate a DETA
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 DETA
`),xe=s(fo,"A",{href:!0,rel:!0});var Gs=a(xe);cn=i(Gs,"SenseTime/deformable-detr"),Gs.forEach(t),dn=i(fo," architecture."),fo.forEach(t),mn=h(de),O=s(de,"P",{});var uo=a(O);hn=i(uo,"Configuration objects inherit from "),so=s(uo,"A",{href:!0});var Xs=a(so);pn=i(Xs,"PretrainedConfig"),Xs.forEach(t),fn=i(uo,` and can be used to control the model outputs. Read the
documentation from `),ao=s(uo,"A",{href:!0});var Hs=a(ao);un=i(Hs,"PretrainedConfig"),Hs.forEach(t),gn=i(uo," for more information."),uo.forEach(t),_n=h(de),w(ee.$$.fragment,de),de.forEach(t),ot=h(e),W=s(e,"H2",{class:!0});var ft=a(W);oe=s(ft,"A",{id:!0,class:!0,href:!0});var Ys=a(oe);xo=s(Ys,"SPAN",{});var Qs=a(xo);w(je.$$.fragment,Qs),Qs.forEach(t),Ys.forEach(t),bn=h(ft),jo=s(ft,"SPAN",{});var Ks=a(jo);yn=i(Ks,"DetaImageProcessor"),Ks.forEach(t),ft.forEach(t),tt=h(e),C=s(e,"DIV",{class:!0});var me=a(C);w(Ee.$$.fragment,me),vn=h(me),Eo=s(me,"P",{});var ea=a(Eo);wn=i(ea,"Constructs a Deformable DETR image processor."),ea.forEach(t),Tn=h(me),te=s(me,"DIV",{class:!0});var ut=a(te);w($e.$$.fragment,ut),Dn=h(ut),$o=s(ut,"P",{});var oa=a($o);Mn=i(oa,"Preprocess an image or a batch of images so that it can be used by the model."),oa.forEach(t),ut.forEach(t),xn=h(me),ne=s(me,"DIV",{class:!0});var gt=a(ne);w(Ce.$$.fragment,gt),jn=h(gt),ke=s(gt,"P",{});var _t=a(ke);En=i(_t,"Converts the output of "),ro=s(_t,"A",{href:!0});var ta=a(ro);$n=i(ta,"DetaForObjectDetection"),ta.forEach(t),Cn=i(_t,` into final bounding boxes in (top_left_x, top_left_y,
bottom_right_x, bottom_right_y) format. Only supports PyTorch.`),_t.forEach(t),gt.forEach(t),me.forEach(t),nt=h(e),S=s(e,"H2",{class:!0});var bt=a(S);se=s(bt,"A",{id:!0,class:!0,href:!0});var na=a(se);Co=s(na,"SPAN",{});var sa=a(Co);w(Ie.$$.fragment,sa),sa.forEach(t),na.forEach(t),kn=h(bt),ko=s(bt,"SPAN",{});var aa=a(ko);In=i(aa,"DetaModel"),aa.forEach(t),bt.forEach(t),st=h(e),j=s(e,"DIV",{class:!0});var U=a(j);w(ze.$$.fragment,U),zn=h(U),Io=s(U,"P",{});var ra=a(Io);Fn=i(ra,`The bare DETA Model (consisting of a backbone and encoder-decoder Transformer) outputting raw hidden-states without
any specific head on top.`),ra.forEach(t),Nn=h(U),Fe=s(U,"P",{});var yt=a(Fe);Pn=i(yt,"This model inherits from "),io=s(yt,"A",{href:!0});var ia=a(io);Un=i(ia,"PreTrainedModel"),ia.forEach(t),An=i(yt,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),yt.forEach(t),Jn=h(U),Ne=s(U,"P",{});var vt=a(Ne);Rn=i(vt,"This model is also a PyTorch "),Pe=s(vt,"A",{href:!0,rel:!0});var la=a(Pe);qn=i(la,"torch.nn.Module"),la.forEach(t),Zn=i(vt,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),vt.forEach(t),On=h(U),I=s(U,"DIV",{class:!0});var he=a(I);w(Ue.$$.fragment,he),Wn=h(he),L=s(he,"P",{});var go=a(L);Sn=i(go,"The "),lo=s(go,"A",{href:!0});var ca=a(lo);Ln=i(ca,"DetaModel"),ca.forEach(t),Vn=i(go," forward method, overrides the "),zo=s(go,"CODE",{});var da=a(zo);Bn=i(da,"__call__"),da.forEach(t),Gn=i(go," special method."),go.forEach(t),Xn=h(he),w(ae.$$.fragment,he),Hn=h(he),w(re.$$.fragment,he),he.forEach(t),U.forEach(t),at=h(e),V=s(e,"H2",{class:!0});var wt=a(V);ie=s(wt,"A",{id:!0,class:!0,href:!0});var ma=a(ie);Fo=s(ma,"SPAN",{});var ha=a(Fo);w(Ae.$$.fragment,ha),ha.forEach(t),ma.forEach(t),Yn=h(wt),No=s(wt,"SPAN",{});var pa=a(No);Qn=i(pa,"DetaForObjectDetection"),pa.forEach(t),wt.forEach(t),rt=h(e),E=s(e,"DIV",{class:!0});var A=a(E);w(Je.$$.fragment,A),Kn=h(A),Po=s(A,"P",{});var fa=a(Po);es=i(fa,`DETA Model (consisting of a backbone and encoder-decoder Transformer) with object detection heads on top, for tasks
such as COCO detection.`),fa.forEach(t),os=h(A),Re=s(A,"P",{});var Tt=a(Re);ts=i(Tt,"This model inherits from "),co=s(Tt,"A",{href:!0});var ua=a(co);ns=i(ua,"PreTrainedModel"),ua.forEach(t),ss=i(Tt,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Tt.forEach(t),as=h(A),qe=s(A,"P",{});var Dt=a(qe);rs=i(Dt,"This model is also a PyTorch "),Ze=s(Dt,"A",{href:!0,rel:!0});var ga=a(Ze);is=i(ga,"torch.nn.Module"),ga.forEach(t),ls=i(Dt,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Dt.forEach(t),cs=h(A),z=s(A,"DIV",{class:!0});var pe=a(z);w(Oe.$$.fragment,pe),ds=h(pe),B=s(pe,"P",{});var _o=a(B);ms=i(_o,"The "),mo=s(_o,"A",{href:!0});var _a=a(mo);hs=i(_a,"DetaForObjectDetection"),_a.forEach(t),ps=i(_o," forward method, overrides the "),Uo=s(_o,"CODE",{});var ba=a(Uo);fs=i(ba,"__call__"),ba.forEach(t),us=i(_o," special method."),_o.forEach(t),gs=h(pe),w(le.$$.fragment,pe),_s=h(pe),w(ce.$$.fragment,pe),pe.forEach(t),A.forEach(t),this.h()},h(){c(f,"name","hf:doc:metadata"),c(f,"content",JSON.stringify(za)),c(u,"id","deta"),c(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"),c(u,"href","#deta"),c(_,"class","relative group"),c(G,"id","overview"),c(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"),c(G,"href","#overview"),c(J,"class","relative group"),c(ge,"href","https://arxiv.org/abs/2212.06137"),c(ge,"rel","nofollow"),c(Ve,"href","deformable_detr"),c(Ye,"href","/docs/transformers/v4.33.0/en/model_doc/deta#transformers.DetaImageProcessor"),Ma(X.src,Ts="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/deta_architecture.jpg")||c(X,"src",Ts),c(X,"alt","drawing"),c(X,"width","600"),c(Qe,"href","https://arxiv.org/abs/2212.06137"),c(be,"href","https://huggingface.co/nielsr"),c(be,"rel","nofollow"),c(ye,"href","https://github.com/jozhang97/DETA"),c(ye,"rel","nofollow"),c(Y,"id","resources"),c(Y,"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"),c(Y,"href","#resources"),c(R,"class","relative group"),c(Te,"href","https://github.com/NielsRogge/Transformers-Tutorials/tree/master/DETA"),c(Te,"rel","nofollow"),c(oo,"href","../tasks/object_detection"),c(K,"id","transformers.DetaConfig"),c(K,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(K,"href","#transformers.DetaConfig"),c(q,"class","relative group"),c(no,"href","/docs/transformers/v4.33.0/en/model_doc/deta#transformers.DetaModel"),c(xe,"href","https://huggingface.co/SenseTime/deformable-detr"),c(xe,"rel","nofollow"),c(so,"href","/docs/transformers/v4.33.0/en/main_classes/configuration#transformers.PretrainedConfig"),c(ao,"href","/docs/transformers/v4.33.0/en/main_classes/configuration#transformers.PretrainedConfig"),c($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(oe,"id","transformers.DetaImageProcessor"),c(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"),c(oe,"href","#transformers.DetaImageProcessor"),c(W,"class","relative group"),c(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ro,"href","/docs/transformers/v4.33.0/en/model_doc/deta#transformers.DetaForObjectDetection"),c(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(se,"id","transformers.DetaModel"),c(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"),c(se,"href","#transformers.DetaModel"),c(S,"class","relative group"),c(io,"href","/docs/transformers/v4.33.0/en/main_classes/model#transformers.PreTrainedModel"),c(Pe,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Pe,"rel","nofollow"),c(lo,"href","/docs/transformers/v4.33.0/en/model_doc/deta#transformers.DetaModel"),c(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ie,"id","transformers.DetaForObjectDetection"),c(ie,"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"),c(ie,"href","#transformers.DetaForObjectDetection"),c(V,"class","relative group"),c(co,"href","/docs/transformers/v4.33.0/en/main_classes/model#transformers.PreTrainedModel"),c(Ze,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Ze,"rel","nofollow"),c(mo,"href","/docs/transformers/v4.33.0/en/model_doc/deta#transformers.DetaForObjectDetection"),c(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(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),p(e,y,d),p(e,_,d),o(_,u),o(u,b),T(l,b,null),o(_,g),o(_,F),o(F,Mt),p(e,qo,d),p(e,J,d),o(J,G),o(G,bo),T(ue,bo,null),o(J,xt),o(J,yo),o(yo,jt),p(e,Zo,d),p(e,N,d),o(N,Et),o(N,ge),o(ge,$t),o(N,Ct),o(N,Ve),o(Ve,kt),o(N,It),p(e,Oo,d),p(e,Be,d),o(Be,zt),p(e,Wo,d),p(e,Ge,d),o(Ge,vo),o(vo,Ft),p(e,So,d),p(e,Xe,d),o(Xe,Nt),p(e,Lo,d),p(e,He,d),o(He,_e),o(_e,Pt),o(_e,Ye),o(Ye,Ut),o(_e,At),p(e,Vo,d),p(e,X,d),p(e,Bo,d),p(e,H,d),o(H,Jt),o(H,Qe),o(Qe,Rt),o(H,qt),p(e,Go,d),p(e,P,d),o(P,Zt),o(P,be),o(be,Ot),o(P,Wt),o(P,ye),o(ye,St),o(P,Lt),p(e,Xo,d),p(e,R,d),o(R,Y),o(Y,wo),T(ve,wo,null),o(R,Vt),o(R,To),o(To,Bt),p(e,Ho,d),p(e,Ke,d),o(Ke,Gt),p(e,Yo,d),p(e,Q,d),o(Q,we),o(we,Xt),o(we,Te),o(Te,Ht),o(we,Yt),o(Q,Qt),o(Q,eo),o(eo,Kt),o(eo,oo),o(oo,en),p(e,Qo,d),p(e,to,d),o(to,on),p(e,Ko,d),p(e,q,d),o(q,K),o(K,Do),T(De,Do,null),o(q,tn),o(q,Mo),o(Mo,nn),p(e,et,d),p(e,$,d),T(Me,$,null),o($,sn),o($,Z),o(Z,an),o(Z,no),o(no,rn),o(Z,ln),o(Z,xe),o(xe,cn),o(Z,dn),o($,mn),o($,O),o(O,hn),o(O,so),o(so,pn),o(O,fn),o(O,ao),o(ao,un),o(O,gn),o($,_n),T(ee,$,null),p(e,ot,d),p(e,W,d),o(W,oe),o(oe,xo),T(je,xo,null),o(W,bn),o(W,jo),o(jo,yn),p(e,tt,d),p(e,C,d),T(Ee,C,null),o(C,vn),o(C,Eo),o(Eo,wn),o(C,Tn),o(C,te),T($e,te,null),o(te,Dn),o(te,$o),o($o,Mn),o(C,xn),o(C,ne),T(Ce,ne,null),o(ne,jn),o(ne,ke),o(ke,En),o(ke,ro),o(ro,$n),o(ke,Cn),p(e,nt,d),p(e,S,d),o(S,se),o(se,Co),T(Ie,Co,null),o(S,kn),o(S,ko),o(ko,In),p(e,st,d),p(e,j,d),T(ze,j,null),o(j,zn),o(j,Io),o(Io,Fn),o(j,Nn),o(j,Fe),o(Fe,Pn),o(Fe,io),o(io,Un),o(Fe,An),o(j,Jn),o(j,Ne),o(Ne,Rn),o(Ne,Pe),o(Pe,qn),o(Ne,Zn),o(j,On),o(j,I),T(Ue,I,null),o(I,Wn),o(I,L),o(L,Sn),o(L,lo),o(lo,Ln),o(L,Vn),o(L,zo),o(zo,Bn),o(L,Gn),o(I,Xn),T(ae,I,null),o(I,Hn),T(re,I,null),p(e,at,d),p(e,V,d),o(V,ie),o(ie,Fo),T(Ae,Fo,null),o(V,Yn),o(V,No),o(No,Qn),p(e,rt,d),p(e,E,d),T(Je,E,null),o(E,Kn),o(E,Po),o(Po,es),o(E,os),o(E,Re),o(Re,ts),o(Re,co),o(co,ns),o(Re,ss),o(E,as),o(E,qe),o(qe,rs),o(qe,Ze),o(Ze,is),o(qe,ls),o(E,cs),o(E,z),T(Oe,z,null),o(z,ds),o(z,B),o(B,ms),o(B,mo),o(mo,hs),o(B,ps),o(B,Uo),o(Uo,fs),o(B,us),o(z,gs),T(le,z,null),o(z,_s),T(ce,z,null),it=!0},p(e,[d]){const We={};d&2&&(We.$$scope={dirty:d,ctx:e}),ee.$set(We);const Ao={};d&2&&(Ao.$$scope={dirty:d,ctx:e}),ae.$set(Ao);const Jo={};d&2&&(Jo.$$scope={dirty:d,ctx:e}),re.$set(Jo);const Ro={};d&2&&(Ro.$$scope={dirty:d,ctx:e}),le.$set(Ro);const Se={};d&2&&(Se.$$scope={dirty:d,ctx:e}),ce.$set(Se)},i(e){it||(D(l.$$.fragment,e),D(ue.$$.fragment,e),D(ve.$$.fragment,e),D(De.$$.fragment,e),D(Me.$$.fragment,e),D(ee.$$.fragment,e),D(je.$$.fragment,e),D(Ee.$$.fragment,e),D($e.$$.fragment,e),D(Ce.$$.fragment,e),D(Ie.$$.fragment,e),D(ze.$$.fragment,e),D(Ue.$$.fragment,e),D(ae.$$.fragment,e),D(re.$$.fragment,e),D(Ae.$$.fragment,e),D(Je.$$.fragment,e),D(Oe.$$.fragment,e),D(le.$$.fragment,e),D(ce.$$.fragment,e),it=!0)},o(e){M(l.$$.fragment,e),M(ue.$$.fragment,e),M(ve.$$.fragment,e),M(De.$$.fragment,e),M(Me.$$.fragment,e),M(ee.$$.fragment,e),M(je.$$.fragment,e),M(Ee.$$.fragment,e),M($e.$$.fragment,e),M(Ce.$$.fragment,e),M(Ie.$$.fragment,e),M(ze.$$.fragment,e),M(Ue.$$.fragment,e),M(ae.$$.fragment,e),M(re.$$.fragment,e),M(Ae.$$.fragment,e),M(Je.$$.fragment,e),M(Oe.$$.fragment,e),M(le.$$.fragment,e),M(ce.$$.fragment,e),it=!1},d(e){t(f),e&&t(y),e&&t(_),x(l),e&&t(qo),e&&t(J),x(ue),e&&t(Zo),e&&t(N),e&&t(Oo),e&&t(Be),e&&t(Wo),e&&t(Ge),e&&t(So),e&&t(Xe),e&&t(Lo),e&&t(He),e&&t(Vo),e&&t(X),e&&t(Bo),e&&t(H),e&&t(Go),e&&t(P),e&&t(Xo),e&&t(R),x(ve),e&&t(Ho),e&&t(Ke),e&&t(Yo),e&&t(Q),e&&t(Qo),e&&t(to),e&&t(Ko),e&&t(q),x(De),e&&t(et),e&&t($),x(Me),x(ee),e&&t(ot),e&&t(W),x(je),e&&t(tt),e&&t(C),x(Ee),x($e),x(Ce),e&&t(nt),e&&t(S),x(Ie),e&&t(st),e&&t(j),x(ze),x(Ue),x(ae),x(re),e&&t(at),e&&t(V),x(Ae),e&&t(rt),e&&t(E),x(Je),x(Oe),x(le),x(ce)}}}const za={local:"deta",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{local:"transformers.DetaConfig",title:"DetaConfig"},{local:"transformers.DetaImageProcessor",title:"DetaImageProcessor"},{local:"transformers.DetaModel",title:"DetaModel"},{local:"transformers.DetaForObjectDetection",title:"DetaForObjectDetection"}],title:"DETA"};function Fa(k){return xa(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class qa extends va{constructor(f){super();wa(this,f,Fa,Ia,Ta,{})}}export{qa as default,za as metadata};
