import{S as nl,i as sl,s as rl,e as n,k as c,w as b,t as a,M as al,c as s,d as o,m,a as r,x as v,h as i,b as l,N as il,G as e,g,y,q as w,o as C,B as T,v as ll,L as Qn}from"../../chunks/vendor-hf-doc-builder.js";import{T as La}from"../../chunks/Tip-hf-doc-builder.js";import{D as j}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Yn}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as se}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as On}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function dl(k){let p,M,_,f,D;return f=new Yn({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENvbmRpdGlvbmFsRGV0ckNvbmZpZyUyQyUyMENvbmRpdGlvbmFsRGV0ck1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMENvbmRpdGlvbmFsJTIwREVUUiUyMG1pY3Jvc29mdCUyRmNvbmRpdGlvbmFsLWRldHItcmVzbmV0LTUwJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMENvbmRpdGlvbmFsRGV0ckNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBtaWNyb3NvZnQlMkZjb25kaXRpb25hbC1kZXRyLXJlc25ldC01MCUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwQ29uZGl0aW9uYWxEZXRyTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ConditionalDetrConfig, ConditionalDetrModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Conditional DETR microsoft/conditional-detr-resnet-50 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = ConditionalDetrConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the microsoft/conditional-detr-resnet-50 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ConditionalDetrModel(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(){p=n("p"),M=a("Examples:"),_=c(),b(f.$$.fragment)},l(d){p=s(d,"P",{});var u=r(p);M=i(u,"Examples:"),u.forEach(o),_=m(d),v(f.$$.fragment,d)},m(d,u){g(d,p,u),e(p,M),g(d,_,u),y(f,d,u),D=!0},p:Qn,i(d){D||(w(f.$$.fragment,d),D=!0)},o(d){C(f.$$.fragment,d),D=!1},d(d){d&&o(p),d&&o(_),T(f,d)}}}function cl(k){let p,M,_,f,D;return{c(){p=n("p"),M=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n("code"),f=a("Module"),D=a(`
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(d){p=s(d,"P",{});var u=r(p);M=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(u,"CODE",{});var I=r(_);f=i(I,"Module"),I.forEach(o),D=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(o)},m(d,u){g(d,p,u),e(p,M),e(p,_),e(_,f),e(p,D)},d(d){d&&o(p)}}}function ml(k){let p,M,_,f,D;return f=new Yn({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMEF1dG9Nb2RlbCUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWltcG9ydCUyMHJlcXVlc3RzJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGY29uZGl0aW9uYWwtZGV0ci1yZXNuZXQtNTAlMjIpJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRmNvbmRpdGlvbmFsLWRldHItcmVzbmV0LTUwJTIyKSUwQSUwQSUyMyUyMHByZXBhcmUlMjBpbWFnZSUyMGZvciUyMHRoZSUyMG1vZGVsJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEElMjMlMjBmb3J3YXJkJTIwcGFzcyUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEElMjMlMjB0aGUlMjBsYXN0JTIwaGlkZGVuJTIwc3RhdGVzJTIwYXJlJTIwdGhlJTIwZmluYWwlMjBxdWVyeSUyMGVtYmVkZGluZ3MlMjBvZiUyMHRoZSUyMFRyYW5zZm9ybWVyJTIwZGVjb2RlciUwQSUyMyUyMHRoZXNlJTIwYXJlJTIwb2YlMjBzaGFwZSUyMChiYXRjaF9zaXplJTJDJTIwbnVtX3F1ZXJpZXMlMkMlMjBoaWRkZW5fc2l6ZSklMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRlJTBBbGlzdChsYXN0X2hpZGRlbl9zdGF0ZXMuc2hhcGUp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, AutoModel
<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;microsoft/conditional-detr-resnet-50&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModel.from_pretrained(<span class="hljs-string">&quot;microsoft/conditional-detr-resnet-50&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the last hidden states are the final query embeddings of the Transformer decoder</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># these are of shape (batch_size, num_queries, hidden_size)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_states.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">300</span>, <span class="hljs-number">256</span>]`}}),{c(){p=n("p"),M=a("Examples:"),_=c(),b(f.$$.fragment)},l(d){p=s(d,"P",{});var u=r(p);M=i(u,"Examples:"),u.forEach(o),_=m(d),v(f.$$.fragment,d)},m(d,u){g(d,p,u),e(p,M),g(d,_,u),y(f,d,u),D=!0},p:Qn,i(d){D||(w(f.$$.fragment,d),D=!0)},o(d){C(f.$$.fragment,d),D=!1},d(d){d&&o(p),d&&o(_),T(f,d)}}}function pl(k){let p,M,_,f,D;return{c(){p=n("p"),M=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n("code"),f=a("Module"),D=a(`
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(d){p=s(d,"P",{});var u=r(p);M=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(u,"CODE",{});var I=r(_);f=i(I,"Module"),I.forEach(o),D=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(o)},m(d,u){g(d,p,u),e(p,M),e(p,_),e(_,f),e(p,D)},d(d){d&&o(p)}}}function hl(k){let p,M,_,f,D;return f=new Yn({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMEF1dG9Nb2RlbEZvck9iamVjdERldGVjdGlvbiUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWltcG9ydCUyMHJlcXVlc3RzJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGY29uZGl0aW9uYWwtZGV0ci1yZXNuZXQtNTAlMjIpJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWxGb3JPYmplY3REZXRlY3Rpb24uZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRmNvbmRpdGlvbmFsLWRldHItcmVzbmV0LTUwJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZXMlM0RpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQSUyMyUyMGNvbnZlcnQlMjBvdXRwdXRzJTIwKGJvdW5kaW5nJTIwYm94ZXMlMjBhbmQlMjBjbGFzcyUyMGxvZ2l0cyklMjB0byUyMENPQ08lMjBBUEklMEF0YXJnZXRfc2l6ZXMlMjAlM0QlMjB0b3JjaC50ZW5zb3IoJTVCaW1hZ2Uuc2l6ZSU1QiUzQSUzQS0xJTVEJTVEKSUwQXJlc3VsdHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IucG9zdF9wcm9jZXNzX29iamVjdF9kZXRlY3Rpb24ob3V0cHV0cyUyQyUyMHRocmVzaG9sZCUzRDAuNSUyQyUyMHRhcmdldF9zaXplcyUzRHRhcmdldF9zaXplcyklNUIlMEElMjAlMjAlMjAlMjAwJTBBJTVEJTBBZm9yJTIwc2NvcmUlMkMlMjBsYWJlbCUyQyUyMGJveCUyMGluJTIwemlwKHJlc3VsdHMlNUIlMjJzY29yZXMlMjIlNUQlMkMlMjByZXN1bHRzJTVCJTIybGFiZWxzJTIyJTVEJTJDJTIwcmVzdWx0cyU1QiUyMmJveGVzJTIyJTVEKSUzQSUwQSUyMCUyMCUyMCUyMGJveCUyMCUzRCUyMCU1QnJvdW5kKGklMkMlMjAyKSUyMGZvciUyMGklMjBpbiUyMGJveC50b2xpc3QoKSU1RCUwQSUyMCUyMCUyMCUyMHByaW50KCUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGYlMjJEZXRlY3RlZCUyMCU3Qm1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QmxhYmVsLml0ZW0oKSU1RCU3RCUyMHdpdGglMjBjb25maWRlbmNlJTIwJTIyJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwZiUyMiU3QnJvdW5kKHNjb3JlLml0ZW0oKSUyQyUyMDMpJTdEJTIwYXQlMjBsb2NhdGlvbiUyMCU3QmJveCU3RCUyMiUwQSUyMCUyMCUyMCUyMCk=",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">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;microsoft/conditional-detr-resnet-50&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForObjectDetection.from_pretrained(<span class="hljs-string">&quot;microsoft/conditional-detr-resnet-50&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 remote <span class="hljs-keyword">with</span> confidence <span class="hljs-number">0.833</span> at location [<span class="hljs-number">38.31</span>, <span class="hljs-number">72.1</span>, <span class="hljs-number">177.63</span>, <span class="hljs-number">118.45</span>]
Detected cat <span class="hljs-keyword">with</span> confidence <span class="hljs-number">0.831</span> at location [<span class="hljs-number">9.2</span>, <span class="hljs-number">51.38</span>, <span class="hljs-number">321.13</span>, <span class="hljs-number">469.0</span>]
Detected cat <span class="hljs-keyword">with</span> confidence <span class="hljs-number">0.804</span> at location [<span class="hljs-number">340.3</span>, <span class="hljs-number">16.85</span>, <span class="hljs-number">642.93</span>, <span class="hljs-number">370.95</span>]
Detected remote <span class="hljs-keyword">with</span> confidence <span class="hljs-number">0.683</span> at location [<span class="hljs-number">334.48</span>, <span class="hljs-number">73.49</span>, <span class="hljs-number">366.37</span>, <span class="hljs-number">190.01</span>]
Detected couch <span class="hljs-keyword">with</span> confidence <span class="hljs-number">0.535</span> at location [<span class="hljs-number">0.52</span>, <span class="hljs-number">1.19</span>, <span class="hljs-number">640.35</span>, <span class="hljs-number">475.1</span>]`}}),{c(){p=n("p"),M=a("Examples:"),_=c(),b(f.$$.fragment)},l(d){p=s(d,"P",{});var u=r(p);M=i(u,"Examples:"),u.forEach(o),_=m(d),v(f.$$.fragment,d)},m(d,u){g(d,p,u),e(p,M),g(d,_,u),y(f,d,u),D=!0},p:Qn,i(d){D||(w(f.$$.fragment,d),D=!0)},o(d){C(f.$$.fragment,d),D=!1},d(d){d&&o(p),d&&o(_),T(f,d)}}}function gl(k){let p,M,_,f,D;return{c(){p=n("p"),M=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n("code"),f=a("Module"),D=a(`
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(d){p=s(d,"P",{});var u=r(p);M=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(u,"CODE",{});var I=r(_);f=i(I,"Module"),I.forEach(o),D=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(o)},m(d,u){g(d,p,u),e(p,M),e(p,_),e(_,f),e(p,D)},d(d){d&&o(p)}}}function fl(k){let p,M,_,f,D;return f=new Yn({props:{code:"aW1wb3J0JTIwaW8lMEFpbXBvcnQlMjByZXF1ZXN0cyUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWltcG9ydCUyMHRvcmNoJTBBaW1wb3J0JTIwbnVtcHklMEElMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwKCUwQSUyMCUyMCUyMCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUwQSUyMCUyMCUyMCUyMENvbmRpdGlvbmFsRGV0ckNvbmZpZyUyQyUwQSUyMCUyMCUyMCUyMENvbmRpdGlvbmFsRGV0ckZvclNlZ21lbnRhdGlvbiUyQyUwQSklMEFmcm9tJTIwdHJhbnNmb3JtZXJzLmltYWdlX3RyYW5zZm9ybXMlMjBpbXBvcnQlMjByZ2JfdG9faWQlMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZjb25kaXRpb25hbC1kZXRyLXJlc25ldC01MCUyMiklMEElMEElMjMlMjByYW5kb21seSUyMGluaXRpYWxpemUlMjBhbGwlMjB3ZWlnaHRzJTIwb2YlMjB0aGUlMjBtb2RlbCUwQWNvbmZpZyUyMCUzRCUyMENvbmRpdGlvbmFsRGV0ckNvbmZpZygpJTBBbW9kZWwlMjAlM0QlMjBDb25kaXRpb25hbERldHJGb3JTZWdtZW50YXRpb24oY29uZmlnKSUwQSUwQSUyMyUyMHByZXBhcmUlMjBpbWFnZSUyMGZvciUyMHRoZSUyMG1vZGVsJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEElMjMlMjBmb3J3YXJkJTIwcGFzcyUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEElMjMlMjBVc2UlMjB0aGUlMjAlNjBwb3N0X3Byb2Nlc3NfcGFub3B0aWNfc2VnbWVudGF0aW9uJTYwJTIwbWV0aG9kJTIwb2YlMjB0aGUlMjAlNjBpbWFnZV9wcm9jZXNzb3IlNjAlMjB0byUyMHJldHJpZXZlJTIwcG9zdC1wcm9jZXNzZWQlMjBwYW5vcHRpYyUyMHNlZ21lbnRhdGlvbiUyMG1hcHMlMEElMjMlMjBTZWdtZW50YXRpb24lMjByZXN1bHRzJTIwYXJlJTIwcmV0dXJuZWQlMjBhcyUyMGElMjBsaXN0JTIwb2YlMjBkaWN0aW9uYXJpZXMlMEFyZXN1bHQlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IucG9zdF9wcm9jZXNzX3Bhbm9wdGljX3NlZ21lbnRhdGlvbihvdXRwdXRzJTJDJTIwdGFyZ2V0X3NpemVzJTNEJTVCKDMwMCUyQyUyMDUwMCklNUQpJTBBJTIzJTIwQSUyMHRlbnNvciUyMG9mJTIwc2hhcGUlMjAoaGVpZ2h0JTJDJTIwd2lkdGgpJTIwd2hlcmUlMjBlYWNoJTIwdmFsdWUlMjBkZW5vdGVzJTIwYSUyMHNlZ21lbnQlMjBpZCUyQyUyMGZpbGxlZCUyMHdpdGglMjAtMSUyMGlmJTIwbm8lMjBzZWdtZW50JTIwaXMlMjBmb3VuZCUwQXBhbm9wdGljX3NlZyUyMCUzRCUyMHJlc3VsdCU1QjAlNUQlNUIlMjJzZWdtZW50YXRpb24lMjIlNUQlMEElMjMlMjBHZXQlMjBwcmVkaWN0aW9uJTIwc2NvcmUlMjBhbmQlMjBzZWdtZW50X2lkJTIwdG8lMjBjbGFzc19pZCUyMG1hcHBpbmclMjBvZiUyMGVhY2glMjBzZWdtZW50JTBBcGFub3B0aWNfc2VnbWVudHNfaW5mbyUyMCUzRCUyMHJlc3VsdCU1QjAlNUQlNUIlMjJzZWdtZW50c19pbmZvJTIyJTVE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> io
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<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> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> numpy

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> (
<span class="hljs-meta">... </span>    AutoImageProcessor,
<span class="hljs-meta">... </span>    ConditionalDetrConfig,
<span class="hljs-meta">... </span>    ConditionalDetrForSegmentation,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers.image_transforms <span class="hljs-keyword">import</span> rgb_to_id

<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;microsoft/conditional-detr-resnet-50&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># randomly initialize all weights of the model</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>config = ConditionalDetrConfig()
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ConditionalDetrForSegmentation(config)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Use the \`post_process_panoptic_segmentation\` method of the \`image_processor\` to retrieve post-processed panoptic segmentation maps</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Segmentation results are returned as a list of dictionaries</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>result = image_processor.post_process_panoptic_segmentation(outputs, target_sizes=[(<span class="hljs-number">300</span>, <span class="hljs-number">500</span>)])
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># A tensor of shape (height, width) where each value denotes a segment id, filled with -1 if no segment is found</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>panoptic_seg = result[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;segmentation&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Get prediction score and segment_id to class_id mapping of each segment</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>panoptic_segments_info = result[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;segments_info&quot;</span>]`}}),{c(){p=n("p"),M=a("Examples:"),_=c(),b(f.$$.fragment)},l(d){p=s(d,"P",{});var u=r(p);M=i(u,"Examples:"),u.forEach(o),_=m(d),v(f.$$.fragment,d)},m(d,u){g(d,p,u),e(p,M),g(d,_,u),y(f,d,u),D=!0},p:Qn,i(d){D||(w(f.$$.fragment,d),D=!0)},o(d){C(f.$$.fragment,d),D=!1},d(d){d&&o(p),d&&o(_),T(f,d)}}}function ul(k){let p,M,_,f,D,d,u,I,Hn,qo,G,re,ho,Pe,Kn,go,es,Go,ae,ts,Re,os,ns,Lo,Pt,ss,Vo,Rt,Ze,rs,Se,as,is,Xo,ie,Va,Oo,le,ls,Zt,ds,cs,Qo,S,ms,We,ps,hs,Ae,gs,fs,Yo,L,de,fo,Be,us,uo,_s,Ho,St,_o,Wt,bs,Ko,V,ce,bo,qe,vs,vo,ys,en,E,Ge,ws,X,Cs,At,Ts,Ds,Le,Ms,js,xs,O,$s,Bt,ks,Es,qt,zs,Fs,Us,me,Is,pe,Ve,Js,Xe,Ns,Gt,Ps,Rs,tn,Q,he,yo,Oe,Zs,wo,Ss,on,x,Qe,Ws,Co,As,Bs,ge,Ye,qs,To,Gs,Ls,fe,He,Vs,Ke,Xs,Lt,Os,Qs,Ys,ue,et,Hs,tt,Ks,Vt,er,tr,or,_e,ot,nr,nt,sr,Xt,rr,ar,ir,be,st,lr,rt,dr,Ot,cr,mr,nn,Y,ve,Do,at,pr,Mo,hr,sn,$,it,gr,ye,lt,fr,jo,ur,_r,we,dt,br,ct,vr,Qt,yr,wr,Cr,Ce,mt,Tr,pt,Dr,Yt,Mr,jr,xr,Te,ht,$r,gt,kr,Ht,Er,zr,Fr,De,ft,Ur,ut,Ir,Kt,Jr,Nr,rn,H,Me,xo,_t,Pr,$o,Rr,an,z,bt,Zr,ko,Sr,Wr,vt,Ar,eo,Br,qr,Gr,yt,Lr,wt,Vr,Xr,Or,N,Ct,Qr,K,Yr,to,Hr,Kr,Eo,ea,ta,oa,je,na,xe,ln,ee,$e,zo,Tt,sa,Fo,ra,dn,F,Dt,aa,Uo,ia,la,Mt,da,oo,ca,ma,pa,jt,ha,xt,ga,fa,ua,P,$t,_a,te,ba,no,va,ya,Io,wa,Ca,Ta,ke,Da,Ee,cn,oe,ze,Jo,kt,Ma,No,ja,mn,U,Et,xa,Po,$a,ka,zt,Ea,so,za,Fa,Ua,Ft,Ia,Ut,Ja,Na,Pa,R,It,Ra,ne,Za,ro,Sa,Wa,Ro,Aa,Ba,qa,Fe,Ga,Ue,pn;return d=new se({}),Pe=new se({}),Be=new se({}),qe=new se({}),Ge=new j({props:{name:"class transformers.ConditionalDetrConfig",anchor:"transformers.ConditionalDetrConfig",parameters:[{name:"use_timm_backbone",val:" = True"},{name:"backbone_config",val:" = None"},{name:"num_channels",val:" = 3"},{name:"num_queries",val:" = 300"},{name:"encoder_layers",val:" = 6"},{name:"encoder_ffn_dim",val:" = 2048"},{name:"encoder_attention_heads",val:" = 8"},{name:"decoder_layers",val:" = 6"},{name:"decoder_ffn_dim",val:" = 2048"},{name:"decoder_attention_heads",val:" = 8"},{name:"encoder_layerdrop",val:" = 0.0"},{name:"decoder_layerdrop",val:" = 0.0"},{name:"is_encoder_decoder",val:" = True"},{name:"activation_function",val:" = 'relu'"},{name:"d_model",val:" = 256"},{name:"dropout",val:" = 0.1"},{name:"attention_dropout",val:" = 0.0"},{name:"activation_dropout",val:" = 0.0"},{name:"init_std",val:" = 0.02"},{name:"init_xavier_std",val:" = 1.0"},{name:"auxiliary_loss",val:" = False"},{name:"position_embedding_type",val:" = 'sine'"},{name:"backbone",val:" = 'resnet50'"},{name:"use_pretrained_backbone",val:" = True"},{name:"dilation",val:" = False"},{name:"class_cost",val:" = 2"},{name:"bbox_cost",val:" = 5"},{name:"giou_cost",val:" = 2"},{name:"mask_loss_coefficient",val:" = 1"},{name:"dice_loss_coefficient",val:" = 1"},{name:"cls_loss_coefficient",val:" = 2"},{name:"bbox_loss_coefficient",val:" = 5"},{name:"giou_loss_coefficient",val:" = 2"},{name:"focal_alpha",val:" = 0.25"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ConditionalDetrConfig.use_timm_backbone",description:`<strong>use_timm_backbone</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to use the <code>timm</code> library for the backbone. If set to <code>False</code>, will use the <code>AutoBackbone</code>
API.`,name:"use_timm_backbone"},{anchor:"transformers.ConditionalDetrConfig.backbone_config",description:`<strong>backbone_config</strong> (<code>PretrainedConfig</code> or <code>dict</code>, <em>optional</em>) &#x2014;
The configuration of the backbone model. Only used in case <code>use_timm_backbone</code> is set to <code>False</code> in which
case it will default to <code>ResNetConfig()</code>.`,name:"backbone_config"},{anchor:"transformers.ConditionalDetrConfig.num_channels",description:`<strong>num_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
The number of input channels.`,name:"num_channels"},{anchor:"transformers.ConditionalDetrConfig.num_queries",description:`<strong>num_queries</strong> (<code>int</code>, <em>optional</em>, defaults to 100) &#x2014;
Number of object queries, i.e. detection slots. This is the maximal number of objects
<a href="/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrModel">ConditionalDetrModel</a> can detect in a single image. For COCO, we recommend 100 queries.`,name:"num_queries"},{anchor:"transformers.ConditionalDetrConfig.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.ConditionalDetrConfig.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.ConditionalDetrConfig.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.ConditionalDetrConfig.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.ConditionalDetrConfig.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.ConditionalDetrConfig.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.ConditionalDetrConfig.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.ConditionalDetrConfig.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.ConditionalDetrConfig.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.ConditionalDetrConfig.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.ConditionalDetrConfig.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.ConditionalDetrConfig.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.ConditionalDetrConfig.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.ConditionalDetrConfig.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.ConditionalDetrConfig.decoder_layerdrop",description:`<strong>decoder_layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The LayerDrop probability for the decoder. See the [LayerDrop paper](see <a href="https://arxiv.org/abs/1909.11556" rel="nofollow">https://arxiv.org/abs/1909.11556</a>)
for more details.`,name:"decoder_layerdrop"},{anchor:"transformers.ConditionalDetrConfig.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.ConditionalDetrConfig.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.ConditionalDetrConfig.backbone",description:`<strong>backbone</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;resnet50&quot;</code>) &#x2014;
Name of convolutional backbone to use in case <code>use_timm_backbone</code> = <code>True</code>. Supports any convolutional
backbone from the timm package. For a list of all available models, see <a href="https://rwightman.github.io/pytorch-image-models/#load-a-pretrained-model" rel="nofollow">this
page</a>.`,name:"backbone"},{anchor:"transformers.ConditionalDetrConfig.use_pretrained_backbone",description:`<strong>use_pretrained_backbone</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use pretrained weights for the backbone. Only supported when <code>use_timm_backbone</code> = <code>True</code>.`,name:"use_pretrained_backbone"},{anchor:"transformers.ConditionalDetrConfig.dilation",description:`<strong>dilation</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to replace stride with dilation in the last convolutional block (DC5). Only supported when
<code>use_timm_backbone</code> = <code>True</code>.`,name:"dilation"},{anchor:"transformers.ConditionalDetrConfig.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.ConditionalDetrConfig.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.ConditionalDetrConfig.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.ConditionalDetrConfig.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.ConditionalDetrConfig.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.ConditionalDetrConfig.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.ConditionalDetrConfig.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.ConditionalDetrConfig.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.ConditionalDetrConfig.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.31.0/src/transformers/models/conditional_detr/configuration_conditional_detr.py#L37"}}),me=new On({props:{anchor:"transformers.ConditionalDetrConfig.example",$$slots:{default:[dl]},$$scope:{ctx:k}}}),Ve=new j({props:{name:"to_dict",anchor:"transformers.ConditionalDetrConfig.to_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/conditional_detr/configuration_conditional_detr.py#L241",returnDescription:`
<p>Dictionary of all the attributes that make up this configuration instance,</p>
`,returnType:`
<p><code>Dict[str, any]</code></p>
`}}),Oe=new se({}),Qe=new j({props:{name:"class transformers.ConditionalDetrImageProcessor",anchor:"transformers.ConditionalDetrImageProcessor",parameters:[{name:"format",val:": typing.Union[str, transformers.models.conditional_detr.image_processing_conditional_detr.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.ConditionalDetrImageProcessor.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.ConditionalDetrImageProcessor.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.ConditionalDetrImageProcessor.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.ConditionalDetrImageProcessor.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.ConditionalDetrImageProcessor.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.ConditionalDetrImageProcessor.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.ConditionalDetrImageProcessor.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.ConditionalDetrImageProcessor.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.ConditionalDetrImageProcessor.do_pad",description:`<strong>do_pad</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Controls whether to pad the image to the largest image in a batch and create a pixel mask. Can be
overridden by the <code>do_pad</code> parameter in the <code>preprocess</code> method.`,name:"do_pad"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L744"}}),Ye=new j({props:{name:"preprocess",anchor:"transformers.ConditionalDetrImageProcessor.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.conditional_detr.image_processing_conditional_detr.AnnotionFormat, NoneType] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension] = <ChannelDimension.FIRST: 'channels_first'>"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ConditionalDetrImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image or batch of images to preprocess.`,name:"images"},{anchor:"transformers.ConditionalDetrImageProcessor.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 annotation 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 annotation 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.ConditionalDetrImageProcessor.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.ConditionalDetrImageProcessor.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.ConditionalDetrImageProcessor.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.ConditionalDetrImageProcessor.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.ConditionalDetrImageProcessor.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.ConditionalDetrImageProcessor.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.ConditionalDetrImageProcessor.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.ConditionalDetrImageProcessor.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.ConditionalDetrImageProcessor.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.ConditionalDetrImageProcessor.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.ConditionalDetrImageProcessor.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.ConditionalDetrImageProcessor.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.ConditionalDetrImageProcessor.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.ConditionalDetrImageProcessor.preprocess.data_format",description:`<strong>data_format</strong> (<code>str</code> or <code>ChannelDimension</code>, <em>optional</em>, defaults to self.data_format) &#x2014;
The channel dimension format of the image. If not provided, it will be the same as the input image.`,name:"data_format"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L1029"}}),He=new j({props:{name:"post_process_object_detection",anchor:"transformers.ConditionalDetrImageProcessor.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:"top_k",val:": int = 100"}],parametersDescription:[{anchor:"transformers.ConditionalDetrImageProcessor.post_process_object_detection.outputs",description:`<strong>outputs</strong> (<code>DetrObjectDetectionOutput</code>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.ConditionalDetrImageProcessor.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.ConditionalDetrImageProcessor.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.ConditionalDetrImageProcessor.post_process_object_detection.top_k",description:`<strong>top_k</strong> (<code>int</code>, <em>optional</em>, defaults to 100) &#x2014;
Keep only top k bounding boxes before filtering by thresholding.`,name:"top_k"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L1281",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>
`}}),et=new j({props:{name:"post_process_instance_segmentation",anchor:"transformers.ConditionalDetrImageProcessor.post_process_instance_segmentation",parameters:[{name:"outputs",val:""},{name:"threshold",val:": float = 0.5"},{name:"mask_threshold",val:": float = 0.5"},{name:"overlap_mask_area_threshold",val:": float = 0.8"},{name:"target_sizes",val:": typing.Union[typing.List[typing.Tuple[int, int]], NoneType] = None"},{name:"return_coco_annotation",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.ConditionalDetrImageProcessor.post_process_instance_segmentation.outputs",description:`<strong>outputs</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation">ConditionalDetrForSegmentation</a>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.ConditionalDetrImageProcessor.post_process_instance_segmentation.threshold",description:`<strong>threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
The probability score threshold to keep predicted instance masks.`,name:"threshold"},{anchor:"transformers.ConditionalDetrImageProcessor.post_process_instance_segmentation.mask_threshold",description:`<strong>mask_threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
Threshold to use when turning the predicted masks into binary values.`,name:"mask_threshold"},{anchor:"transformers.ConditionalDetrImageProcessor.post_process_instance_segmentation.overlap_mask_area_threshold",description:`<strong>overlap_mask_area_threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.8) &#x2014;
The overlap mask area threshold to merge or discard small disconnected parts within each binary
instance mask.`,name:"overlap_mask_area_threshold"},{anchor:"transformers.ConditionalDetrImageProcessor.post_process_instance_segmentation.target_sizes",description:`<strong>target_sizes</strong> (<code>List[Tuple]</code>, <em>optional</em>) &#x2014;
List of length (batch_size), where each list item (<code>Tuple[int, int]]</code>) corresponds to the requested
final size (height, width) of each prediction. If unset, predictions will not be resized.`,name:"target_sizes"},{anchor:"transformers.ConditionalDetrImageProcessor.post_process_instance_segmentation.return_coco_annotation",description:`<strong>return_coco_annotation</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Defaults to <code>False</code>. If set to <code>True</code>, segmentation maps are returned in COCO run-length encoding (RLE)
format.`,name:"return_coco_annotation"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L1389",returnDescription:`
<p>A list of dictionaries, one per image, each dictionary containing two keys:</p>
<ul>
<li><strong>segmentation</strong> \u2014 A tensor of shape <code>(height, width)</code> where each pixel represents a <code>segment_id</code> or
<code>List[List]</code> run-length encoding (RLE) of the segmentation map if return_coco_annotation is set to
<code>True</code>. Set to <code>None</code> if no mask if found above <code>threshold</code>.</li>
<li><strong>segments_info</strong> \u2014 A dictionary that contains additional information on each segment.<ul>
<li><strong>id</strong> \u2014 An integer representing the <code>segment_id</code>.</li>
<li><strong>label_id</strong> \u2014 An integer representing the label / semantic class id corresponding to <code>segment_id</code>.</li>
<li><strong>score</strong> \u2014 Prediction score of segment with <code>segment_id</code>.</li>
</ul></li>
</ul>
`,returnType:`
<p><code>List[Dict]</code></p>
`}}),ot=new j({props:{name:"post_process_semantic_segmentation",anchor:"transformers.ConditionalDetrImageProcessor.post_process_semantic_segmentation",parameters:[{name:"outputs",val:""},{name:"target_sizes",val:": typing.List[typing.Tuple[int, int]] = None"}],parametersDescription:[{anchor:"transformers.ConditionalDetrImageProcessor.post_process_semantic_segmentation.outputs",description:`<strong>outputs</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation">ConditionalDetrForSegmentation</a>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.ConditionalDetrImageProcessor.post_process_semantic_segmentation.target_sizes",description:`<strong>target_sizes</strong> (<code>List[Tuple[int, int]]</code>, <em>optional</em>) &#x2014;
A list of tuples (<code>Tuple[int, int]</code>) containing the target size (height, width) of each image in the
batch. If unset, predictions will not be resized.`,name:"target_sizes"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L1340",returnDescription:`
<p>A list of length <code>batch_size</code>, where each item is a semantic segmentation map of shape (height, width)
corresponding to the target_sizes entry (if <code>target_sizes</code> is specified). Each entry of each
<code>torch.Tensor</code> correspond to a semantic class id.</p>
`,returnType:`
<p><code>List[torch.Tensor]</code></p>
`}}),st=new j({props:{name:"post_process_panoptic_segmentation",anchor:"transformers.ConditionalDetrImageProcessor.post_process_panoptic_segmentation",parameters:[{name:"outputs",val:""},{name:"threshold",val:": float = 0.5"},{name:"mask_threshold",val:": float = 0.5"},{name:"overlap_mask_area_threshold",val:": float = 0.8"},{name:"label_ids_to_fuse",val:": typing.Optional[typing.Set[int]] = None"},{name:"target_sizes",val:": typing.Union[typing.List[typing.Tuple[int, int]], NoneType] = None"}],parametersDescription:[{anchor:"transformers.ConditionalDetrImageProcessor.post_process_panoptic_segmentation.outputs",description:`<strong>outputs</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation">ConditionalDetrForSegmentation</a>) &#x2014;
The outputs from <a href="/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation">ConditionalDetrForSegmentation</a>.`,name:"outputs"},{anchor:"transformers.ConditionalDetrImageProcessor.post_process_panoptic_segmentation.threshold",description:`<strong>threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
The probability score threshold to keep predicted instance masks.`,name:"threshold"},{anchor:"transformers.ConditionalDetrImageProcessor.post_process_panoptic_segmentation.mask_threshold",description:`<strong>mask_threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
Threshold to use when turning the predicted masks into binary values.`,name:"mask_threshold"},{anchor:"transformers.ConditionalDetrImageProcessor.post_process_panoptic_segmentation.overlap_mask_area_threshold",description:`<strong>overlap_mask_area_threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.8) &#x2014;
The overlap mask area threshold to merge or discard small disconnected parts within each binary
instance mask.`,name:"overlap_mask_area_threshold"},{anchor:"transformers.ConditionalDetrImageProcessor.post_process_panoptic_segmentation.label_ids_to_fuse",description:`<strong>label_ids_to_fuse</strong> (<code>Set[int]</code>, <em>optional</em>) &#x2014;
The labels in this state will have all their instances be fused together. For instance we could say
there can only be one sky in an image, but several persons, so the label ID for sky would be in that
set, but not the one for person.`,name:"label_ids_to_fuse"},{anchor:"transformers.ConditionalDetrImageProcessor.post_process_panoptic_segmentation.target_sizes",description:`<strong>target_sizes</strong> (<code>List[Tuple]</code>, <em>optional</em>) &#x2014;
List of length (batch_size), where each list item (<code>Tuple[int, int]]</code>) corresponds to the requested
final size (height, width) of each prediction in batch. If unset, predictions will not be resized.`,name:"target_sizes"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L1474",returnDescription:`
<p>A list of dictionaries, one per image, each dictionary containing two keys:</p>
<ul>
<li><strong>segmentation</strong> \u2014 a tensor of shape <code>(height, width)</code> where each pixel represents a <code>segment_id</code> or
<code>None</code> if no mask if found above <code>threshold</code>. If <code>target_sizes</code> is specified, segmentation is resized to
the corresponding <code>target_sizes</code> entry.</li>
<li><strong>segments_info</strong> \u2014 A dictionary that contains additional information on each segment.<ul>
<li><strong>id</strong> \u2014 an integer representing the <code>segment_id</code>.</li>
<li><strong>label_id</strong> \u2014 An integer representing the label / semantic class id corresponding to <code>segment_id</code>.</li>
<li><strong>was_fused</strong> \u2014 a boolean, <code>True</code> if <code>label_id</code> was in <code>label_ids_to_fuse</code>, <code>False</code> otherwise.
Multiple instances of the same class / label were fused and assigned a single <code>segment_id</code>.</li>
<li><strong>score</strong> \u2014 Prediction score of segment with <code>segment_id</code>.</li>
</ul></li>
</ul>
`,returnType:`
<p><code>List[Dict]</code></p>
`}}),at=new se({}),it=new j({props:{name:"class transformers.ConditionalDetrFeatureExtractor",anchor:"transformers.ConditionalDetrFeatureExtractor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/conditional_detr/feature_extraction_conditional_detr.py#L26"}}),lt=new j({props:{name:"__call__",anchor:"transformers.ConditionalDetrFeatureExtractor.__call__",parameters:[{name:"images",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/image_processing_utils.py#L492"}}),dt=new j({props:{name:"post_process_object_detection",anchor:"transformers.ConditionalDetrFeatureExtractor.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:"top_k",val:": int = 100"}],parametersDescription:[{anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_object_detection.outputs",description:`<strong>outputs</strong> (<code>DetrObjectDetectionOutput</code>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.ConditionalDetrFeatureExtractor.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.ConditionalDetrFeatureExtractor.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.ConditionalDetrFeatureExtractor.post_process_object_detection.top_k",description:`<strong>top_k</strong> (<code>int</code>, <em>optional</em>, defaults to 100) &#x2014;
Keep only top k bounding boxes before filtering by thresholding.`,name:"top_k"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L1281",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>
`}}),mt=new j({props:{name:"post_process_instance_segmentation",anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_instance_segmentation",parameters:[{name:"outputs",val:""},{name:"threshold",val:": float = 0.5"},{name:"mask_threshold",val:": float = 0.5"},{name:"overlap_mask_area_threshold",val:": float = 0.8"},{name:"target_sizes",val:": typing.Union[typing.List[typing.Tuple[int, int]], NoneType] = None"},{name:"return_coco_annotation",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_instance_segmentation.outputs",description:`<strong>outputs</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation">ConditionalDetrForSegmentation</a>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_instance_segmentation.threshold",description:`<strong>threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
The probability score threshold to keep predicted instance masks.`,name:"threshold"},{anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_instance_segmentation.mask_threshold",description:`<strong>mask_threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
Threshold to use when turning the predicted masks into binary values.`,name:"mask_threshold"},{anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_instance_segmentation.overlap_mask_area_threshold",description:`<strong>overlap_mask_area_threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.8) &#x2014;
The overlap mask area threshold to merge or discard small disconnected parts within each binary
instance mask.`,name:"overlap_mask_area_threshold"},{anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_instance_segmentation.target_sizes",description:`<strong>target_sizes</strong> (<code>List[Tuple]</code>, <em>optional</em>) &#x2014;
List of length (batch_size), where each list item (<code>Tuple[int, int]]</code>) corresponds to the requested
final size (height, width) of each prediction. If unset, predictions will not be resized.`,name:"target_sizes"},{anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_instance_segmentation.return_coco_annotation",description:`<strong>return_coco_annotation</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Defaults to <code>False</code>. If set to <code>True</code>, segmentation maps are returned in COCO run-length encoding (RLE)
format.`,name:"return_coco_annotation"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L1389",returnDescription:`
<p>A list of dictionaries, one per image, each dictionary containing two keys:</p>
<ul>
<li><strong>segmentation</strong> \u2014 A tensor of shape <code>(height, width)</code> where each pixel represents a <code>segment_id</code> or
<code>List[List]</code> run-length encoding (RLE) of the segmentation map if return_coco_annotation is set to
<code>True</code>. Set to <code>None</code> if no mask if found above <code>threshold</code>.</li>
<li><strong>segments_info</strong> \u2014 A dictionary that contains additional information on each segment.<ul>
<li><strong>id</strong> \u2014 An integer representing the <code>segment_id</code>.</li>
<li><strong>label_id</strong> \u2014 An integer representing the label / semantic class id corresponding to <code>segment_id</code>.</li>
<li><strong>score</strong> \u2014 Prediction score of segment with <code>segment_id</code>.</li>
</ul></li>
</ul>
`,returnType:`
<p><code>List[Dict]</code></p>
`}}),ht=new j({props:{name:"post_process_semantic_segmentation",anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_semantic_segmentation",parameters:[{name:"outputs",val:""},{name:"target_sizes",val:": typing.List[typing.Tuple[int, int]] = None"}],parametersDescription:[{anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_semantic_segmentation.outputs",description:`<strong>outputs</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation">ConditionalDetrForSegmentation</a>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_semantic_segmentation.target_sizes",description:`<strong>target_sizes</strong> (<code>List[Tuple[int, int]]</code>, <em>optional</em>) &#x2014;
A list of tuples (<code>Tuple[int, int]</code>) containing the target size (height, width) of each image in the
batch. If unset, predictions will not be resized.`,name:"target_sizes"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L1340",returnDescription:`
<p>A list of length <code>batch_size</code>, where each item is a semantic segmentation map of shape (height, width)
corresponding to the target_sizes entry (if <code>target_sizes</code> is specified). Each entry of each
<code>torch.Tensor</code> correspond to a semantic class id.</p>
`,returnType:`
<p><code>List[torch.Tensor]</code></p>
`}}),ft=new j({props:{name:"post_process_panoptic_segmentation",anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_panoptic_segmentation",parameters:[{name:"outputs",val:""},{name:"threshold",val:": float = 0.5"},{name:"mask_threshold",val:": float = 0.5"},{name:"overlap_mask_area_threshold",val:": float = 0.8"},{name:"label_ids_to_fuse",val:": typing.Optional[typing.Set[int]] = None"},{name:"target_sizes",val:": typing.Union[typing.List[typing.Tuple[int, int]], NoneType] = None"}],parametersDescription:[{anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_panoptic_segmentation.outputs",description:`<strong>outputs</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation">ConditionalDetrForSegmentation</a>) &#x2014;
The outputs from <a href="/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation">ConditionalDetrForSegmentation</a>.`,name:"outputs"},{anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_panoptic_segmentation.threshold",description:`<strong>threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
The probability score threshold to keep predicted instance masks.`,name:"threshold"},{anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_panoptic_segmentation.mask_threshold",description:`<strong>mask_threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
Threshold to use when turning the predicted masks into binary values.`,name:"mask_threshold"},{anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_panoptic_segmentation.overlap_mask_area_threshold",description:`<strong>overlap_mask_area_threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.8) &#x2014;
The overlap mask area threshold to merge or discard small disconnected parts within each binary
instance mask.`,name:"overlap_mask_area_threshold"},{anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_panoptic_segmentation.label_ids_to_fuse",description:`<strong>label_ids_to_fuse</strong> (<code>Set[int]</code>, <em>optional</em>) &#x2014;
The labels in this state will have all their instances be fused together. For instance we could say
there can only be one sky in an image, but several persons, so the label ID for sky would be in that
set, but not the one for person.`,name:"label_ids_to_fuse"},{anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_panoptic_segmentation.target_sizes",description:`<strong>target_sizes</strong> (<code>List[Tuple]</code>, <em>optional</em>) &#x2014;
List of length (batch_size), where each list item (<code>Tuple[int, int]]</code>) corresponds to the requested
final size (height, width) of each prediction in batch. If unset, predictions will not be resized.`,name:"target_sizes"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L1474",returnDescription:`
<p>A list of dictionaries, one per image, each dictionary containing two keys:</p>
<ul>
<li><strong>segmentation</strong> \u2014 a tensor of shape <code>(height, width)</code> where each pixel represents a <code>segment_id</code> or
<code>None</code> if no mask if found above <code>threshold</code>. If <code>target_sizes</code> is specified, segmentation is resized to
the corresponding <code>target_sizes</code> entry.</li>
<li><strong>segments_info</strong> \u2014 A dictionary that contains additional information on each segment.<ul>
<li><strong>id</strong> \u2014 an integer representing the <code>segment_id</code>.</li>
<li><strong>label_id</strong> \u2014 An integer representing the label / semantic class id corresponding to <code>segment_id</code>.</li>
<li><strong>was_fused</strong> \u2014 a boolean, <code>True</code> if <code>label_id</code> was in <code>label_ids_to_fuse</code>, <code>False</code> otherwise.
Multiple instances of the same class / label were fused and assigned a single <code>segment_id</code>.</li>
<li><strong>score</strong> \u2014 Prediction score of segment with <code>segment_id</code>.</li>
</ul></li>
</ul>
`,returnType:`
<p><code>List[Dict]</code></p>
`}}),_t=new se({}),bt=new j({props:{name:"class transformers.ConditionalDetrModel",anchor:"transformers.ConditionalDetrModel",parameters:[{name:"config",val:": ConditionalDetrConfig"}],parametersDescription:[{anchor:"transformers.ConditionalDetrModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrConfig">ConditionalDetrConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/conditional_detr/modeling_conditional_detr.py#L1482"}}),Ct=new j({props:{name:"forward",anchor:"transformers.ConditionalDetrModel.forward",parameters:[{name:"pixel_values",val:""},{name:"pixel_mask",val:" = None"},{name:"decoder_attention_mask",val:" = None"},{name:"encoder_outputs",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"decoder_inputs_embeds",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],parametersDescription:[{anchor:"transformers.ConditionalDetrModel.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.31.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.31.0/en/model_doc/perceiver#transformers.PerceiverFeatureExtractor.__call__">ConditionalDetrImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.ConditionalDetrModel.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.ConditionalDetrModel.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_queries)</code>, <em>optional</em>) &#x2014;
Not used by default. Can be used to mask object queries.`,name:"decoder_attention_mask"},{anchor:"transformers.ConditionalDetrModel.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.ConditionalDetrModel.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.ConditionalDetrModel.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.ConditionalDetrModel.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.ConditionalDetrModel.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.ConditionalDetrModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/conditional_detr/modeling_conditional_detr.py#L1516",returnDescription:`
<p>A <code>transformers.models.conditional_detr.modeling_conditional_detr.ConditionalDetrModelOutput</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrConfig"
>ConditionalDetrConfig</a>) and inputs.</p>
<ul>
<li><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the decoder of the model.</li>
<li><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of the decoder at the output of each
layer plus the initial embedding outputs.</li>
<li><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights of the decoder, after the attention softmax, used to compute the
weighted average in the self-attention heads.</li>
<li><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax,
used to compute the weighted average in the cross-attention heads.</li>
<li><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</li>
<li><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of the encoder at the output of each
layer plus the initial embedding outputs.</li>
<li><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights of the encoder, after the attention softmax, used to compute the
weighted average in the self-attention heads.</li>
<li><strong>intermediate_hidden_states</strong> (<code>torch.FloatTensor</code> of shape <code>(config.decoder_layers, batch_size, sequence_length, hidden_size)</code>, <em>optional</em>, returned when <code>config.auxiliary_loss=True</code>) \u2014 Intermediate decoder activations, i.e. the output of each decoder layer, each of them gone through a
layernorm.</li>
</ul>
`,returnType:`
<p><code>transformers.models.conditional_detr.modeling_conditional_detr.ConditionalDetrModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),je=new La({props:{$$slots:{default:[cl]},$$scope:{ctx:k}}}),xe=new On({props:{anchor:"transformers.ConditionalDetrModel.forward.example",$$slots:{default:[ml]},$$scope:{ctx:k}}}),Tt=new se({}),Dt=new j({props:{name:"class transformers.ConditionalDetrForObjectDetection",anchor:"transformers.ConditionalDetrForObjectDetection",parameters:[{name:"config",val:": ConditionalDetrConfig"}],parametersDescription:[{anchor:"transformers.ConditionalDetrForObjectDetection.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrConfig">ConditionalDetrConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/conditional_detr/modeling_conditional_detr.py#L1651"}}),$t=new j({props:{name:"forward",anchor:"transformers.ConditionalDetrForObjectDetection.forward",parameters:[{name:"pixel_values",val:""},{name:"pixel_mask",val:" = None"},{name:"decoder_attention_mask",val:" = None"},{name:"encoder_outputs",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"decoder_inputs_embeds",val:" = None"},{name:"labels",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],parametersDescription:[{anchor:"transformers.ConditionalDetrForObjectDetection.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.31.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.31.0/en/model_doc/perceiver#transformers.PerceiverFeatureExtractor.__call__">ConditionalDetrImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.ConditionalDetrForObjectDetection.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.ConditionalDetrForObjectDetection.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_queries)</code>, <em>optional</em>) &#x2014;
Not used by default. Can be used to mask object queries.`,name:"decoder_attention_mask"},{anchor:"transformers.ConditionalDetrForObjectDetection.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.ConditionalDetrForObjectDetection.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.ConditionalDetrForObjectDetection.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.ConditionalDetrForObjectDetection.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.ConditionalDetrForObjectDetection.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.ConditionalDetrForObjectDetection.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ConditionalDetrForObjectDetection.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.31.0/src/transformers/models/conditional_detr/modeling_conditional_detr.py#L1677",returnDescription:`
<p>A <code>transformers.models.conditional_detr.modeling_conditional_detr.ConditionalDetrObjectDetectionOutput</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrConfig"
>ConditionalDetrConfig</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 <a
  href="/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrFeatureExtractor.post_process_object_detection"
>post_process_object_detection()</a> to retrieve
the unnormalized bounding boxes.</li>
<li><strong>auxiliary_outputs</strong> (<code>list[Dict]</code>, <em>optional</em>) \u2014 Optional, only returned when auxilary losses are activated (i.e. <code>config.auxiliary_loss</code> is set to <code>True</code>)
and labels are provided. It is a list of dictionaries containing the two above keys (<code>logits</code> and
<code>pred_boxes</code>) for each decoder layer.</li>
<li><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the decoder of the model.</li>
<li><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of the decoder at the output of each
layer plus the initial embedding outputs.</li>
<li><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights of the decoder, after the attention softmax, used to compute the
weighted average in the self-attention heads.</li>
<li><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax,
used to compute the weighted average in the cross-attention heads.</li>
<li><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</li>
<li><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of the encoder at the output of each
layer plus the initial embedding outputs.</li>
<li><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights of the encoder, after the attention softmax, used to compute the
weighted average in the self-attention heads.</li>
</ul>
`,returnType:`
<p><code>transformers.models.conditional_detr.modeling_conditional_detr.ConditionalDetrObjectDetectionOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ke=new La({props:{$$slots:{default:[pl]},$$scope:{ctx:k}}}),Ee=new On({props:{anchor:"transformers.ConditionalDetrForObjectDetection.forward.example",$$slots:{default:[hl]},$$scope:{ctx:k}}}),kt=new se({}),Et=new j({props:{name:"class transformers.ConditionalDetrForSegmentation",anchor:"transformers.ConditionalDetrForSegmentation",parameters:[{name:"config",val:": ConditionalDetrConfig"}],parametersDescription:[{anchor:"transformers.ConditionalDetrForSegmentation.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrConfig">ConditionalDetrConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/conditional_detr/modeling_conditional_detr.py#L1839"}}),It=new j({props:{name:"forward",anchor:"transformers.ConditionalDetrForSegmentation.forward",parameters:[{name:"pixel_values",val:""},{name:"pixel_mask",val:" = None"},{name:"decoder_attention_mask",val:" = None"},{name:"encoder_outputs",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"decoder_inputs_embeds",val:" = None"},{name:"labels",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],parametersDescription:[{anchor:"transformers.ConditionalDetrForSegmentation.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.31.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.31.0/en/model_doc/perceiver#transformers.PerceiverFeatureExtractor.__call__">ConditionalDetrImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.ConditionalDetrForSegmentation.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.ConditionalDetrForSegmentation.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_queries)</code>, <em>optional</em>) &#x2014;
Not used by default. Can be used to mask object queries.`,name:"decoder_attention_mask"},{anchor:"transformers.ConditionalDetrForSegmentation.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.ConditionalDetrForSegmentation.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.ConditionalDetrForSegmentation.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.ConditionalDetrForSegmentation.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.ConditionalDetrForSegmentation.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.ConditionalDetrForSegmentation.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ConditionalDetrForSegmentation.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, DICE/F-1 loss and Focal loss. List of dicts, each
dictionary containing at least the following 3 keys: &#x2018;class_labels&#x2019;, &#x2018;boxes&#x2019; and &#x2018;masks&#x2019; (the class labels,
bounding boxes and segmentation masks 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>, the boxes a
<code>torch.FloatTensor</code> of shape <code>(number of bounding boxes in the image, 4)</code> and the masks a
<code>torch.FloatTensor</code> of shape <code>(number of bounding boxes in the image, height, width)</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/conditional_detr/modeling_conditional_detr.py#L1861",returnDescription:`
<p>A <code>transformers.models.conditional_detr.modeling_conditional_detr.ConditionalDetrSegmentationOutput</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrConfig"
>ConditionalDetrConfig</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 <a
  href="/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrFeatureExtractor.post_process_object_detection"
>post_process_object_detection()</a> to retrieve
the unnormalized bounding boxes.</li>
<li><strong>pred_masks</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_queries, height/4, width/4)</code>) \u2014 Segmentation masks logits for all queries. See also
<a
  href="/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrFeatureExtractor.post_process_semantic_segmentation"
>post_process_semantic_segmentation()</a> or
<a
  href="/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrFeatureExtractor.post_process_instance_segmentation"
>post_process_instance_segmentation()</a>
<a
  href="/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrFeatureExtractor.post_process_panoptic_segmentation"
>post_process_panoptic_segmentation()</a> to evaluate semantic, instance and
panoptic segmentation masks respectively.</li>
<li><strong>auxiliary_outputs</strong> (<code>list[Dict]</code>, <em>optional</em>) \u2014 Optional, only returned when auxiliary losses are activated (i.e. <code>config.auxiliary_loss</code> is set to <code>True</code>)
and labels are provided. It is a list of dictionaries containing the two above keys (<code>logits</code> and
<code>pred_boxes</code>) for each decoder layer.</li>
<li><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the decoder of the model.</li>
<li><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of the decoder at the output of each
layer plus the initial embedding outputs.</li>
<li><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights of the decoder, after the attention softmax, used to compute the
weighted average in the self-attention heads.</li>
<li><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax,
used to compute the weighted average in the cross-attention heads.</li>
<li><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</li>
<li><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of the encoder at the output of each
layer plus the initial embedding outputs.</li>
<li><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights of the encoder, after the attention softmax, used to compute the
weighted average in the self-attention heads.</li>
</ul>
`,returnType:`
<p><code>transformers.models.conditional_detr.modeling_conditional_detr.ConditionalDetrSegmentationOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Fe=new La({props:{$$slots:{default:[gl]},$$scope:{ctx:k}}}),Ue=new On({props:{anchor:"transformers.ConditionalDetrForSegmentation.forward.example",$$slots:{default:[fl]},$$scope:{ctx:k}}}),{c(){p=n("meta"),M=c(),_=n("h1"),f=n("a"),D=n("span"),b(d.$$.fragment),u=c(),I=n("span"),Hn=a("Conditional DETR"),qo=c(),G=n("h2"),re=n("a"),ho=n("span"),b(Pe.$$.fragment),Kn=c(),go=n("span"),es=a("Overview"),Go=c(),ae=n("p"),ts=a("The Conditional DETR model was proposed in "),Re=n("a"),os=a("Conditional DETR for Fast Training Convergence"),ns=a(" by Depu Meng, Xiaokang Chen, Zejia Fan, Gang Zeng, Houqiang Li, Yuhui Yuan, Lei Sun, Jingdong Wang. Conditional DETR presents a conditional cross-attention mechanism for fast DETR training. Conditional DETR converges 6.7\xD7 to 10\xD7 faster than DETR."),Lo=c(),Pt=n("p"),ss=a("The abstract from the paper is the following:"),Vo=c(),Rt=n("p"),Ze=n("em"),rs=a("The recently-developed DETR approach applies the transformer encoder and decoder architecture to object detection and achieves promising performance. In this paper, we handle the critical issue, slow training convergence, and present a conditional cross-attention mechanism for fast DETR training. Our approach is motivated by that the cross-attention in DETR relies highly on the content embeddings for localizing the four extremities and predicting the box, which increases the need for high-quality content embeddings and thus the training difficulty. Our approach, named conditional DETR, learns a conditional spatial query from the decoder embedding for decoder multi-head cross-attention. The benefit is that through the conditional spatial query, each cross-attention head is able to attend to a band containing a distinct region, e.g., one object extremity or a region inside the object box. This narrows down the spatial range for localizing the distinct regions for object classification and box regression, thus relaxing the dependence on the content embeddings and easing the training. Empirical results show that conditional DETR converges 6.7\xD7 faster for the backbones R50 and R101 and 10\xD7 faster for stronger backbones DC5-R50 and DC5-R101. Code is available at "),Se=n("a"),as=a("https://github.com/Atten4Vis/ConditionalDETR"),is=a("."),Xo=c(),ie=n("img"),Oo=c(),le=n("small"),ls=a("Conditional DETR shows much faster convergence compared to the original DETR. Taken from the "),Zt=n("a"),ds=a("original paper"),cs=a("."),Qo=c(),S=n("p"),ms=a("This model was contributed by "),We=n("a"),ps=a("DepuMeng"),hs=a(". The original code can be found "),Ae=n("a"),gs=a("here"),fs=a("."),Yo=c(),L=n("h2"),de=n("a"),fo=n("span"),b(Be.$$.fragment),us=c(),uo=n("span"),_s=a("Documentation resources"),Ho=c(),St=n("ul"),_o=n("li"),Wt=n("a"),bs=a("Object detection task guide"),Ko=c(),V=n("h2"),ce=n("a"),bo=n("span"),b(qe.$$.fragment),vs=c(),vo=n("span"),ys=a("ConditionalDetrConfig"),en=c(),E=n("div"),b(Ge.$$.fragment),ws=c(),X=n("p"),Cs=a("This is the configuration class to store the configuration of a "),At=n("a"),Ts=a("ConditionalDetrModel"),Ds=a(`. It is used to instantiate
a Conditional DETR 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 Conditional DETR
`),Le=n("a"),Ms=a("microsoft/conditional-detr-resnet-50"),js=a(" architecture."),xs=c(),O=n("p"),$s=a("Configuration objects inherit from "),Bt=n("a"),ks=a("PretrainedConfig"),Es=a(` and can be used to control the model outputs. Read the
documentation from `),qt=n("a"),zs=a("PretrainedConfig"),Fs=a(" for more information."),Us=c(),b(me.$$.fragment),Is=c(),pe=n("div"),b(Ve.$$.fragment),Js=c(),Xe=n("p"),Ns=a("Serializes this instance to a Python dictionary. Override the default "),Gt=n("a"),Ps=a("to_dict()"),Rs=a("."),tn=c(),Q=n("h2"),he=n("a"),yo=n("span"),b(Oe.$$.fragment),Zs=c(),wo=n("span"),Ss=a("ConditionalDetrImageProcessor"),on=c(),x=n("div"),b(Qe.$$.fragment),Ws=c(),Co=n("p"),As=a("Constructs a Conditional Detr image processor."),Bs=c(),ge=n("div"),b(Ye.$$.fragment),qs=c(),To=n("p"),Gs=a("Preprocess an image or a batch of images so that it can be used by the model."),Ls=c(),fe=n("div"),b(He.$$.fragment),Vs=c(),Ke=n("p"),Xs=a("Converts the raw output of "),Lt=n("a"),Os=a("ConditionalDetrForObjectDetection"),Qs=a(` into final bounding boxes in (top_left_x,
top_left_y, bottom_right_x, bottom_right_y) format. Only supports PyTorch.`),Ys=c(),ue=n("div"),b(et.$$.fragment),Hs=c(),tt=n("p"),Ks=a("Converts the output of "),Vt=n("a"),er=a("ConditionalDetrForSegmentation"),tr=a(` into instance segmentation predictions. Only supports
PyTorch.`),or=c(),_e=n("div"),b(ot.$$.fragment),nr=c(),nt=n("p"),sr=a("Converts the output of "),Xt=n("a"),rr=a("ConditionalDetrForSegmentation"),ar=a(` into semantic segmentation maps. Only supports
PyTorch.`),ir=c(),be=n("div"),b(st.$$.fragment),lr=c(),rt=n("p"),dr=a("Converts the output of "),Ot=n("a"),cr=a("ConditionalDetrForSegmentation"),mr=a(` into image panoptic segmentation predictions. Only
supports PyTorch.`),nn=c(),Y=n("h2"),ve=n("a"),Do=n("span"),b(at.$$.fragment),pr=c(),Mo=n("span"),hr=a("ConditionalDetrFeatureExtractor"),sn=c(),$=n("div"),b(it.$$.fragment),gr=c(),ye=n("div"),b(lt.$$.fragment),fr=c(),jo=n("p"),ur=a("Preprocess an image or a batch of images."),_r=c(),we=n("div"),b(dt.$$.fragment),br=c(),ct=n("p"),vr=a("Converts the raw output of "),Qt=n("a"),yr=a("ConditionalDetrForObjectDetection"),wr=a(` into final bounding boxes in (top_left_x,
top_left_y, bottom_right_x, bottom_right_y) format. Only supports PyTorch.`),Cr=c(),Ce=n("div"),b(mt.$$.fragment),Tr=c(),pt=n("p"),Dr=a("Converts the output of "),Yt=n("a"),Mr=a("ConditionalDetrForSegmentation"),jr=a(` into instance segmentation predictions. Only supports
PyTorch.`),xr=c(),Te=n("div"),b(ht.$$.fragment),$r=c(),gt=n("p"),kr=a("Converts the output of "),Ht=n("a"),Er=a("ConditionalDetrForSegmentation"),zr=a(` into semantic segmentation maps. Only supports
PyTorch.`),Fr=c(),De=n("div"),b(ft.$$.fragment),Ur=c(),ut=n("p"),Ir=a("Converts the output of "),Kt=n("a"),Jr=a("ConditionalDetrForSegmentation"),Nr=a(` into image panoptic segmentation predictions. Only
supports PyTorch.`),rn=c(),H=n("h2"),Me=n("a"),xo=n("span"),b(_t.$$.fragment),Pr=c(),$o=n("span"),Rr=a("ConditionalDetrModel"),an=c(),z=n("div"),b(bt.$$.fragment),Zr=c(),ko=n("p"),Sr=a(`The bare Conditional DETR Model (consisting of a backbone and encoder-decoder Transformer) outputting raw
hidden-states without any specific head on top.`),Wr=c(),vt=n("p"),Ar=a("This model inherits from "),eo=n("a"),Br=a("PreTrainedModel"),qr=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Gr=c(),yt=n("p"),Lr=a("This model is also a PyTorch "),wt=n("a"),Vr=a("torch.nn.Module"),Xr=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Or=c(),N=n("div"),b(Ct.$$.fragment),Qr=c(),K=n("p"),Yr=a("The "),to=n("a"),Hr=a("ConditionalDetrModel"),Kr=a(" forward method, overrides the "),Eo=n("code"),ea=a("__call__"),ta=a(" special method."),oa=c(),b(je.$$.fragment),na=c(),b(xe.$$.fragment),ln=c(),ee=n("h2"),$e=n("a"),zo=n("span"),b(Tt.$$.fragment),sa=c(),Fo=n("span"),ra=a("ConditionalDetrForObjectDetection"),dn=c(),F=n("div"),b(Dt.$$.fragment),aa=c(),Uo=n("p"),ia=a(`CONDITIONAL_DETR Model (consisting of a backbone and encoder-decoder Transformer) with object detection heads on
top, for tasks such as COCO detection.`),la=c(),Mt=n("p"),da=a("This model inherits from "),oo=n("a"),ca=a("PreTrainedModel"),ma=a(`. 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.)`),pa=c(),jt=n("p"),ha=a("This model is also a PyTorch "),xt=n("a"),ga=a("torch.nn.Module"),fa=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ua=c(),P=n("div"),b($t.$$.fragment),_a=c(),te=n("p"),ba=a("The "),no=n("a"),va=a("ConditionalDetrForObjectDetection"),ya=a(" forward method, overrides the "),Io=n("code"),wa=a("__call__"),Ca=a(" special method."),Ta=c(),b(ke.$$.fragment),Da=c(),b(Ee.$$.fragment),cn=c(),oe=n("h2"),ze=n("a"),Jo=n("span"),b(kt.$$.fragment),Ma=c(),No=n("span"),ja=a("ConditionalDetrForSegmentation"),mn=c(),U=n("div"),b(Et.$$.fragment),xa=c(),Po=n("p"),$a=a(`CONDITIONAL_DETR Model (consisting of a backbone and encoder-decoder Transformer) with a segmentation head on top,
for tasks such as COCO panoptic.`),ka=c(),zt=n("p"),Ea=a("This model inherits from "),so=n("a"),za=a("PreTrainedModel"),Fa=a(`. 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.)`),Ua=c(),Ft=n("p"),Ia=a("This model is also a PyTorch "),Ut=n("a"),Ja=a("torch.nn.Module"),Na=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Pa=c(),R=n("div"),b(It.$$.fragment),Ra=c(),ne=n("p"),Za=a("The "),ro=n("a"),Sa=a("ConditionalDetrForSegmentation"),Wa=a(" forward method, overrides the "),Ro=n("code"),Aa=a("__call__"),Ba=a(" special method."),qa=c(),b(Fe.$$.fragment),Ga=c(),b(Ue.$$.fragment),this.h()},l(t){const h=al('[data-svelte="svelte-1phssyn"]',document.head);p=s(h,"META",{name:!0,content:!0}),h.forEach(o),M=m(t),_=s(t,"H1",{class:!0});var Jt=r(_);f=s(Jt,"A",{id:!0,class:!0,href:!0});var Zo=r(f);D=s(Zo,"SPAN",{});var So=r(D);v(d.$$.fragment,So),So.forEach(o),Zo.forEach(o),u=m(Jt),I=s(Jt,"SPAN",{});var Wo=r(I);Hn=i(Wo,"Conditional DETR"),Wo.forEach(o),Jt.forEach(o),qo=m(t),G=s(t,"H2",{class:!0});var Nt=r(G);re=s(Nt,"A",{id:!0,class:!0,href:!0});var Ao=r(re);ho=s(Ao,"SPAN",{});var Bo=r(ho);v(Pe.$$.fragment,Bo),Bo.forEach(o),Ao.forEach(o),Kn=m(Nt),go=s(Nt,"SPAN",{});var Xa=r(go);es=i(Xa,"Overview"),Xa.forEach(o),Nt.forEach(o),Go=m(t),ae=s(t,"P",{});var hn=r(ae);ts=i(hn,"The Conditional DETR model was proposed in "),Re=s(hn,"A",{href:!0,rel:!0});var Oa=r(Re);os=i(Oa,"Conditional DETR for Fast Training Convergence"),Oa.forEach(o),ns=i(hn," by Depu Meng, Xiaokang Chen, Zejia Fan, Gang Zeng, Houqiang Li, Yuhui Yuan, Lei Sun, Jingdong Wang. Conditional DETR presents a conditional cross-attention mechanism for fast DETR training. Conditional DETR converges 6.7\xD7 to 10\xD7 faster than DETR."),hn.forEach(o),Lo=m(t),Pt=s(t,"P",{});var Qa=r(Pt);ss=i(Qa,"The abstract from the paper is the following:"),Qa.forEach(o),Vo=m(t),Rt=s(t,"P",{});var Ya=r(Rt);Ze=s(Ya,"EM",{});var gn=r(Ze);rs=i(gn,"The recently-developed DETR approach applies the transformer encoder and decoder architecture to object detection and achieves promising performance. In this paper, we handle the critical issue, slow training convergence, and present a conditional cross-attention mechanism for fast DETR training. Our approach is motivated by that the cross-attention in DETR relies highly on the content embeddings for localizing the four extremities and predicting the box, which increases the need for high-quality content embeddings and thus the training difficulty. Our approach, named conditional DETR, learns a conditional spatial query from the decoder embedding for decoder multi-head cross-attention. The benefit is that through the conditional spatial query, each cross-attention head is able to attend to a band containing a distinct region, e.g., one object extremity or a region inside the object box. This narrows down the spatial range for localizing the distinct regions for object classification and box regression, thus relaxing the dependence on the content embeddings and easing the training. Empirical results show that conditional DETR converges 6.7\xD7 faster for the backbones R50 and R101 and 10\xD7 faster for stronger backbones DC5-R50 and DC5-R101. Code is available at "),Se=s(gn,"A",{href:!0,rel:!0});var Ha=r(Se);as=i(Ha,"https://github.com/Atten4Vis/ConditionalDETR"),Ha.forEach(o),is=i(gn,"."),gn.forEach(o),Ya.forEach(o),Xo=m(t),ie=s(t,"IMG",{src:!0,alt:!0,width:!0}),Oo=m(t),le=s(t,"SMALL",{});var fn=r(le);ls=i(fn,"Conditional DETR shows much faster convergence compared to the original DETR. Taken from the "),Zt=s(fn,"A",{href:!0});var Ka=r(Zt);ds=i(Ka,"original paper"),Ka.forEach(o),cs=i(fn,"."),fn.forEach(o),Qo=m(t),S=s(t,"P",{});var ao=r(S);ms=i(ao,"This model was contributed by "),We=s(ao,"A",{href:!0,rel:!0});var ei=r(We);ps=i(ei,"DepuMeng"),ei.forEach(o),hs=i(ao,". The original code can be found "),Ae=s(ao,"A",{href:!0,rel:!0});var ti=r(Ae);gs=i(ti,"here"),ti.forEach(o),fs=i(ao,"."),ao.forEach(o),Yo=m(t),L=s(t,"H2",{class:!0});var un=r(L);de=s(un,"A",{id:!0,class:!0,href:!0});var oi=r(de);fo=s(oi,"SPAN",{});var ni=r(fo);v(Be.$$.fragment,ni),ni.forEach(o),oi.forEach(o),us=m(un),uo=s(un,"SPAN",{});var si=r(uo);_s=i(si,"Documentation resources"),si.forEach(o),un.forEach(o),Ho=m(t),St=s(t,"UL",{});var ri=r(St);_o=s(ri,"LI",{});var ai=r(_o);Wt=s(ai,"A",{href:!0});var ii=r(Wt);bs=i(ii,"Object detection task guide"),ii.forEach(o),ai.forEach(o),ri.forEach(o),Ko=m(t),V=s(t,"H2",{class:!0});var _n=r(V);ce=s(_n,"A",{id:!0,class:!0,href:!0});var li=r(ce);bo=s(li,"SPAN",{});var di=r(bo);v(qe.$$.fragment,di),di.forEach(o),li.forEach(o),vs=m(_n),vo=s(_n,"SPAN",{});var ci=r(vo);ys=i(ci,"ConditionalDetrConfig"),ci.forEach(o),_n.forEach(o),en=m(t),E=s(t,"DIV",{class:!0});var W=r(E);v(Ge.$$.fragment,W),ws=m(W),X=s(W,"P",{});var io=r(X);Cs=i(io,"This is the configuration class to store the configuration of a "),At=s(io,"A",{href:!0});var mi=r(At);Ts=i(mi,"ConditionalDetrModel"),mi.forEach(o),Ds=i(io,`. It is used to instantiate
a Conditional DETR 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 Conditional DETR
`),Le=s(io,"A",{href:!0,rel:!0});var pi=r(Le);Ms=i(pi,"microsoft/conditional-detr-resnet-50"),pi.forEach(o),js=i(io," architecture."),io.forEach(o),xs=m(W),O=s(W,"P",{});var lo=r(O);$s=i(lo,"Configuration objects inherit from "),Bt=s(lo,"A",{href:!0});var hi=r(Bt);ks=i(hi,"PretrainedConfig"),hi.forEach(o),Es=i(lo,` and can be used to control the model outputs. Read the
documentation from `),qt=s(lo,"A",{href:!0});var gi=r(qt);zs=i(gi,"PretrainedConfig"),gi.forEach(o),Fs=i(lo," for more information."),lo.forEach(o),Us=m(W),v(me.$$.fragment,W),Is=m(W),pe=s(W,"DIV",{class:!0});var bn=r(pe);v(Ve.$$.fragment,bn),Js=m(bn),Xe=s(bn,"P",{});var vn=r(Xe);Ns=i(vn,"Serializes this instance to a Python dictionary. Override the default "),Gt=s(vn,"A",{href:!0});var fi=r(Gt);Ps=i(fi,"to_dict()"),fi.forEach(o),Rs=i(vn,"."),vn.forEach(o),bn.forEach(o),W.forEach(o),tn=m(t),Q=s(t,"H2",{class:!0});var yn=r(Q);he=s(yn,"A",{id:!0,class:!0,href:!0});var ui=r(he);yo=s(ui,"SPAN",{});var _i=r(yo);v(Oe.$$.fragment,_i),_i.forEach(o),ui.forEach(o),Zs=m(yn),wo=s(yn,"SPAN",{});var bi=r(wo);Ss=i(bi,"ConditionalDetrImageProcessor"),bi.forEach(o),yn.forEach(o),on=m(t),x=s(t,"DIV",{class:!0});var J=r(x);v(Qe.$$.fragment,J),Ws=m(J),Co=s(J,"P",{});var vi=r(Co);As=i(vi,"Constructs a Conditional Detr image processor."),vi.forEach(o),Bs=m(J),ge=s(J,"DIV",{class:!0});var wn=r(ge);v(Ye.$$.fragment,wn),qs=m(wn),To=s(wn,"P",{});var yi=r(To);Gs=i(yi,"Preprocess an image or a batch of images so that it can be used by the model."),yi.forEach(o),wn.forEach(o),Ls=m(J),fe=s(J,"DIV",{class:!0});var Cn=r(fe);v(He.$$.fragment,Cn),Vs=m(Cn),Ke=s(Cn,"P",{});var Tn=r(Ke);Xs=i(Tn,"Converts the raw output of "),Lt=s(Tn,"A",{href:!0});var wi=r(Lt);Os=i(wi,"ConditionalDetrForObjectDetection"),wi.forEach(o),Qs=i(Tn,` into final bounding boxes in (top_left_x,
top_left_y, bottom_right_x, bottom_right_y) format. Only supports PyTorch.`),Tn.forEach(o),Cn.forEach(o),Ys=m(J),ue=s(J,"DIV",{class:!0});var Dn=r(ue);v(et.$$.fragment,Dn),Hs=m(Dn),tt=s(Dn,"P",{});var Mn=r(tt);Ks=i(Mn,"Converts the output of "),Vt=s(Mn,"A",{href:!0});var Ci=r(Vt);er=i(Ci,"ConditionalDetrForSegmentation"),Ci.forEach(o),tr=i(Mn,` into instance segmentation predictions. Only supports
PyTorch.`),Mn.forEach(o),Dn.forEach(o),or=m(J),_e=s(J,"DIV",{class:!0});var jn=r(_e);v(ot.$$.fragment,jn),nr=m(jn),nt=s(jn,"P",{});var xn=r(nt);sr=i(xn,"Converts the output of "),Xt=s(xn,"A",{href:!0});var Ti=r(Xt);rr=i(Ti,"ConditionalDetrForSegmentation"),Ti.forEach(o),ar=i(xn,` into semantic segmentation maps. Only supports
PyTorch.`),xn.forEach(o),jn.forEach(o),ir=m(J),be=s(J,"DIV",{class:!0});var $n=r(be);v(st.$$.fragment,$n),lr=m($n),rt=s($n,"P",{});var kn=r(rt);dr=i(kn,"Converts the output of "),Ot=s(kn,"A",{href:!0});var Di=r(Ot);cr=i(Di,"ConditionalDetrForSegmentation"),Di.forEach(o),mr=i(kn,` into image panoptic segmentation predictions. Only
supports PyTorch.`),kn.forEach(o),$n.forEach(o),J.forEach(o),nn=m(t),Y=s(t,"H2",{class:!0});var En=r(Y);ve=s(En,"A",{id:!0,class:!0,href:!0});var Mi=r(ve);Do=s(Mi,"SPAN",{});var ji=r(Do);v(at.$$.fragment,ji),ji.forEach(o),Mi.forEach(o),pr=m(En),Mo=s(En,"SPAN",{});var xi=r(Mo);hr=i(xi,"ConditionalDetrFeatureExtractor"),xi.forEach(o),En.forEach(o),sn=m(t),$=s(t,"DIV",{class:!0});var Z=r($);v(it.$$.fragment,Z),gr=m(Z),ye=s(Z,"DIV",{class:!0});var zn=r(ye);v(lt.$$.fragment,zn),fr=m(zn),jo=s(zn,"P",{});var $i=r(jo);ur=i($i,"Preprocess an image or a batch of images."),$i.forEach(o),zn.forEach(o),_r=m(Z),we=s(Z,"DIV",{class:!0});var Fn=r(we);v(dt.$$.fragment,Fn),br=m(Fn),ct=s(Fn,"P",{});var Un=r(ct);vr=i(Un,"Converts the raw output of "),Qt=s(Un,"A",{href:!0});var ki=r(Qt);yr=i(ki,"ConditionalDetrForObjectDetection"),ki.forEach(o),wr=i(Un,` into final bounding boxes in (top_left_x,
top_left_y, bottom_right_x, bottom_right_y) format. Only supports PyTorch.`),Un.forEach(o),Fn.forEach(o),Cr=m(Z),Ce=s(Z,"DIV",{class:!0});var In=r(Ce);v(mt.$$.fragment,In),Tr=m(In),pt=s(In,"P",{});var Jn=r(pt);Dr=i(Jn,"Converts the output of "),Yt=s(Jn,"A",{href:!0});var Ei=r(Yt);Mr=i(Ei,"ConditionalDetrForSegmentation"),Ei.forEach(o),jr=i(Jn,` into instance segmentation predictions. Only supports
PyTorch.`),Jn.forEach(o),In.forEach(o),xr=m(Z),Te=s(Z,"DIV",{class:!0});var Nn=r(Te);v(ht.$$.fragment,Nn),$r=m(Nn),gt=s(Nn,"P",{});var Pn=r(gt);kr=i(Pn,"Converts the output of "),Ht=s(Pn,"A",{href:!0});var zi=r(Ht);Er=i(zi,"ConditionalDetrForSegmentation"),zi.forEach(o),zr=i(Pn,` into semantic segmentation maps. Only supports
PyTorch.`),Pn.forEach(o),Nn.forEach(o),Fr=m(Z),De=s(Z,"DIV",{class:!0});var Rn=r(De);v(ft.$$.fragment,Rn),Ur=m(Rn),ut=s(Rn,"P",{});var Zn=r(ut);Ir=i(Zn,"Converts the output of "),Kt=s(Zn,"A",{href:!0});var Fi=r(Kt);Jr=i(Fi,"ConditionalDetrForSegmentation"),Fi.forEach(o),Nr=i(Zn,` into image panoptic segmentation predictions. Only
supports PyTorch.`),Zn.forEach(o),Rn.forEach(o),Z.forEach(o),rn=m(t),H=s(t,"H2",{class:!0});var Sn=r(H);Me=s(Sn,"A",{id:!0,class:!0,href:!0});var Ui=r(Me);xo=s(Ui,"SPAN",{});var Ii=r(xo);v(_t.$$.fragment,Ii),Ii.forEach(o),Ui.forEach(o),Pr=m(Sn),$o=s(Sn,"SPAN",{});var Ji=r($o);Rr=i(Ji,"ConditionalDetrModel"),Ji.forEach(o),Sn.forEach(o),an=m(t),z=s(t,"DIV",{class:!0});var A=r(z);v(bt.$$.fragment,A),Zr=m(A),ko=s(A,"P",{});var Ni=r(ko);Sr=i(Ni,`The bare Conditional DETR Model (consisting of a backbone and encoder-decoder Transformer) outputting raw
hidden-states without any specific head on top.`),Ni.forEach(o),Wr=m(A),vt=s(A,"P",{});var Wn=r(vt);Ar=i(Wn,"This model inherits from "),eo=s(Wn,"A",{href:!0});var Pi=r(eo);Br=i(Pi,"PreTrainedModel"),Pi.forEach(o),qr=i(Wn,`. 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.)`),Wn.forEach(o),Gr=m(A),yt=s(A,"P",{});var An=r(yt);Lr=i(An,"This model is also a PyTorch "),wt=s(An,"A",{href:!0,rel:!0});var Ri=r(wt);Vr=i(Ri,"torch.nn.Module"),Ri.forEach(o),Xr=i(An,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),An.forEach(o),Or=m(A),N=s(A,"DIV",{class:!0});var Ie=r(N);v(Ct.$$.fragment,Ie),Qr=m(Ie),K=s(Ie,"P",{});var co=r(K);Yr=i(co,"The "),to=s(co,"A",{href:!0});var Zi=r(to);Hr=i(Zi,"ConditionalDetrModel"),Zi.forEach(o),Kr=i(co," forward method, overrides the "),Eo=s(co,"CODE",{});var Si=r(Eo);ea=i(Si,"__call__"),Si.forEach(o),ta=i(co," special method."),co.forEach(o),oa=m(Ie),v(je.$$.fragment,Ie),na=m(Ie),v(xe.$$.fragment,Ie),Ie.forEach(o),A.forEach(o),ln=m(t),ee=s(t,"H2",{class:!0});var Bn=r(ee);$e=s(Bn,"A",{id:!0,class:!0,href:!0});var Wi=r($e);zo=s(Wi,"SPAN",{});var Ai=r(zo);v(Tt.$$.fragment,Ai),Ai.forEach(o),Wi.forEach(o),sa=m(Bn),Fo=s(Bn,"SPAN",{});var Bi=r(Fo);ra=i(Bi,"ConditionalDetrForObjectDetection"),Bi.forEach(o),Bn.forEach(o),dn=m(t),F=s(t,"DIV",{class:!0});var B=r(F);v(Dt.$$.fragment,B),aa=m(B),Uo=s(B,"P",{});var qi=r(Uo);ia=i(qi,`CONDITIONAL_DETR Model (consisting of a backbone and encoder-decoder Transformer) with object detection heads on
top, for tasks such as COCO detection.`),qi.forEach(o),la=m(B),Mt=s(B,"P",{});var qn=r(Mt);da=i(qn,"This model inherits from "),oo=s(qn,"A",{href:!0});var Gi=r(oo);ca=i(Gi,"PreTrainedModel"),Gi.forEach(o),ma=i(qn,`. 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.)`),qn.forEach(o),pa=m(B),jt=s(B,"P",{});var Gn=r(jt);ha=i(Gn,"This model is also a PyTorch "),xt=s(Gn,"A",{href:!0,rel:!0});var Li=r(xt);ga=i(Li,"torch.nn.Module"),Li.forEach(o),fa=i(Gn,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Gn.forEach(o),ua=m(B),P=s(B,"DIV",{class:!0});var Je=r(P);v($t.$$.fragment,Je),_a=m(Je),te=s(Je,"P",{});var mo=r(te);ba=i(mo,"The "),no=s(mo,"A",{href:!0});var Vi=r(no);va=i(Vi,"ConditionalDetrForObjectDetection"),Vi.forEach(o),ya=i(mo," forward method, overrides the "),Io=s(mo,"CODE",{});var Xi=r(Io);wa=i(Xi,"__call__"),Xi.forEach(o),Ca=i(mo," special method."),mo.forEach(o),Ta=m(Je),v(ke.$$.fragment,Je),Da=m(Je),v(Ee.$$.fragment,Je),Je.forEach(o),B.forEach(o),cn=m(t),oe=s(t,"H2",{class:!0});var Ln=r(oe);ze=s(Ln,"A",{id:!0,class:!0,href:!0});var Oi=r(ze);Jo=s(Oi,"SPAN",{});var Qi=r(Jo);v(kt.$$.fragment,Qi),Qi.forEach(o),Oi.forEach(o),Ma=m(Ln),No=s(Ln,"SPAN",{});var Yi=r(No);ja=i(Yi,"ConditionalDetrForSegmentation"),Yi.forEach(o),Ln.forEach(o),mn=m(t),U=s(t,"DIV",{class:!0});var q=r(U);v(Et.$$.fragment,q),xa=m(q),Po=s(q,"P",{});var Hi=r(Po);$a=i(Hi,`CONDITIONAL_DETR Model (consisting of a backbone and encoder-decoder Transformer) with a segmentation head on top,
for tasks such as COCO panoptic.`),Hi.forEach(o),ka=m(q),zt=s(q,"P",{});var Vn=r(zt);Ea=i(Vn,"This model inherits from "),so=s(Vn,"A",{href:!0});var Ki=r(so);za=i(Ki,"PreTrainedModel"),Ki.forEach(o),Fa=i(Vn,`. 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.)`),Vn.forEach(o),Ua=m(q),Ft=s(q,"P",{});var Xn=r(Ft);Ia=i(Xn,"This model is also a PyTorch "),Ut=s(Xn,"A",{href:!0,rel:!0});var el=r(Ut);Ja=i(el,"torch.nn.Module"),el.forEach(o),Na=i(Xn,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Xn.forEach(o),Pa=m(q),R=s(q,"DIV",{class:!0});var Ne=r(R);v(It.$$.fragment,Ne),Ra=m(Ne),ne=s(Ne,"P",{});var po=r(ne);Za=i(po,"The "),ro=s(po,"A",{href:!0});var tl=r(ro);Sa=i(tl,"ConditionalDetrForSegmentation"),tl.forEach(o),Wa=i(po," forward method, overrides the "),Ro=s(po,"CODE",{});var ol=r(Ro);Aa=i(ol,"__call__"),ol.forEach(o),Ba=i(po," special method."),po.forEach(o),qa=m(Ne),v(Fe.$$.fragment,Ne),Ga=m(Ne),v(Ue.$$.fragment,Ne),Ne.forEach(o),q.forEach(o),this.h()},h(){l(p,"name","hf:doc:metadata"),l(p,"content",JSON.stringify(_l)),l(f,"id","conditional-detr"),l(f,"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(f,"href","#conditional-detr"),l(_,"class","relative group"),l(re,"id","overview"),l(re,"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(re,"href","#overview"),l(G,"class","relative group"),l(Re,"href","https://arxiv.org/abs/2108.06152"),l(Re,"rel","nofollow"),l(Se,"href","https://github.com/Atten4Vis/ConditionalDETR"),l(Se,"rel","nofollow"),il(ie.src,Va="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/conditional_detr_curve.jpg")||l(ie,"src",Va),l(ie,"alt","drawing"),l(ie,"width","600"),l(Zt,"href","https://arxiv.org/abs/2108.06152"),l(We,"href","https://huggingface.co/DepuMeng"),l(We,"rel","nofollow"),l(Ae,"href","https://github.com/Atten4Vis/ConditionalDETR"),l(Ae,"rel","nofollow"),l(de,"id","documentation-resources"),l(de,"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(de,"href","#documentation-resources"),l(L,"class","relative group"),l(Wt,"href","../tasks/object_detection"),l(ce,"id","transformers.ConditionalDetrConfig"),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.ConditionalDetrConfig"),l(V,"class","relative group"),l(At,"href","/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrModel"),l(Le,"href","https://huggingface.co/microsoft/conditional-detr-resnet-50"),l(Le,"rel","nofollow"),l(Bt,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(qt,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(Gt,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig.to_dict"),l(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(he,"id","transformers.ConditionalDetrImageProcessor"),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.ConditionalDetrImageProcessor"),l(Q,"class","relative group"),l(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Lt,"href","/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrForObjectDetection"),l(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Vt,"href","/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation"),l(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Xt,"href","/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation"),l(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ot,"href","/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation"),l(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ve,"id","transformers.ConditionalDetrFeatureExtractor"),l(ve,"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(ve,"href","#transformers.ConditionalDetrFeatureExtractor"),l(Y,"class","relative group"),l(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Qt,"href","/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrForObjectDetection"),l(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Yt,"href","/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation"),l(Ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ht,"href","/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation"),l(Te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Kt,"href","/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation"),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($,"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,"id","transformers.ConditionalDetrModel"),l(Me,"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(Me,"href","#transformers.ConditionalDetrModel"),l(H,"class","relative group"),l(eo,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),l(wt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(wt,"rel","nofollow"),l(to,"href","/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrModel"),l(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l($e,"id","transformers.ConditionalDetrForObjectDetection"),l($e,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l($e,"href","#transformers.ConditionalDetrForObjectDetection"),l(ee,"class","relative group"),l(oo,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),l(xt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(xt,"rel","nofollow"),l(no,"href","/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrForObjectDetection"),l(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ze,"id","transformers.ConditionalDetrForSegmentation"),l(ze,"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(ze,"href","#transformers.ConditionalDetrForSegmentation"),l(oe,"class","relative group"),l(so,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),l(Ut,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(Ut,"rel","nofollow"),l(ro,"href","/docs/transformers/v4.31.0/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation"),l(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,h){e(document.head,p),g(t,M,h),g(t,_,h),e(_,f),e(f,D),y(d,D,null),e(_,u),e(_,I),e(I,Hn),g(t,qo,h),g(t,G,h),e(G,re),e(re,ho),y(Pe,ho,null),e(G,Kn),e(G,go),e(go,es),g(t,Go,h),g(t,ae,h),e(ae,ts),e(ae,Re),e(Re,os),e(ae,ns),g(t,Lo,h),g(t,Pt,h),e(Pt,ss),g(t,Vo,h),g(t,Rt,h),e(Rt,Ze),e(Ze,rs),e(Ze,Se),e(Se,as),e(Ze,is),g(t,Xo,h),g(t,ie,h),g(t,Oo,h),g(t,le,h),e(le,ls),e(le,Zt),e(Zt,ds),e(le,cs),g(t,Qo,h),g(t,S,h),e(S,ms),e(S,We),e(We,ps),e(S,hs),e(S,Ae),e(Ae,gs),e(S,fs),g(t,Yo,h),g(t,L,h),e(L,de),e(de,fo),y(Be,fo,null),e(L,us),e(L,uo),e(uo,_s),g(t,Ho,h),g(t,St,h),e(St,_o),e(_o,Wt),e(Wt,bs),g(t,Ko,h),g(t,V,h),e(V,ce),e(ce,bo),y(qe,bo,null),e(V,vs),e(V,vo),e(vo,ys),g(t,en,h),g(t,E,h),y(Ge,E,null),e(E,ws),e(E,X),e(X,Cs),e(X,At),e(At,Ts),e(X,Ds),e(X,Le),e(Le,Ms),e(X,js),e(E,xs),e(E,O),e(O,$s),e(O,Bt),e(Bt,ks),e(O,Es),e(O,qt),e(qt,zs),e(O,Fs),e(E,Us),y(me,E,null),e(E,Is),e(E,pe),y(Ve,pe,null),e(pe,Js),e(pe,Xe),e(Xe,Ns),e(Xe,Gt),e(Gt,Ps),e(Xe,Rs),g(t,tn,h),g(t,Q,h),e(Q,he),e(he,yo),y(Oe,yo,null),e(Q,Zs),e(Q,wo),e(wo,Ss),g(t,on,h),g(t,x,h),y(Qe,x,null),e(x,Ws),e(x,Co),e(Co,As),e(x,Bs),e(x,ge),y(Ye,ge,null),e(ge,qs),e(ge,To),e(To,Gs),e(x,Ls),e(x,fe),y(He,fe,null),e(fe,Vs),e(fe,Ke),e(Ke,Xs),e(Ke,Lt),e(Lt,Os),e(Ke,Qs),e(x,Ys),e(x,ue),y(et,ue,null),e(ue,Hs),e(ue,tt),e(tt,Ks),e(tt,Vt),e(Vt,er),e(tt,tr),e(x,or),e(x,_e),y(ot,_e,null),e(_e,nr),e(_e,nt),e(nt,sr),e(nt,Xt),e(Xt,rr),e(nt,ar),e(x,ir),e(x,be),y(st,be,null),e(be,lr),e(be,rt),e(rt,dr),e(rt,Ot),e(Ot,cr),e(rt,mr),g(t,nn,h),g(t,Y,h),e(Y,ve),e(ve,Do),y(at,Do,null),e(Y,pr),e(Y,Mo),e(Mo,hr),g(t,sn,h),g(t,$,h),y(it,$,null),e($,gr),e($,ye),y(lt,ye,null),e(ye,fr),e(ye,jo),e(jo,ur),e($,_r),e($,we),y(dt,we,null),e(we,br),e(we,ct),e(ct,vr),e(ct,Qt),e(Qt,yr),e(ct,wr),e($,Cr),e($,Ce),y(mt,Ce,null),e(Ce,Tr),e(Ce,pt),e(pt,Dr),e(pt,Yt),e(Yt,Mr),e(pt,jr),e($,xr),e($,Te),y(ht,Te,null),e(Te,$r),e(Te,gt),e(gt,kr),e(gt,Ht),e(Ht,Er),e(gt,zr),e($,Fr),e($,De),y(ft,De,null),e(De,Ur),e(De,ut),e(ut,Ir),e(ut,Kt),e(Kt,Jr),e(ut,Nr),g(t,rn,h),g(t,H,h),e(H,Me),e(Me,xo),y(_t,xo,null),e(H,Pr),e(H,$o),e($o,Rr),g(t,an,h),g(t,z,h),y(bt,z,null),e(z,Zr),e(z,ko),e(ko,Sr),e(z,Wr),e(z,vt),e(vt,Ar),e(vt,eo),e(eo,Br),e(vt,qr),e(z,Gr),e(z,yt),e(yt,Lr),e(yt,wt),e(wt,Vr),e(yt,Xr),e(z,Or),e(z,N),y(Ct,N,null),e(N,Qr),e(N,K),e(K,Yr),e(K,to),e(to,Hr),e(K,Kr),e(K,Eo),e(Eo,ea),e(K,ta),e(N,oa),y(je,N,null),e(N,na),y(xe,N,null),g(t,ln,h),g(t,ee,h),e(ee,$e),e($e,zo),y(Tt,zo,null),e(ee,sa),e(ee,Fo),e(Fo,ra),g(t,dn,h),g(t,F,h),y(Dt,F,null),e(F,aa),e(F,Uo),e(Uo,ia),e(F,la),e(F,Mt),e(Mt,da),e(Mt,oo),e(oo,ca),e(Mt,ma),e(F,pa),e(F,jt),e(jt,ha),e(jt,xt),e(xt,ga),e(jt,fa),e(F,ua),e(F,P),y($t,P,null),e(P,_a),e(P,te),e(te,ba),e(te,no),e(no,va),e(te,ya),e(te,Io),e(Io,wa),e(te,Ca),e(P,Ta),y(ke,P,null),e(P,Da),y(Ee,P,null),g(t,cn,h),g(t,oe,h),e(oe,ze),e(ze,Jo),y(kt,Jo,null),e(oe,Ma),e(oe,No),e(No,ja),g(t,mn,h),g(t,U,h),y(Et,U,null),e(U,xa),e(U,Po),e(Po,$a),e(U,ka),e(U,zt),e(zt,Ea),e(zt,so),e(so,za),e(zt,Fa),e(U,Ua),e(U,Ft),e(Ft,Ia),e(Ft,Ut),e(Ut,Ja),e(Ft,Na),e(U,Pa),e(U,R),y(It,R,null),e(R,Ra),e(R,ne),e(ne,Za),e(ne,ro),e(ro,Sa),e(ne,Wa),e(ne,Ro),e(Ro,Aa),e(ne,Ba),e(R,qa),y(Fe,R,null),e(R,Ga),y(Ue,R,null),pn=!0},p(t,[h]){const Jt={};h&2&&(Jt.$$scope={dirty:h,ctx:t}),me.$set(Jt);const Zo={};h&2&&(Zo.$$scope={dirty:h,ctx:t}),je.$set(Zo);const So={};h&2&&(So.$$scope={dirty:h,ctx:t}),xe.$set(So);const Wo={};h&2&&(Wo.$$scope={dirty:h,ctx:t}),ke.$set(Wo);const Nt={};h&2&&(Nt.$$scope={dirty:h,ctx:t}),Ee.$set(Nt);const Ao={};h&2&&(Ao.$$scope={dirty:h,ctx:t}),Fe.$set(Ao);const Bo={};h&2&&(Bo.$$scope={dirty:h,ctx:t}),Ue.$set(Bo)},i(t){pn||(w(d.$$.fragment,t),w(Pe.$$.fragment,t),w(Be.$$.fragment,t),w(qe.$$.fragment,t),w(Ge.$$.fragment,t),w(me.$$.fragment,t),w(Ve.$$.fragment,t),w(Oe.$$.fragment,t),w(Qe.$$.fragment,t),w(Ye.$$.fragment,t),w(He.$$.fragment,t),w(et.$$.fragment,t),w(ot.$$.fragment,t),w(st.$$.fragment,t),w(at.$$.fragment,t),w(it.$$.fragment,t),w(lt.$$.fragment,t),w(dt.$$.fragment,t),w(mt.$$.fragment,t),w(ht.$$.fragment,t),w(ft.$$.fragment,t),w(_t.$$.fragment,t),w(bt.$$.fragment,t),w(Ct.$$.fragment,t),w(je.$$.fragment,t),w(xe.$$.fragment,t),w(Tt.$$.fragment,t),w(Dt.$$.fragment,t),w($t.$$.fragment,t),w(ke.$$.fragment,t),w(Ee.$$.fragment,t),w(kt.$$.fragment,t),w(Et.$$.fragment,t),w(It.$$.fragment,t),w(Fe.$$.fragment,t),w(Ue.$$.fragment,t),pn=!0)},o(t){C(d.$$.fragment,t),C(Pe.$$.fragment,t),C(Be.$$.fragment,t),C(qe.$$.fragment,t),C(Ge.$$.fragment,t),C(me.$$.fragment,t),C(Ve.$$.fragment,t),C(Oe.$$.fragment,t),C(Qe.$$.fragment,t),C(Ye.$$.fragment,t),C(He.$$.fragment,t),C(et.$$.fragment,t),C(ot.$$.fragment,t),C(st.$$.fragment,t),C(at.$$.fragment,t),C(it.$$.fragment,t),C(lt.$$.fragment,t),C(dt.$$.fragment,t),C(mt.$$.fragment,t),C(ht.$$.fragment,t),C(ft.$$.fragment,t),C(_t.$$.fragment,t),C(bt.$$.fragment,t),C(Ct.$$.fragment,t),C(je.$$.fragment,t),C(xe.$$.fragment,t),C(Tt.$$.fragment,t),C(Dt.$$.fragment,t),C($t.$$.fragment,t),C(ke.$$.fragment,t),C(Ee.$$.fragment,t),C(kt.$$.fragment,t),C(Et.$$.fragment,t),C(It.$$.fragment,t),C(Fe.$$.fragment,t),C(Ue.$$.fragment,t),pn=!1},d(t){o(p),t&&o(M),t&&o(_),T(d),t&&o(qo),t&&o(G),T(Pe),t&&o(Go),t&&o(ae),t&&o(Lo),t&&o(Pt),t&&o(Vo),t&&o(Rt),t&&o(Xo),t&&o(ie),t&&o(Oo),t&&o(le),t&&o(Qo),t&&o(S),t&&o(Yo),t&&o(L),T(Be),t&&o(Ho),t&&o(St),t&&o(Ko),t&&o(V),T(qe),t&&o(en),t&&o(E),T(Ge),T(me),T(Ve),t&&o(tn),t&&o(Q),T(Oe),t&&o(on),t&&o(x),T(Qe),T(Ye),T(He),T(et),T(ot),T(st),t&&o(nn),t&&o(Y),T(at),t&&o(sn),t&&o($),T(it),T(lt),T(dt),T(mt),T(ht),T(ft),t&&o(rn),t&&o(H),T(_t),t&&o(an),t&&o(z),T(bt),T(Ct),T(je),T(xe),t&&o(ln),t&&o(ee),T(Tt),t&&o(dn),t&&o(F),T(Dt),T($t),T(ke),T(Ee),t&&o(cn),t&&o(oe),T(kt),t&&o(mn),t&&o(U),T(Et),T(It),T(Fe),T(Ue)}}}const _l={local:"conditional-detr",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.ConditionalDetrConfig",title:"ConditionalDetrConfig"},{local:"transformers.ConditionalDetrImageProcessor",title:"ConditionalDetrImageProcessor"},{local:"transformers.ConditionalDetrFeatureExtractor",title:"ConditionalDetrFeatureExtractor"},{local:"transformers.ConditionalDetrModel",title:"ConditionalDetrModel"},{local:"transformers.ConditionalDetrForObjectDetection",title:"ConditionalDetrForObjectDetection"},{local:"transformers.ConditionalDetrForSegmentation",title:"ConditionalDetrForSegmentation"}],title:"Conditional DETR"};function bl(k){return ll(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ml extends nl{constructor(p){super();sl(this,p,bl,ul,rl,{})}}export{Ml as default,_l as metadata};
