import{S as Ri,i as Ui,s as Vi,e as n,k as l,w as b,t as a,M as Wi,c as s,d as t,m,a as r,x as v,h as i,b as d,N as Hi,G as e,g as u,y,q as D,o as C,B as w,v as Yi,L as Rn}from"../../chunks/vendor-hf-doc-builder.js";import{T as Aa}from"../../chunks/Tip-hf-doc-builder.js";import{D as k}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Un}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Ae}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Mn}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Bi(F){let p,x,_,g,T;return g=new Un({props:{code:`from transformers import ConditionalDetrConfig, ConditionalDetrModel

# Initializing a Conditional DETR microsoft/conditional-detr-resnet-50 style configuration
configuration = ConditionalDetrConfig()

# Initializing a model (with random weights) from the microsoft/conditional-detr-resnet-50 style configuration
model = ConditionalDetrModel(configuration)

# Accessing the model configuration
configuration = model.config`,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"),x=a("Examples:"),_=l(),b(g.$$.fragment)},l(c){p=s(c,"P",{});var f=r(p);x=i(f,"Examples:"),f.forEach(t),_=m(c),v(g.$$.fragment,c)},m(c,f){u(c,p,f),e(p,x),u(c,_,f),y(g,c,f),T=!0},p:Rn,i(c){T||(D(g.$$.fragment,c),T=!0)},o(c){C(g.$$.fragment,c),T=!1},d(c){c&&t(p),c&&t(_),w(g,c)}}}function Gi(F){let p,x,_,g,T;return{c(){p=n("p"),x=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n("code"),g=a("Module"),T=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(c){p=s(c,"P",{});var f=r(p);x=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(f,"CODE",{});var q=r(_);g=i(q,"Module"),q.forEach(t),T=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(c,f){u(c,p,f),e(p,x),e(p,_),e(_,g),e(p,T)},d(c){c&&t(p)}}}function Ji(F){let p,x,_,g,T;return g=new Un({props:{code:`from transformers import AutoImageProcessor, AutoModel
from PIL import Image
import requests

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

image_processor = AutoImageProcessor.from_pretrained("microsoft/conditional-detr-resnet-50")
model = AutoModel.from_pretrained("microsoft/conditional-detr-resnet-50")

# prepare image for the model
inputs = image_processor(images=image, return_tensors="pt")

# forward pass
outputs = model(**inputs)

# the last hidden states are the final query embeddings of the Transformer decoder
# these are of shape (batch_size, num_queries, hidden_size)
last_hidden_states = outputs.last_hidden_state
list(last_hidden_states.shape)`,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"),x=a("Examples:"),_=l(),b(g.$$.fragment)},l(c){p=s(c,"P",{});var f=r(p);x=i(f,"Examples:"),f.forEach(t),_=m(c),v(g.$$.fragment,c)},m(c,f){u(c,p,f),e(p,x),u(c,_,f),y(g,c,f),T=!0},p:Rn,i(c){T||(D(g.$$.fragment,c),T=!0)},o(c){C(g.$$.fragment,c),T=!1},d(c){c&&t(p),c&&t(_),w(g,c)}}}function Xi(F){let p,x,_,g,T;return{c(){p=n("p"),x=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n("code"),g=a("Module"),T=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(c){p=s(c,"P",{});var f=r(p);x=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(f,"CODE",{});var q=r(_);g=i(q,"Module"),q.forEach(t),T=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(c,f){u(c,p,f),e(p,x),e(p,_),e(_,g),e(p,T)},d(c){c&&t(p)}}}function Zi(F){let p,x,_,g,T;return g=new Un({props:{code:`from transformers import AutoImageProcessor, AutoModelForObjectDetection
from PIL import Image
import requests

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

image_processor = AutoImageProcessor.from_pretrained("microsoft/conditional-detr-resnet-50")
model = AutoModelForObjectDetection.from_pretrained("microsoft/conditional-detr-resnet-50")

inputs = image_processor(images=image, return_tensors="pt")

outputs = model(**inputs)

# convert outputs (bounding boxes and class logits) to COCO API
target_sizes = torch.tensor([image.size[::-1]])
results = image_processor.post_process_object_detection(outputs, threshold=0.5, target_sizes=target_sizes)[
    0
]
for score, label, box in zip(results["scores"], results["labels"], results["boxes"]):
    box = [round(i, 2) for i in box.tolist()]
    print(
        f"Detected {model.config.id2label[label.item()]} with confidence "
        f"{round(score.item(), 3)} at location {box}"
    )`,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"),x=a("Examples:"),_=l(),b(g.$$.fragment)},l(c){p=s(c,"P",{});var f=r(p);x=i(f,"Examples:"),f.forEach(t),_=m(c),v(g.$$.fragment,c)},m(c,f){u(c,p,f),e(p,x),u(c,_,f),y(g,c,f),T=!0},p:Rn,i(c){T||(D(g.$$.fragment,c),T=!0)},o(c){C(g.$$.fragment,c),T=!1},d(c){c&&t(p),c&&t(_),w(g,c)}}}function Ki(F){let p,x,_,g,T;return{c(){p=n("p"),x=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n("code"),g=a("Module"),T=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(c){p=s(c,"P",{});var f=r(p);x=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(f,"CODE",{});var q=r(_);g=i(q,"Module"),q.forEach(t),T=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(c,f){u(c,p,f),e(p,x),e(p,_),e(_,g),e(p,T)},d(c){c&&t(p)}}}function Qi(F){let p,x,_,g,T;return g=new Un({props:{code:`import io
import requests
from PIL import Image
import torch
import numpy

from transformers import (
    AutoImageProcessor,
    ConditionalDetrConfig,
    ConditionalDetrForSegmentation,
)
from transformers.image_transforms import rgb_to_id

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

image_processor = AutoImageProcessor.from_pretrained("microsoft/conditional-detr-resnet-50")

# randomly initialize all weights of the model
config = ConditionalDetrConfig()
model = ConditionalDetrForSegmentation(config)

# prepare image for the model
inputs = image_processor(images=image, return_tensors="pt")

# forward pass
outputs = model(**inputs)

# Use the \`post_process_panoptic_segmentation\` method of the \`image_processor\` to retrieve post-processed panoptic segmentation maps
# Segmentation results are returned as a list of dictionaries
result = image_processor.post_process_panoptic_segmentation(outputs, target_sizes=[(300, 500)])
# A tensor of shape (height, width) where each value denotes a segment id, filled with -1 if no segment is found
panoptic_seg = result[0]["segmentation"]
# Get prediction score and segment_id to class_id mapping of each segment
panoptic_segments_info = result[0]["segments_info"]`,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"),x=a("Examples:"),_=l(),b(g.$$.fragment)},l(c){p=s(c,"P",{});var f=r(p);x=i(f,"Examples:"),f.forEach(t),_=m(c),v(g.$$.fragment,c)},m(c,f){u(c,p,f),e(p,x),u(c,_,f),y(g,c,f),T=!0},p:Rn,i(c){T||(D(g.$$.fragment,c),T=!0)},o(c){C(g.$$.fragment,c),T=!1},d(c){c&&t(p),c&&t(_),w(g,c)}}}function ed(F){let p,x,_,g,T,c,f,q,Vn,Nt,W,te,dt,Le,Wn,ct,Hn,St,ne,Yn,Oe,Bn,Gn,Mt,Lo,Jn,Rt,Oo,Ne,Xn,Se,Zn,Kn,Ut,se,La,Vt,re,Qn,No,es,os,Wt,M,ts,Me,ns,ss,Re,rs,as,Ht,H,ae,lt,Ue,is,mt,ds,Yt,L,Ve,cs,Y,ls,So,ms,ps,We,hs,gs,fs,B,us,Mo,_s,bs,Ro,vs,ys,Ds,ie,Bt,G,de,pt,He,Cs,ht,ws,Gt,$,Ye,Ts,gt,xs,$s,ce,Be,ks,ft,js,Fs,le,Ge,Es,ut,zs,Ps,me,Je,Is,Xe,qs,Uo,As,Ls,Os,pe,Ze,Ns,Ke,Ss,Vo,Ms,Rs,Us,he,Qe,Vs,eo,Ws,Wo,Hs,Ys,Bs,ge,oo,Gs,to,Js,Ho,Xs,Zs,Jt,J,fe,_t,no,Ks,bt,Qs,Xt,j,so,er,ue,ro,or,vt,tr,nr,_e,ao,sr,yt,rr,ar,be,io,ir,co,dr,Yo,cr,lr,mr,ve,lo,pr,mo,hr,Bo,gr,fr,ur,ye,po,_r,ho,br,Go,vr,yr,Dr,De,go,Cr,fo,wr,Jo,Tr,xr,Zt,X,Ce,Dt,uo,$r,Ct,kr,Kt,z,_o,jr,wt,Fr,Er,bo,zr,Xo,Pr,Ir,qr,vo,Ar,yo,Lr,Or,Nr,O,Do,Sr,Z,Mr,Zo,Rr,Ur,Tt,Vr,Wr,Hr,we,Yr,Te,Qt,K,xe,xt,Co,Br,$t,Gr,en,P,wo,Jr,kt,Xr,Zr,To,Kr,Ko,Qr,ea,oa,xo,ta,$o,na,sa,ra,N,ko,aa,Q,ia,Qo,da,ca,jt,la,ma,pa,$e,ha,ke,on,ee,je,Ft,jo,ga,Et,fa,tn,I,Fo,ua,zt,_a,ba,Eo,va,et,ya,Da,Ca,zo,wa,Po,Ta,xa,$a,S,Io,ka,oe,ja,ot,Fa,Ea,Pt,za,Pa,Ia,Fe,qa,Ee,nn;return c=new Ae({}),Le=new Ae({}),Ue=new Ae({}),Ve=new k({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:"classifier_dropout",val:" = 0.0"},{name:"scale_embedding",val:" = False"},{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/main/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/main/src/transformers/models/conditional_detr/configuration_conditional_detr.py#L37"}}),ie=new Mn({props:{anchor:"transformers.ConditionalDetrConfig.example",$$slots:{default:[Bi]},$$scope:{ctx:F}}}),He=new Ae({}),Ye=new k({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/main/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L741"}}),Be=new k({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 annotionation is for object
detection, the annotations should be a dictionary with the following keys:<ul>
<li>&#x201C;image_id&#x201D; (<code>int</code>): The image id.</li>
<li>&#x201C;annotations&#x201D; (<code>List[Dict]</code>): List of annotations for an image. Each annotation should be a
dictionary. An image can have no annotations, in which case the list should be empty.
If annotionation is for segmentation, the annotations should be a dictionary with the following keys:</li>
<li>&#x201C;image_id&#x201D; (<code>int</code>): The image id.</li>
<li>&#x201C;segments_info&#x201D; (<code>List[Dict]</code>): List of segments for an image. Each segment should be a dictionary.
An image can have no segments, in which case the list should be empty.</li>
<li>&#x201C;file_name&#x201D; (<code>str</code>): The file name of the image.</li>
</ul>`,name:"annotations"},{anchor:"transformers.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/main/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L1074"}}),Ge=new k({props:{name:"pad_and_create_pixel_mask",anchor:"transformers.ConditionalDetrImageProcessor.pad_and_create_pixel_mask",parameters:[{name:"pixel_values_list",val:": typing.List[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:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"data_format",val:": typing.Optional[transformers.image_utils.ChannelDimension] = None"}],parametersDescription:[{anchor:"transformers.ConditionalDetrImageProcessor.pad_and_create_pixel_mask.images",description:`<strong>images</strong> (<code>List[np.ndarray]</code>) &#x2014;
Batch of images to pad.`,name:"images"},{anchor:"transformers.ConditionalDetrImageProcessor.pad_and_create_pixel_mask.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>) &#x2014;
The type of tensors to return. Can be one of:<ul>
<li>Unset: Return a list of <code>np.ndarray</code>.</li>
<li><code>TensorType.TENSORFLOW</code> or <code>&apos;tf&apos;</code>: Return a batch of type <code>tf.Tensor</code>.</li>
<li><code>TensorType.PYTORCH</code> or <code>&apos;pt&apos;</code>: Return a batch of type <code>torch.Tensor</code>.</li>
<li><code>TensorType.NUMPY</code> or <code>&apos;np&apos;</code>: Return a batch of type <code>np.ndarray</code>.</li>
<li><code>TensorType.JAX</code> or <code>&apos;jax&apos;</code>: Return a batch of type <code>jax.numpy.ndarray</code>.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.ConditionalDetrImageProcessor.pad_and_create_pixel_mask.data_format",description:`<strong>data_format</strong> (<code>str</code> or <code>ChannelDimension</code>, <em>optional</em>) &#x2014;
The channel dimension format of the image. If not provided, it will be the same as the input image.`,name:"data_format"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L977"}}),Je=new k({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"}],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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L1329",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>
`}}),Ze=new k({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/main/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/main/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L1433",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>
`}}),Qe=new k({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/main/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/main/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L1384",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>
`}}),oo=new k({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/main/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation">ConditionalDetrForSegmentation</a>) &#x2014;
The outputs from <a href="/docs/transformers/main/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/main/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L1518",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>
`}}),no=new Ae({}),so=new k({props:{name:"class transformers.ConditionalDetrFeatureExtractor",anchor:"transformers.ConditionalDetrFeatureExtractor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/conditional_detr/feature_extraction_conditional_detr.py#L26"}}),ro=new k({props:{name:"__call__",anchor:"transformers.ConditionalDetrFeatureExtractor.__call__",parameters:[{name:"images",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/image_processing_utils.py#L448"}}),ao=new k({props:{name:"pad_and_create_pixel_mask",anchor:"transformers.ConditionalDetrFeatureExtractor.pad_and_create_pixel_mask",parameters:[{name:"pixel_values_list",val:": typing.List[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:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"data_format",val:": typing.Optional[transformers.image_utils.ChannelDimension] = None"}],parametersDescription:[{anchor:"transformers.ConditionalDetrFeatureExtractor.pad_and_create_pixel_mask.images",description:`<strong>images</strong> (<code>List[np.ndarray]</code>) &#x2014;
Batch of images to pad.`,name:"images"},{anchor:"transformers.ConditionalDetrFeatureExtractor.pad_and_create_pixel_mask.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>) &#x2014;
The type of tensors to return. Can be one of:<ul>
<li>Unset: Return a list of <code>np.ndarray</code>.</li>
<li><code>TensorType.TENSORFLOW</code> or <code>&apos;tf&apos;</code>: Return a batch of type <code>tf.Tensor</code>.</li>
<li><code>TensorType.PYTORCH</code> or <code>&apos;pt&apos;</code>: Return a batch of type <code>torch.Tensor</code>.</li>
<li><code>TensorType.NUMPY</code> or <code>&apos;np&apos;</code>: Return a batch of type <code>np.ndarray</code>.</li>
<li><code>TensorType.JAX</code> or <code>&apos;jax&apos;</code>: Return a batch of type <code>jax.numpy.ndarray</code>.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.ConditionalDetrFeatureExtractor.pad_and_create_pixel_mask.data_format",description:`<strong>data_format</strong> (<code>str</code> or <code>ChannelDimension</code>, <em>optional</em>) &#x2014;
The channel dimension format of the image. If not provided, it will be the same as the input image.`,name:"data_format"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L977"}}),io=new k({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"}],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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L1329",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>
`}}),lo=new k({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/main/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/main/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L1433",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>
`}}),po=new k({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/main/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/main/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L1384",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>
`}}),go=new k({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/main/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation">ConditionalDetrForSegmentation</a>) &#x2014;
The outputs from <a href="/docs/transformers/main/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/main/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L1518",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>
`}}),uo=new Ae({}),_o=new k({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/conditional_detr/modeling_conditional_detr.py#L1478"}}),Do=new k({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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/poolformer#transformers.PoolFormerFeatureExtractor.__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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/conditional_detr/modeling_conditional_detr.py#L1512",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/main/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>
`}}),we=new Aa({props:{$$slots:{default:[Gi]},$$scope:{ctx:F}}}),Te=new Mn({props:{anchor:"transformers.ConditionalDetrModel.forward.example",$$slots:{default:[Ji]},$$scope:{ctx:F}}}),Co=new Ae({}),wo=new k({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/conditional_detr/modeling_conditional_detr.py#L1647"}}),ko=new k({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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/poolformer#transformers.PoolFormerFeatureExtractor.__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/main/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/main/src/transformers/models/conditional_detr/modeling_conditional_detr.py#L1673",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/main/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/main/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>
`}}),$e=new Aa({props:{$$slots:{default:[Xi]},$$scope:{ctx:F}}}),ke=new Mn({props:{anchor:"transformers.ConditionalDetrForObjectDetection.forward.example",$$slots:{default:[Zi]},$$scope:{ctx:F}}}),jo=new Ae({}),Fo=new k({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/conditional_detr/modeling_conditional_detr.py#L1835"}}),Io=new k({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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/poolformer#transformers.PoolFormerFeatureExtractor.__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/main/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/main/src/transformers/models/conditional_detr/modeling_conditional_detr.py#L1857",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/main/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/main/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/main/en/model_doc/conditional_detr#transformers.ConditionalDetrFeatureExtractor.post_process_semantic_segmentation"
>post_process_semantic_segmentation()</a> or
<a
  href="/docs/transformers/main/en/model_doc/conditional_detr#transformers.ConditionalDetrFeatureExtractor.post_process_instance_segmentation"
>post_process_instance_segmentation()</a>
<a
  href="/docs/transformers/main/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 Aa({props:{$$slots:{default:[Ki]},$$scope:{ctx:F}}}),Ee=new Mn({props:{anchor:"transformers.ConditionalDetrForSegmentation.forward.example",$$slots:{default:[Qi]},$$scope:{ctx:F}}}),{c(){p=n("meta"),x=l(),_=n("h1"),g=n("a"),T=n("span"),b(c.$$.fragment),f=l(),q=n("span"),Vn=a("Conditional DETR"),Nt=l(),W=n("h2"),te=n("a"),dt=n("span"),b(Le.$$.fragment),Wn=l(),ct=n("span"),Hn=a("Overview"),St=l(),ne=n("p"),Yn=a("The Conditional DETR model was proposed in "),Oe=n("a"),Bn=a("Conditional DETR for Fast Training Convergence"),Gn=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."),Mt=l(),Lo=n("p"),Jn=a("The abstract from the paper is the following:"),Rt=l(),Oo=n("p"),Ne=n("em"),Xn=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"),Zn=a("https://github.com/Atten4Vis/ConditionalDETR"),Kn=a("."),Ut=l(),se=n("img"),Vt=l(),re=n("small"),Qn=a("Conditional DETR shows much faster convergence compared to the original DETR. Taken from the "),No=n("a"),es=a("original paper"),os=a("."),Wt=l(),M=n("p"),ts=a("This model was contributed by "),Me=n("a"),ns=a("DepuMeng"),ss=a(". The original code can be found "),Re=n("a"),rs=a("here"),as=a("."),Ht=l(),H=n("h2"),ae=n("a"),lt=n("span"),b(Ue.$$.fragment),is=l(),mt=n("span"),ds=a("ConditionalDetrConfig"),Yt=l(),L=n("div"),b(Ve.$$.fragment),cs=l(),Y=n("p"),ls=a("This is the configuration class to store the configuration of a "),So=n("a"),ms=a("ConditionalDetrModel"),ps=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
`),We=n("a"),hs=a("microsoft/conditional-detr-resnet-50"),gs=a(" architecture."),fs=l(),B=n("p"),us=a("Configuration objects inherit from "),Mo=n("a"),_s=a("PretrainedConfig"),bs=a(` and can be used to control the model outputs. Read the
documentation from `),Ro=n("a"),vs=a("PretrainedConfig"),ys=a(" for more information."),Ds=l(),b(ie.$$.fragment),Bt=l(),G=n("h2"),de=n("a"),pt=n("span"),b(He.$$.fragment),Cs=l(),ht=n("span"),ws=a("ConditionalDetrImageProcessor"),Gt=l(),$=n("div"),b(Ye.$$.fragment),Ts=l(),gt=n("p"),xs=a("Constructs a Conditional Detr image processor."),$s=l(),ce=n("div"),b(Be.$$.fragment),ks=l(),ft=n("p"),js=a("Preprocess an image or a batch of images so that it can be used by the model."),Fs=l(),le=n("div"),b(Ge.$$.fragment),Es=l(),ut=n("p"),zs=a(`Pads a batch of images with zeros to the size of largest height and width in the batch and returns their
corresponding pixel mask.`),Ps=l(),me=n("div"),b(Je.$$.fragment),Is=l(),Xe=n("p"),qs=a("Converts the raw output of "),Uo=n("a"),As=a("ConditionalDetrForObjectDetection"),Ls=a(` into final bounding boxes in (top_left_x,
top_left_y, bottom_right_x, bottom_right_y) format. Only supports PyTorch.`),Os=l(),pe=n("div"),b(Ze.$$.fragment),Ns=l(),Ke=n("p"),Ss=a("Converts the output of "),Vo=n("a"),Ms=a("ConditionalDetrForSegmentation"),Rs=a(` into instance segmentation predictions. Only supports
PyTorch.`),Us=l(),he=n("div"),b(Qe.$$.fragment),Vs=l(),eo=n("p"),Ws=a("Converts the output of "),Wo=n("a"),Hs=a("ConditionalDetrForSegmentation"),Ys=a(` into semantic segmentation maps. Only supports
PyTorch.`),Bs=l(),ge=n("div"),b(oo.$$.fragment),Gs=l(),to=n("p"),Js=a("Converts the output of "),Ho=n("a"),Xs=a("ConditionalDetrForSegmentation"),Zs=a(` into image panoptic segmentation predictions. Only
supports PyTorch.`),Jt=l(),J=n("h2"),fe=n("a"),_t=n("span"),b(no.$$.fragment),Ks=l(),bt=n("span"),Qs=a("ConditionalDetrFeatureExtractor"),Xt=l(),j=n("div"),b(so.$$.fragment),er=l(),ue=n("div"),b(ro.$$.fragment),or=l(),vt=n("p"),tr=a("Preprocess an image or a batch of images."),nr=l(),_e=n("div"),b(ao.$$.fragment),sr=l(),yt=n("p"),rr=a(`Pads a batch of images with zeros to the size of largest height and width in the batch and returns their
corresponding pixel mask.`),ar=l(),be=n("div"),b(io.$$.fragment),ir=l(),co=n("p"),dr=a("Converts the raw output of "),Yo=n("a"),cr=a("ConditionalDetrForObjectDetection"),lr=a(` into final bounding boxes in (top_left_x,
top_left_y, bottom_right_x, bottom_right_y) format. Only supports PyTorch.`),mr=l(),ve=n("div"),b(lo.$$.fragment),pr=l(),mo=n("p"),hr=a("Converts the output of "),Bo=n("a"),gr=a("ConditionalDetrForSegmentation"),fr=a(` into instance segmentation predictions. Only supports
PyTorch.`),ur=l(),ye=n("div"),b(po.$$.fragment),_r=l(),ho=n("p"),br=a("Converts the output of "),Go=n("a"),vr=a("ConditionalDetrForSegmentation"),yr=a(` into semantic segmentation maps. Only supports
PyTorch.`),Dr=l(),De=n("div"),b(go.$$.fragment),Cr=l(),fo=n("p"),wr=a("Converts the output of "),Jo=n("a"),Tr=a("ConditionalDetrForSegmentation"),xr=a(` into image panoptic segmentation predictions. Only
supports PyTorch.`),Zt=l(),X=n("h2"),Ce=n("a"),Dt=n("span"),b(uo.$$.fragment),$r=l(),Ct=n("span"),kr=a("ConditionalDetrModel"),Kt=l(),z=n("div"),b(_o.$$.fragment),jr=l(),wt=n("p"),Fr=a(`The bare Conditional DETR Model (consisting of a backbone and encoder-decoder Transformer) outputting raw
hidden-states without any specific head on top.`),Er=l(),bo=n("p"),zr=a("This model inherits from "),Xo=n("a"),Pr=a("PreTrainedModel"),Ir=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.)`),qr=l(),vo=n("p"),Ar=a("This model is also a PyTorch "),yo=n("a"),Lr=a("torch.nn.Module"),Or=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Nr=l(),O=n("div"),b(Do.$$.fragment),Sr=l(),Z=n("p"),Mr=a("The "),Zo=n("a"),Rr=a("ConditionalDetrModel"),Ur=a(" forward method, overrides the "),Tt=n("code"),Vr=a("__call__"),Wr=a(" special method."),Hr=l(),b(we.$$.fragment),Yr=l(),b(Te.$$.fragment),Qt=l(),K=n("h2"),xe=n("a"),xt=n("span"),b(Co.$$.fragment),Br=l(),$t=n("span"),Gr=a("ConditionalDetrForObjectDetection"),en=l(),P=n("div"),b(wo.$$.fragment),Jr=l(),kt=n("p"),Xr=a(`CONDITIONAL_DETR Model (consisting of a backbone and encoder-decoder Transformer) with object detection heads on
top, for tasks such as COCO detection.`),Zr=l(),To=n("p"),Kr=a("This model inherits from "),Ko=n("a"),Qr=a("PreTrainedModel"),ea=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.)`),oa=l(),xo=n("p"),ta=a("This model is also a PyTorch "),$o=n("a"),na=a("torch.nn.Module"),sa=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ra=l(),N=n("div"),b(ko.$$.fragment),aa=l(),Q=n("p"),ia=a("The "),Qo=n("a"),da=a("ConditionalDetrForObjectDetection"),ca=a(" forward method, overrides the "),jt=n("code"),la=a("__call__"),ma=a(" special method."),pa=l(),b($e.$$.fragment),ha=l(),b(ke.$$.fragment),on=l(),ee=n("h2"),je=n("a"),Ft=n("span"),b(jo.$$.fragment),ga=l(),Et=n("span"),fa=a("ConditionalDetrForSegmentation"),tn=l(),I=n("div"),b(Fo.$$.fragment),ua=l(),zt=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.`),ba=l(),Eo=n("p"),va=a("This model inherits from "),et=n("a"),ya=a("PreTrainedModel"),Da=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.)`),Ca=l(),zo=n("p"),wa=a("This model is also a PyTorch "),Po=n("a"),Ta=a("torch.nn.Module"),xa=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),$a=l(),S=n("div"),b(Io.$$.fragment),ka=l(),oe=n("p"),ja=a("The "),ot=n("a"),Fa=a("ConditionalDetrForSegmentation"),Ea=a(" forward method, overrides the "),Pt=n("code"),za=a("__call__"),Pa=a(" special method."),Ia=l(),b(Fe.$$.fragment),qa=l(),b(Ee.$$.fragment),this.h()},l(o){const h=Wi('[data-svelte="svelte-1phssyn"]',document.head);p=s(h,"META",{name:!0,content:!0}),h.forEach(t),x=m(o),_=s(o,"H1",{class:!0});var qo=r(_);g=s(qo,"A",{id:!0,class:!0,href:!0});var It=r(g);T=s(It,"SPAN",{});var qt=r(T);v(c.$$.fragment,qt),qt.forEach(t),It.forEach(t),f=m(qo),q=s(qo,"SPAN",{});var At=r(q);Vn=i(At,"Conditional DETR"),At.forEach(t),qo.forEach(t),Nt=m(o),W=s(o,"H2",{class:!0});var Ao=r(W);te=s(Ao,"A",{id:!0,class:!0,href:!0});var Lt=r(te);dt=s(Lt,"SPAN",{});var Ot=r(dt);v(Le.$$.fragment,Ot),Ot.forEach(t),Lt.forEach(t),Wn=m(Ao),ct=s(Ao,"SPAN",{});var Oa=r(ct);Hn=i(Oa,"Overview"),Oa.forEach(t),Ao.forEach(t),St=m(o),ne=s(o,"P",{});var sn=r(ne);Yn=i(sn,"The Conditional DETR model was proposed in "),Oe=s(sn,"A",{href:!0,rel:!0});var Na=r(Oe);Bn=i(Na,"Conditional DETR for Fast Training Convergence"),Na.forEach(t),Gn=i(sn," 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."),sn.forEach(t),Mt=m(o),Lo=s(o,"P",{});var Sa=r(Lo);Jn=i(Sa,"The abstract from the paper is the following:"),Sa.forEach(t),Rt=m(o),Oo=s(o,"P",{});var Ma=r(Oo);Ne=s(Ma,"EM",{});var rn=r(Ne);Xn=i(rn,"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(rn,"A",{href:!0,rel:!0});var Ra=r(Se);Zn=i(Ra,"https://github.com/Atten4Vis/ConditionalDETR"),Ra.forEach(t),Kn=i(rn,"."),rn.forEach(t),Ma.forEach(t),Ut=m(o),se=s(o,"IMG",{src:!0,alt:!0,width:!0}),Vt=m(o),re=s(o,"SMALL",{});var an=r(re);Qn=i(an,"Conditional DETR shows much faster convergence compared to the original DETR. Taken from the "),No=s(an,"A",{href:!0});var Ua=r(No);es=i(Ua,"original paper"),Ua.forEach(t),os=i(an,"."),an.forEach(t),Wt=m(o),M=s(o,"P",{});var tt=r(M);ts=i(tt,"This model was contributed by "),Me=s(tt,"A",{href:!0,rel:!0});var Va=r(Me);ns=i(Va,"DepuMeng"),Va.forEach(t),ss=i(tt,". The original code can be found "),Re=s(tt,"A",{href:!0,rel:!0});var Wa=r(Re);rs=i(Wa,"here"),Wa.forEach(t),as=i(tt,"."),tt.forEach(t),Ht=m(o),H=s(o,"H2",{class:!0});var dn=r(H);ae=s(dn,"A",{id:!0,class:!0,href:!0});var Ha=r(ae);lt=s(Ha,"SPAN",{});var Ya=r(lt);v(Ue.$$.fragment,Ya),Ya.forEach(t),Ha.forEach(t),is=m(dn),mt=s(dn,"SPAN",{});var Ba=r(mt);ds=i(Ba,"ConditionalDetrConfig"),Ba.forEach(t),dn.forEach(t),Yt=m(o),L=s(o,"DIV",{class:!0});var ze=r(L);v(Ve.$$.fragment,ze),cs=m(ze),Y=s(ze,"P",{});var nt=r(Y);ls=i(nt,"This is the configuration class to store the configuration of a "),So=s(nt,"A",{href:!0});var Ga=r(So);ms=i(Ga,"ConditionalDetrModel"),Ga.forEach(t),ps=i(nt,`. 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
`),We=s(nt,"A",{href:!0,rel:!0});var Ja=r(We);hs=i(Ja,"microsoft/conditional-detr-resnet-50"),Ja.forEach(t),gs=i(nt," architecture."),nt.forEach(t),fs=m(ze),B=s(ze,"P",{});var st=r(B);us=i(st,"Configuration objects inherit from "),Mo=s(st,"A",{href:!0});var Xa=r(Mo);_s=i(Xa,"PretrainedConfig"),Xa.forEach(t),bs=i(st,` and can be used to control the model outputs. Read the
documentation from `),Ro=s(st,"A",{href:!0});var Za=r(Ro);vs=i(Za,"PretrainedConfig"),Za.forEach(t),ys=i(st," for more information."),st.forEach(t),Ds=m(ze),v(ie.$$.fragment,ze),ze.forEach(t),Bt=m(o),G=s(o,"H2",{class:!0});var cn=r(G);de=s(cn,"A",{id:!0,class:!0,href:!0});var Ka=r(de);pt=s(Ka,"SPAN",{});var Qa=r(pt);v(He.$$.fragment,Qa),Qa.forEach(t),Ka.forEach(t),Cs=m(cn),ht=s(cn,"SPAN",{});var ei=r(ht);ws=i(ei,"ConditionalDetrImageProcessor"),ei.forEach(t),cn.forEach(t),Gt=m(o),$=s(o,"DIV",{class:!0});var E=r($);v(Ye.$$.fragment,E),Ts=m(E),gt=s(E,"P",{});var oi=r(gt);xs=i(oi,"Constructs a Conditional Detr image processor."),oi.forEach(t),$s=m(E),ce=s(E,"DIV",{class:!0});var ln=r(ce);v(Be.$$.fragment,ln),ks=m(ln),ft=s(ln,"P",{});var ti=r(ft);js=i(ti,"Preprocess an image or a batch of images so that it can be used by the model."),ti.forEach(t),ln.forEach(t),Fs=m(E),le=s(E,"DIV",{class:!0});var mn=r(le);v(Ge.$$.fragment,mn),Es=m(mn),ut=s(mn,"P",{});var ni=r(ut);zs=i(ni,`Pads a batch of images with zeros to the size of largest height and width in the batch and returns their
corresponding pixel mask.`),ni.forEach(t),mn.forEach(t),Ps=m(E),me=s(E,"DIV",{class:!0});var pn=r(me);v(Je.$$.fragment,pn),Is=m(pn),Xe=s(pn,"P",{});var hn=r(Xe);qs=i(hn,"Converts the raw output of "),Uo=s(hn,"A",{href:!0});var si=r(Uo);As=i(si,"ConditionalDetrForObjectDetection"),si.forEach(t),Ls=i(hn,` into final bounding boxes in (top_left_x,
top_left_y, bottom_right_x, bottom_right_y) format. Only supports PyTorch.`),hn.forEach(t),pn.forEach(t),Os=m(E),pe=s(E,"DIV",{class:!0});var gn=r(pe);v(Ze.$$.fragment,gn),Ns=m(gn),Ke=s(gn,"P",{});var fn=r(Ke);Ss=i(fn,"Converts the output of "),Vo=s(fn,"A",{href:!0});var ri=r(Vo);Ms=i(ri,"ConditionalDetrForSegmentation"),ri.forEach(t),Rs=i(fn,` into instance segmentation predictions. Only supports
PyTorch.`),fn.forEach(t),gn.forEach(t),Us=m(E),he=s(E,"DIV",{class:!0});var un=r(he);v(Qe.$$.fragment,un),Vs=m(un),eo=s(un,"P",{});var _n=r(eo);Ws=i(_n,"Converts the output of "),Wo=s(_n,"A",{href:!0});var ai=r(Wo);Hs=i(ai,"ConditionalDetrForSegmentation"),ai.forEach(t),Ys=i(_n,` into semantic segmentation maps. Only supports
PyTorch.`),_n.forEach(t),un.forEach(t),Bs=m(E),ge=s(E,"DIV",{class:!0});var bn=r(ge);v(oo.$$.fragment,bn),Gs=m(bn),to=s(bn,"P",{});var vn=r(to);Js=i(vn,"Converts the output of "),Ho=s(vn,"A",{href:!0});var ii=r(Ho);Xs=i(ii,"ConditionalDetrForSegmentation"),ii.forEach(t),Zs=i(vn,` into image panoptic segmentation predictions. Only
supports PyTorch.`),vn.forEach(t),bn.forEach(t),E.forEach(t),Jt=m(o),J=s(o,"H2",{class:!0});var yn=r(J);fe=s(yn,"A",{id:!0,class:!0,href:!0});var di=r(fe);_t=s(di,"SPAN",{});var ci=r(_t);v(no.$$.fragment,ci),ci.forEach(t),di.forEach(t),Ks=m(yn),bt=s(yn,"SPAN",{});var li=r(bt);Qs=i(li,"ConditionalDetrFeatureExtractor"),li.forEach(t),yn.forEach(t),Xt=m(o),j=s(o,"DIV",{class:!0});var A=r(j);v(so.$$.fragment,A),er=m(A),ue=s(A,"DIV",{class:!0});var Dn=r(ue);v(ro.$$.fragment,Dn),or=m(Dn),vt=s(Dn,"P",{});var mi=r(vt);tr=i(mi,"Preprocess an image or a batch of images."),mi.forEach(t),Dn.forEach(t),nr=m(A),_e=s(A,"DIV",{class:!0});var Cn=r(_e);v(ao.$$.fragment,Cn),sr=m(Cn),yt=s(Cn,"P",{});var pi=r(yt);rr=i(pi,`Pads a batch of images with zeros to the size of largest height and width in the batch and returns their
corresponding pixel mask.`),pi.forEach(t),Cn.forEach(t),ar=m(A),be=s(A,"DIV",{class:!0});var wn=r(be);v(io.$$.fragment,wn),ir=m(wn),co=s(wn,"P",{});var Tn=r(co);dr=i(Tn,"Converts the raw output of "),Yo=s(Tn,"A",{href:!0});var hi=r(Yo);cr=i(hi,"ConditionalDetrForObjectDetection"),hi.forEach(t),lr=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(t),wn.forEach(t),mr=m(A),ve=s(A,"DIV",{class:!0});var xn=r(ve);v(lo.$$.fragment,xn),pr=m(xn),mo=s(xn,"P",{});var $n=r(mo);hr=i($n,"Converts the output of "),Bo=s($n,"A",{href:!0});var gi=r(Bo);gr=i(gi,"ConditionalDetrForSegmentation"),gi.forEach(t),fr=i($n,` into instance segmentation predictions. Only supports
PyTorch.`),$n.forEach(t),xn.forEach(t),ur=m(A),ye=s(A,"DIV",{class:!0});var kn=r(ye);v(po.$$.fragment,kn),_r=m(kn),ho=s(kn,"P",{});var jn=r(ho);br=i(jn,"Converts the output of "),Go=s(jn,"A",{href:!0});var fi=r(Go);vr=i(fi,"ConditionalDetrForSegmentation"),fi.forEach(t),yr=i(jn,` into semantic segmentation maps. Only supports
PyTorch.`),jn.forEach(t),kn.forEach(t),Dr=m(A),De=s(A,"DIV",{class:!0});var Fn=r(De);v(go.$$.fragment,Fn),Cr=m(Fn),fo=s(Fn,"P",{});var En=r(fo);wr=i(En,"Converts the output of "),Jo=s(En,"A",{href:!0});var ui=r(Jo);Tr=i(ui,"ConditionalDetrForSegmentation"),ui.forEach(t),xr=i(En,` into image panoptic segmentation predictions. Only
supports PyTorch.`),En.forEach(t),Fn.forEach(t),A.forEach(t),Zt=m(o),X=s(o,"H2",{class:!0});var zn=r(X);Ce=s(zn,"A",{id:!0,class:!0,href:!0});var _i=r(Ce);Dt=s(_i,"SPAN",{});var bi=r(Dt);v(uo.$$.fragment,bi),bi.forEach(t),_i.forEach(t),$r=m(zn),Ct=s(zn,"SPAN",{});var vi=r(Ct);kr=i(vi,"ConditionalDetrModel"),vi.forEach(t),zn.forEach(t),Kt=m(o),z=s(o,"DIV",{class:!0});var R=r(z);v(_o.$$.fragment,R),jr=m(R),wt=s(R,"P",{});var yi=r(wt);Fr=i(yi,`The bare Conditional DETR Model (consisting of a backbone and encoder-decoder Transformer) outputting raw
hidden-states without any specific head on top.`),yi.forEach(t),Er=m(R),bo=s(R,"P",{});var Pn=r(bo);zr=i(Pn,"This model inherits from "),Xo=s(Pn,"A",{href:!0});var Di=r(Xo);Pr=i(Di,"PreTrainedModel"),Di.forEach(t),Ir=i(Pn,`. 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.)`),Pn.forEach(t),qr=m(R),vo=s(R,"P",{});var In=r(vo);Ar=i(In,"This model is also a PyTorch "),yo=s(In,"A",{href:!0,rel:!0});var Ci=r(yo);Lr=i(Ci,"torch.nn.Module"),Ci.forEach(t),Or=i(In,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),In.forEach(t),Nr=m(R),O=s(R,"DIV",{class:!0});var Pe=r(O);v(Do.$$.fragment,Pe),Sr=m(Pe),Z=s(Pe,"P",{});var rt=r(Z);Mr=i(rt,"The "),Zo=s(rt,"A",{href:!0});var wi=r(Zo);Rr=i(wi,"ConditionalDetrModel"),wi.forEach(t),Ur=i(rt," forward method, overrides the "),Tt=s(rt,"CODE",{});var Ti=r(Tt);Vr=i(Ti,"__call__"),Ti.forEach(t),Wr=i(rt," special method."),rt.forEach(t),Hr=m(Pe),v(we.$$.fragment,Pe),Yr=m(Pe),v(Te.$$.fragment,Pe),Pe.forEach(t),R.forEach(t),Qt=m(o),K=s(o,"H2",{class:!0});var qn=r(K);xe=s(qn,"A",{id:!0,class:!0,href:!0});var xi=r(xe);xt=s(xi,"SPAN",{});var $i=r(xt);v(Co.$$.fragment,$i),$i.forEach(t),xi.forEach(t),Br=m(qn),$t=s(qn,"SPAN",{});var ki=r($t);Gr=i(ki,"ConditionalDetrForObjectDetection"),ki.forEach(t),qn.forEach(t),en=m(o),P=s(o,"DIV",{class:!0});var U=r(P);v(wo.$$.fragment,U),Jr=m(U),kt=s(U,"P",{});var ji=r(kt);Xr=i(ji,`CONDITIONAL_DETR Model (consisting of a backbone and encoder-decoder Transformer) with object detection heads on
top, for tasks such as COCO detection.`),ji.forEach(t),Zr=m(U),To=s(U,"P",{});var An=r(To);Kr=i(An,"This model inherits from "),Ko=s(An,"A",{href:!0});var Fi=r(Ko);Qr=i(Fi,"PreTrainedModel"),Fi.forEach(t),ea=i(An,`. 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.)`),An.forEach(t),oa=m(U),xo=s(U,"P",{});var Ln=r(xo);ta=i(Ln,"This model is also a PyTorch "),$o=s(Ln,"A",{href:!0,rel:!0});var Ei=r($o);na=i(Ei,"torch.nn.Module"),Ei.forEach(t),sa=i(Ln,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ln.forEach(t),ra=m(U),N=s(U,"DIV",{class:!0});var Ie=r(N);v(ko.$$.fragment,Ie),aa=m(Ie),Q=s(Ie,"P",{});var at=r(Q);ia=i(at,"The "),Qo=s(at,"A",{href:!0});var zi=r(Qo);da=i(zi,"ConditionalDetrForObjectDetection"),zi.forEach(t),ca=i(at," forward method, overrides the "),jt=s(at,"CODE",{});var Pi=r(jt);la=i(Pi,"__call__"),Pi.forEach(t),ma=i(at," special method."),at.forEach(t),pa=m(Ie),v($e.$$.fragment,Ie),ha=m(Ie),v(ke.$$.fragment,Ie),Ie.forEach(t),U.forEach(t),on=m(o),ee=s(o,"H2",{class:!0});var On=r(ee);je=s(On,"A",{id:!0,class:!0,href:!0});var Ii=r(je);Ft=s(Ii,"SPAN",{});var qi=r(Ft);v(jo.$$.fragment,qi),qi.forEach(t),Ii.forEach(t),ga=m(On),Et=s(On,"SPAN",{});var Ai=r(Et);fa=i(Ai,"ConditionalDetrForSegmentation"),Ai.forEach(t),On.forEach(t),tn=m(o),I=s(o,"DIV",{class:!0});var V=r(I);v(Fo.$$.fragment,V),ua=m(V),zt=s(V,"P",{});var Li=r(zt);_a=i(Li,`CONDITIONAL_DETR Model (consisting of a backbone and encoder-decoder Transformer) with a segmentation head on top,
for tasks such as COCO panoptic.`),Li.forEach(t),ba=m(V),Eo=s(V,"P",{});var Nn=r(Eo);va=i(Nn,"This model inherits from "),et=s(Nn,"A",{href:!0});var Oi=r(et);ya=i(Oi,"PreTrainedModel"),Oi.forEach(t),Da=i(Nn,`. 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.)`),Nn.forEach(t),Ca=m(V),zo=s(V,"P",{});var Sn=r(zo);wa=i(Sn,"This model is also a PyTorch "),Po=s(Sn,"A",{href:!0,rel:!0});var Ni=r(Po);Ta=i(Ni,"torch.nn.Module"),Ni.forEach(t),xa=i(Sn,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Sn.forEach(t),$a=m(V),S=s(V,"DIV",{class:!0});var qe=r(S);v(Io.$$.fragment,qe),ka=m(qe),oe=s(qe,"P",{});var it=r(oe);ja=i(it,"The "),ot=s(it,"A",{href:!0});var Si=r(ot);Fa=i(Si,"ConditionalDetrForSegmentation"),Si.forEach(t),Ea=i(it," forward method, overrides the "),Pt=s(it,"CODE",{});var Mi=r(Pt);za=i(Mi,"__call__"),Mi.forEach(t),Pa=i(it," special method."),it.forEach(t),Ia=m(qe),v(Fe.$$.fragment,qe),qa=m(qe),v(Ee.$$.fragment,qe),qe.forEach(t),V.forEach(t),this.h()},h(){d(p,"name","hf:doc:metadata"),d(p,"content",JSON.stringify(od)),d(g,"id","conditional-detr"),d(g,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(g,"href","#conditional-detr"),d(_,"class","relative group"),d(te,"id","overview"),d(te,"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"),d(te,"href","#overview"),d(W,"class","relative group"),d(Oe,"href","https://arxiv.org/abs/2108.06152"),d(Oe,"rel","nofollow"),d(Se,"href","https://github.com/Atten4Vis/ConditionalDETR"),d(Se,"rel","nofollow"),Hi(se.src,La="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/conditional_detr_curve.jpg")||d(se,"src",La),d(se,"alt","drawing"),d(se,"width","600"),d(No,"href","https://arxiv.org/abs/2108.06152"),d(Me,"href","https://huggingface.co/DepuMeng"),d(Me,"rel","nofollow"),d(Re,"href","https://github.com/Atten4Vis/ConditionalDETR"),d(Re,"rel","nofollow"),d(ae,"id","transformers.ConditionalDetrConfig"),d(ae,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(ae,"href","#transformers.ConditionalDetrConfig"),d(H,"class","relative group"),d(So,"href","/docs/transformers/main/en/model_doc/conditional_detr#transformers.ConditionalDetrModel"),d(We,"href","https://huggingface.co/microsoft/conditional-detr-resnet-50"),d(We,"rel","nofollow"),d(Mo,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d(Ro,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(de,"id","transformers.ConditionalDetrImageProcessor"),d(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"),d(de,"href","#transformers.ConditionalDetrImageProcessor"),d(G,"class","relative group"),d(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Uo,"href","/docs/transformers/main/en/model_doc/conditional_detr#transformers.ConditionalDetrForObjectDetection"),d(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Vo,"href","/docs/transformers/main/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation"),d(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Wo,"href","/docs/transformers/main/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation"),d(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ho,"href","/docs/transformers/main/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation"),d(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(fe,"id","transformers.ConditionalDetrFeatureExtractor"),d(fe,"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"),d(fe,"href","#transformers.ConditionalDetrFeatureExtractor"),d(J,"class","relative group"),d(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Yo,"href","/docs/transformers/main/en/model_doc/conditional_detr#transformers.ConditionalDetrForObjectDetection"),d(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Bo,"href","/docs/transformers/main/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation"),d(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Go,"href","/docs/transformers/main/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation"),d(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Jo,"href","/docs/transformers/main/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation"),d(De,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ce,"id","transformers.ConditionalDetrModel"),d(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"),d(Ce,"href","#transformers.ConditionalDetrModel"),d(X,"class","relative group"),d(Xo,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),d(yo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(yo,"rel","nofollow"),d(Zo,"href","/docs/transformers/main/en/model_doc/conditional_detr#transformers.ConditionalDetrModel"),d(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(xe,"id","transformers.ConditionalDetrForObjectDetection"),d(xe,"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"),d(xe,"href","#transformers.ConditionalDetrForObjectDetection"),d(K,"class","relative group"),d(Ko,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),d($o,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d($o,"rel","nofollow"),d(Qo,"href","/docs/transformers/main/en/model_doc/conditional_detr#transformers.ConditionalDetrForObjectDetection"),d(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(je,"id","transformers.ConditionalDetrForSegmentation"),d(je,"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"),d(je,"href","#transformers.ConditionalDetrForSegmentation"),d(ee,"class","relative group"),d(et,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),d(Po,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Po,"rel","nofollow"),d(ot,"href","/docs/transformers/main/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation"),d(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,h){e(document.head,p),u(o,x,h),u(o,_,h),e(_,g),e(g,T),y(c,T,null),e(_,f),e(_,q),e(q,Vn),u(o,Nt,h),u(o,W,h),e(W,te),e(te,dt),y(Le,dt,null),e(W,Wn),e(W,ct),e(ct,Hn),u(o,St,h),u(o,ne,h),e(ne,Yn),e(ne,Oe),e(Oe,Bn),e(ne,Gn),u(o,Mt,h),u(o,Lo,h),e(Lo,Jn),u(o,Rt,h),u(o,Oo,h),e(Oo,Ne),e(Ne,Xn),e(Ne,Se),e(Se,Zn),e(Ne,Kn),u(o,Ut,h),u(o,se,h),u(o,Vt,h),u(o,re,h),e(re,Qn),e(re,No),e(No,es),e(re,os),u(o,Wt,h),u(o,M,h),e(M,ts),e(M,Me),e(Me,ns),e(M,ss),e(M,Re),e(Re,rs),e(M,as),u(o,Ht,h),u(o,H,h),e(H,ae),e(ae,lt),y(Ue,lt,null),e(H,is),e(H,mt),e(mt,ds),u(o,Yt,h),u(o,L,h),y(Ve,L,null),e(L,cs),e(L,Y),e(Y,ls),e(Y,So),e(So,ms),e(Y,ps),e(Y,We),e(We,hs),e(Y,gs),e(L,fs),e(L,B),e(B,us),e(B,Mo),e(Mo,_s),e(B,bs),e(B,Ro),e(Ro,vs),e(B,ys),e(L,Ds),y(ie,L,null),u(o,Bt,h),u(o,G,h),e(G,de),e(de,pt),y(He,pt,null),e(G,Cs),e(G,ht),e(ht,ws),u(o,Gt,h),u(o,$,h),y(Ye,$,null),e($,Ts),e($,gt),e(gt,xs),e($,$s),e($,ce),y(Be,ce,null),e(ce,ks),e(ce,ft),e(ft,js),e($,Fs),e($,le),y(Ge,le,null),e(le,Es),e(le,ut),e(ut,zs),e($,Ps),e($,me),y(Je,me,null),e(me,Is),e(me,Xe),e(Xe,qs),e(Xe,Uo),e(Uo,As),e(Xe,Ls),e($,Os),e($,pe),y(Ze,pe,null),e(pe,Ns),e(pe,Ke),e(Ke,Ss),e(Ke,Vo),e(Vo,Ms),e(Ke,Rs),e($,Us),e($,he),y(Qe,he,null),e(he,Vs),e(he,eo),e(eo,Ws),e(eo,Wo),e(Wo,Hs),e(eo,Ys),e($,Bs),e($,ge),y(oo,ge,null),e(ge,Gs),e(ge,to),e(to,Js),e(to,Ho),e(Ho,Xs),e(to,Zs),u(o,Jt,h),u(o,J,h),e(J,fe),e(fe,_t),y(no,_t,null),e(J,Ks),e(J,bt),e(bt,Qs),u(o,Xt,h),u(o,j,h),y(so,j,null),e(j,er),e(j,ue),y(ro,ue,null),e(ue,or),e(ue,vt),e(vt,tr),e(j,nr),e(j,_e),y(ao,_e,null),e(_e,sr),e(_e,yt),e(yt,rr),e(j,ar),e(j,be),y(io,be,null),e(be,ir),e(be,co),e(co,dr),e(co,Yo),e(Yo,cr),e(co,lr),e(j,mr),e(j,ve),y(lo,ve,null),e(ve,pr),e(ve,mo),e(mo,hr),e(mo,Bo),e(Bo,gr),e(mo,fr),e(j,ur),e(j,ye),y(po,ye,null),e(ye,_r),e(ye,ho),e(ho,br),e(ho,Go),e(Go,vr),e(ho,yr),e(j,Dr),e(j,De),y(go,De,null),e(De,Cr),e(De,fo),e(fo,wr),e(fo,Jo),e(Jo,Tr),e(fo,xr),u(o,Zt,h),u(o,X,h),e(X,Ce),e(Ce,Dt),y(uo,Dt,null),e(X,$r),e(X,Ct),e(Ct,kr),u(o,Kt,h),u(o,z,h),y(_o,z,null),e(z,jr),e(z,wt),e(wt,Fr),e(z,Er),e(z,bo),e(bo,zr),e(bo,Xo),e(Xo,Pr),e(bo,Ir),e(z,qr),e(z,vo),e(vo,Ar),e(vo,yo),e(yo,Lr),e(vo,Or),e(z,Nr),e(z,O),y(Do,O,null),e(O,Sr),e(O,Z),e(Z,Mr),e(Z,Zo),e(Zo,Rr),e(Z,Ur),e(Z,Tt),e(Tt,Vr),e(Z,Wr),e(O,Hr),y(we,O,null),e(O,Yr),y(Te,O,null),u(o,Qt,h),u(o,K,h),e(K,xe),e(xe,xt),y(Co,xt,null),e(K,Br),e(K,$t),e($t,Gr),u(o,en,h),u(o,P,h),y(wo,P,null),e(P,Jr),e(P,kt),e(kt,Xr),e(P,Zr),e(P,To),e(To,Kr),e(To,Ko),e(Ko,Qr),e(To,ea),e(P,oa),e(P,xo),e(xo,ta),e(xo,$o),e($o,na),e(xo,sa),e(P,ra),e(P,N),y(ko,N,null),e(N,aa),e(N,Q),e(Q,ia),e(Q,Qo),e(Qo,da),e(Q,ca),e(Q,jt),e(jt,la),e(Q,ma),e(N,pa),y($e,N,null),e(N,ha),y(ke,N,null),u(o,on,h),u(o,ee,h),e(ee,je),e(je,Ft),y(jo,Ft,null),e(ee,ga),e(ee,Et),e(Et,fa),u(o,tn,h),u(o,I,h),y(Fo,I,null),e(I,ua),e(I,zt),e(zt,_a),e(I,ba),e(I,Eo),e(Eo,va),e(Eo,et),e(et,ya),e(Eo,Da),e(I,Ca),e(I,zo),e(zo,wa),e(zo,Po),e(Po,Ta),e(zo,xa),e(I,$a),e(I,S),y(Io,S,null),e(S,ka),e(S,oe),e(oe,ja),e(oe,ot),e(ot,Fa),e(oe,Ea),e(oe,Pt),e(Pt,za),e(oe,Pa),e(S,Ia),y(Fe,S,null),e(S,qa),y(Ee,S,null),nn=!0},p(o,[h]){const qo={};h&2&&(qo.$$scope={dirty:h,ctx:o}),ie.$set(qo);const It={};h&2&&(It.$$scope={dirty:h,ctx:o}),we.$set(It);const qt={};h&2&&(qt.$$scope={dirty:h,ctx:o}),Te.$set(qt);const At={};h&2&&(At.$$scope={dirty:h,ctx:o}),$e.$set(At);const Ao={};h&2&&(Ao.$$scope={dirty:h,ctx:o}),ke.$set(Ao);const Lt={};h&2&&(Lt.$$scope={dirty:h,ctx:o}),Fe.$set(Lt);const Ot={};h&2&&(Ot.$$scope={dirty:h,ctx:o}),Ee.$set(Ot)},i(o){nn||(D(c.$$.fragment,o),D(Le.$$.fragment,o),D(Ue.$$.fragment,o),D(Ve.$$.fragment,o),D(ie.$$.fragment,o),D(He.$$.fragment,o),D(Ye.$$.fragment,o),D(Be.$$.fragment,o),D(Ge.$$.fragment,o),D(Je.$$.fragment,o),D(Ze.$$.fragment,o),D(Qe.$$.fragment,o),D(oo.$$.fragment,o),D(no.$$.fragment,o),D(so.$$.fragment,o),D(ro.$$.fragment,o),D(ao.$$.fragment,o),D(io.$$.fragment,o),D(lo.$$.fragment,o),D(po.$$.fragment,o),D(go.$$.fragment,o),D(uo.$$.fragment,o),D(_o.$$.fragment,o),D(Do.$$.fragment,o),D(we.$$.fragment,o),D(Te.$$.fragment,o),D(Co.$$.fragment,o),D(wo.$$.fragment,o),D(ko.$$.fragment,o),D($e.$$.fragment,o),D(ke.$$.fragment,o),D(jo.$$.fragment,o),D(Fo.$$.fragment,o),D(Io.$$.fragment,o),D(Fe.$$.fragment,o),D(Ee.$$.fragment,o),nn=!0)},o(o){C(c.$$.fragment,o),C(Le.$$.fragment,o),C(Ue.$$.fragment,o),C(Ve.$$.fragment,o),C(ie.$$.fragment,o),C(He.$$.fragment,o),C(Ye.$$.fragment,o),C(Be.$$.fragment,o),C(Ge.$$.fragment,o),C(Je.$$.fragment,o),C(Ze.$$.fragment,o),C(Qe.$$.fragment,o),C(oo.$$.fragment,o),C(no.$$.fragment,o),C(so.$$.fragment,o),C(ro.$$.fragment,o),C(ao.$$.fragment,o),C(io.$$.fragment,o),C(lo.$$.fragment,o),C(po.$$.fragment,o),C(go.$$.fragment,o),C(uo.$$.fragment,o),C(_o.$$.fragment,o),C(Do.$$.fragment,o),C(we.$$.fragment,o),C(Te.$$.fragment,o),C(Co.$$.fragment,o),C(wo.$$.fragment,o),C(ko.$$.fragment,o),C($e.$$.fragment,o),C(ke.$$.fragment,o),C(jo.$$.fragment,o),C(Fo.$$.fragment,o),C(Io.$$.fragment,o),C(Fe.$$.fragment,o),C(Ee.$$.fragment,o),nn=!1},d(o){t(p),o&&t(x),o&&t(_),w(c),o&&t(Nt),o&&t(W),w(Le),o&&t(St),o&&t(ne),o&&t(Mt),o&&t(Lo),o&&t(Rt),o&&t(Oo),o&&t(Ut),o&&t(se),o&&t(Vt),o&&t(re),o&&t(Wt),o&&t(M),o&&t(Ht),o&&t(H),w(Ue),o&&t(Yt),o&&t(L),w(Ve),w(ie),o&&t(Bt),o&&t(G),w(He),o&&t(Gt),o&&t($),w(Ye),w(Be),w(Ge),w(Je),w(Ze),w(Qe),w(oo),o&&t(Jt),o&&t(J),w(no),o&&t(Xt),o&&t(j),w(so),w(ro),w(ao),w(io),w(lo),w(po),w(go),o&&t(Zt),o&&t(X),w(uo),o&&t(Kt),o&&t(z),w(_o),w(Do),w(we),w(Te),o&&t(Qt),o&&t(K),w(Co),o&&t(en),o&&t(P),w(wo),w(ko),w($e),w(ke),o&&t(on),o&&t(ee),w(jo),o&&t(tn),o&&t(I),w(Fo),w(Io),w(Fe),w(Ee)}}}const od={local:"conditional-detr",sections:[{local:"overview",title:"Overview"},{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 td(F){return Yi(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class cd extends Ri{constructor(p){super();Ui(this,p,td,ed,Vi,{})}}export{cd as default,od as metadata};
