import{S as id,i as dd,s as cd,e as n,k as l,w as b,t as a,M as ld,c as s,d as o,m,a as r,x as v,h as i,b as d,N as md,G as e,g,y,q as D,o as C,B as w,v as pd,L as Kn}from"../../chunks/vendor-hf-doc-builder.js";import{T as Ja}from"../../chunks/Tip-hf-doc-builder.js";import{D as k}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Qn}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as ne}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Zn}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function hd(E){let p,x,_,f,T;return f=new Qn({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(f.$$.fragment)},l(c){p=s(c,"P",{});var u=r(p);x=i(u,"Examples:"),u.forEach(o),_=m(c),v(f.$$.fragment,c)},m(c,u){g(c,p,u),e(p,x),g(c,_,u),y(f,c,u),T=!0},p:Kn,i(c){T||(D(f.$$.fragment,c),T=!0)},o(c){C(f.$$.fragment,c),T=!1},d(c){c&&o(p),c&&o(_),w(f,c)}}}function gd(E){let p,x,_,f,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"),f=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 u=r(p);x=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(u,"CODE",{});var q=r(_);f=i(q,"Module"),q.forEach(o),T=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(o)},m(c,u){g(c,p,u),e(p,x),e(p,_),e(_,f),e(p,T)},d(c){c&&o(p)}}}function fd(E){let p,x,_,f,T;return f=new Qn({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(f.$$.fragment)},l(c){p=s(c,"P",{});var u=r(p);x=i(u,"Examples:"),u.forEach(o),_=m(c),v(f.$$.fragment,c)},m(c,u){g(c,p,u),e(p,x),g(c,_,u),y(f,c,u),T=!0},p:Kn,i(c){T||(D(f.$$.fragment,c),T=!0)},o(c){C(f.$$.fragment,c),T=!1},d(c){c&&o(p),c&&o(_),w(f,c)}}}function ud(E){let p,x,_,f,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"),f=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 u=r(p);x=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(u,"CODE",{});var q=r(_);f=i(q,"Module"),q.forEach(o),T=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(o)},m(c,u){g(c,p,u),e(p,x),e(p,_),e(_,f),e(p,T)},d(c){c&&o(p)}}}function _d(E){let p,x,_,f,T;return f=new Qn({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(f.$$.fragment)},l(c){p=s(c,"P",{});var u=r(p);x=i(u,"Examples:"),u.forEach(o),_=m(c),v(f.$$.fragment,c)},m(c,u){g(c,p,u),e(p,x),g(c,_,u),y(f,c,u),T=!0},p:Kn,i(c){T||(D(f.$$.fragment,c),T=!0)},o(c){C(f.$$.fragment,c),T=!1},d(c){c&&o(p),c&&o(_),w(f,c)}}}function bd(E){let p,x,_,f,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"),f=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 u=r(p);x=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(u,"CODE",{});var q=r(_);f=i(q,"Module"),q.forEach(o),T=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(o)},m(c,u){g(c,p,u),e(p,x),e(p,_),e(_,f),e(p,T)},d(c){c&&o(p)}}}function vd(E){let p,x,_,f,T;return f=new Qn({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(f.$$.fragment)},l(c){p=s(c,"P",{});var u=r(p);x=i(u,"Examples:"),u.forEach(o),_=m(c),v(f.$$.fragment,c)},m(c,u){g(c,p,u),e(p,x),g(c,_,u),y(f,c,u),T=!0},p:Kn,i(c){T||(D(f.$$.fragment,c),T=!0)},o(c){C(f.$$.fragment,c),T=!1},d(c){c&&o(p),c&&o(_),w(f,c)}}}function yd(E){let p,x,_,f,T,c,u,q,es,Yo,W,se,ho,Ne,ts,go,os,Bo,re,ns,Se,ss,rs,Go,Nt,as,Jo,St,Me,is,Re,ds,cs,Xo,ae,Xa,Zo,ie,ls,Mt,ms,ps,Ko,M,hs,Ue,gs,fs,Ve,us,_s,Qo,H,de,fo,We,bs,uo,vs,en,Rt,_o,Ut,ys,tn,Y,ce,bo,He,Ds,vo,Cs,on,L,Ye,ws,B,Ts,Vt,xs,$s,Be,ks,js,Es,G,Fs,Wt,zs,Ps,Ht,Is,qs,As,le,nn,J,me,yo,Ge,Ls,Do,Os,sn,$,Je,Ns,Co,Ss,Ms,pe,Xe,Rs,wo,Us,Vs,he,Ze,Ws,To,Hs,Ys,ge,Ke,Bs,Qe,Gs,Yt,Js,Xs,Zs,fe,et,Ks,tt,Qs,Bt,er,tr,or,ue,ot,nr,nt,sr,Gt,rr,ar,ir,_e,st,dr,rt,cr,Jt,lr,mr,rn,X,be,xo,at,pr,$o,hr,an,j,it,gr,ve,dt,fr,ko,ur,_r,ye,ct,br,jo,vr,yr,De,lt,Dr,mt,Cr,Xt,wr,Tr,xr,Ce,pt,$r,ht,kr,Zt,jr,Er,Fr,we,gt,zr,ft,Pr,Kt,Ir,qr,Ar,Te,ut,Lr,_t,Or,Qt,Nr,Sr,dn,Z,xe,Eo,bt,Mr,Fo,Rr,cn,z,vt,Ur,zo,Vr,Wr,yt,Hr,eo,Yr,Br,Gr,Dt,Jr,Ct,Xr,Zr,Kr,O,wt,Qr,K,ea,to,ta,oa,Po,na,sa,ra,$e,aa,ke,ln,Q,je,Io,Tt,ia,qo,da,mn,P,xt,ca,Ao,la,ma,$t,pa,oo,ha,ga,fa,kt,ua,jt,_a,ba,va,N,Et,ya,ee,Da,no,Ca,wa,Lo,Ta,xa,$a,Ee,ka,Fe,pn,te,ze,Oo,Ft,ja,No,Ea,hn,I,zt,Fa,So,za,Pa,Pt,Ia,so,qa,Aa,La,It,Oa,qt,Na,Sa,Ma,S,At,Ra,oe,Ua,ro,Va,Wa,Mo,Ha,Ya,Ba,Pe,Ga,Ie,gn;return c=new ne({}),Ne=new ne({}),We=new ne({}),He=new ne({}),Ye=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:"auxiliary_loss",val:" = False"},{name:"position_embedding_type",val:" = 'sine'"},{name:"backbone",val:" = 'resnet50'"},{name:"use_pretrained_backbone",val:" = True"},{name:"dilation",val:" = False"},{name:"class_cost",val:" = 2"},{name:"bbox_cost",val:" = 5"},{name:"giou_cost",val:" = 2"},{name:"mask_loss_coefficient",val:" = 1"},{name:"dice_loss_coefficient",val:" = 1"},{name:"cls_loss_coefficient",val:" = 2"},{name:"bbox_loss_coefficient",val:" = 5"},{name:"giou_loss_coefficient",val:" = 2"},{name:"focal_alpha",val:" = 0.25"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ConditionalDetrConfig.use_timm_backbone",description:`<strong>use_timm_backbone</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to use the <code>timm</code> library for the backbone. If set to <code>False</code>, will use the <code>AutoBackbone</code>
API.`,name:"use_timm_backbone"},{anchor:"transformers.ConditionalDetrConfig.backbone_config",description:`<strong>backbone_config</strong> (<code>PretrainedConfig</code> or <code>dict</code>, <em>optional</em>) &#x2014;
The configuration of the backbone model. Only used in case <code>use_timm_backbone</code> is set to <code>False</code> in which
case it will default to <code>ResNetConfig()</code>.`,name:"backbone_config"},{anchor:"transformers.ConditionalDetrConfig.num_channels",description:`<strong>num_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
The number of input channels.`,name:"num_channels"},{anchor:"transformers.ConditionalDetrConfig.num_queries",description:`<strong>num_queries</strong> (<code>int</code>, <em>optional</em>, defaults to 100) &#x2014;
Number of object queries, i.e. detection slots. This is the maximal number of objects
<a href="/docs/transformers/v4.27.1/en/model_doc/conditional_detr#transformers.ConditionalDetrModel">ConditionalDetrModel</a> can detect in a single image. For COCO, we recommend 100 queries.`,name:"num_queries"},{anchor:"transformers.ConditionalDetrConfig.d_model",description:`<strong>d_model</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimension of the layers.`,name:"d_model"},{anchor:"transformers.ConditionalDetrConfig.encoder_layers",description:`<strong>encoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 6) &#x2014;
Number of encoder layers.`,name:"encoder_layers"},{anchor:"transformers.ConditionalDetrConfig.decoder_layers",description:`<strong>decoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 6) &#x2014;
Number of decoder layers.`,name:"decoder_layers"},{anchor:"transformers.ConditionalDetrConfig.encoder_attention_heads",description:`<strong>encoder_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"encoder_attention_heads"},{anchor:"transformers.ConditionalDetrConfig.decoder_attention_heads",description:`<strong>decoder_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
Number of attention heads for each attention layer in the Transformer decoder.`,name:"decoder_attention_heads"},{anchor:"transformers.ConditionalDetrConfig.decoder_ffn_dim",description:`<strong>decoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
Dimension of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in decoder.`,name:"decoder_ffn_dim"},{anchor:"transformers.ConditionalDetrConfig.encoder_ffn_dim",description:`<strong>encoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
Dimension of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in decoder.`,name:"encoder_ffn_dim"},{anchor:"transformers.ConditionalDetrConfig.activation_function",description:`<strong>activation_function</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;relu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"activation_function"},{anchor:"transformers.ConditionalDetrConfig.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"dropout"},{anchor:"transformers.ConditionalDetrConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.ConditionalDetrConfig.activation_dropout",description:`<strong>activation_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for activations inside the fully connected layer.`,name:"activation_dropout"},{anchor:"transformers.ConditionalDetrConfig.init_std",description:`<strong>init_std</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"init_std"},{anchor:"transformers.ConditionalDetrConfig.init_xavier_std",description:`<strong>init_xavier_std</strong> (<code>float</code>, <em>optional</em>, defaults to 1) &#x2014;
The scaling factor used for the Xavier initialization gain in the HM Attention map module.`,name:"init_xavier_std"},{anchor:"transformers.ConditionalDetrConfig.encoder_layerdrop",description:`<strong>encoder_layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The LayerDrop probability for the encoder. See the [LayerDrop paper](see <a href="https://arxiv.org/abs/1909.11556" rel="nofollow">https://arxiv.org/abs/1909.11556</a>)
for more details.`,name:"encoder_layerdrop"},{anchor:"transformers.ConditionalDetrConfig.decoder_layerdrop",description:`<strong>decoder_layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The LayerDrop probability for the decoder. See the [LayerDrop paper](see <a href="https://arxiv.org/abs/1909.11556" rel="nofollow">https://arxiv.org/abs/1909.11556</a>)
for more details.`,name:"decoder_layerdrop"},{anchor:"transformers.ConditionalDetrConfig.auxiliary_loss",description:`<strong>auxiliary_loss</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether auxiliary decoding losses (loss at each decoder layer) are to be used.`,name:"auxiliary_loss"},{anchor:"transformers.ConditionalDetrConfig.position_embedding_type",description:`<strong>position_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;sine&quot;</code>) &#x2014;
Type of position embeddings to be used on top of the image features. One of <code>&quot;sine&quot;</code> or <code>&quot;learned&quot;</code>.`,name:"position_embedding_type"},{anchor:"transformers.ConditionalDetrConfig.backbone",description:`<strong>backbone</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;resnet50&quot;</code>) &#x2014;
Name of convolutional backbone to use in case <code>use_timm_backbone</code> = <code>True</code>. Supports any convolutional
backbone from the timm package. For a list of all available models, see <a href="https://rwightman.github.io/pytorch-image-models/#load-a-pretrained-model" rel="nofollow">this
page</a>.`,name:"backbone"},{anchor:"transformers.ConditionalDetrConfig.use_pretrained_backbone",description:`<strong>use_pretrained_backbone</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use pretrained weights for the backbone. Only supported when <code>use_timm_backbone</code> = <code>True</code>.`,name:"use_pretrained_backbone"},{anchor:"transformers.ConditionalDetrConfig.dilation",description:`<strong>dilation</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to replace stride with dilation in the last convolutional block (DC5). Only supported when
<code>use_timm_backbone</code> = <code>True</code>.`,name:"dilation"},{anchor:"transformers.ConditionalDetrConfig.class_cost",description:`<strong>class_cost</strong> (<code>float</code>, <em>optional</em>, defaults to 1) &#x2014;
Relative weight of the classification error in the Hungarian matching cost.`,name:"class_cost"},{anchor:"transformers.ConditionalDetrConfig.bbox_cost",description:`<strong>bbox_cost</strong> (<code>float</code>, <em>optional</em>, defaults to 5) &#x2014;
Relative weight of the L1 error of the bounding box coordinates in the Hungarian matching cost.`,name:"bbox_cost"},{anchor:"transformers.ConditionalDetrConfig.giou_cost",description:`<strong>giou_cost</strong> (<code>float</code>, <em>optional</em>, defaults to 2) &#x2014;
Relative weight of the generalized IoU loss of the bounding box in the Hungarian matching cost.`,name:"giou_cost"},{anchor:"transformers.ConditionalDetrConfig.mask_loss_coefficient",description:`<strong>mask_loss_coefficient</strong> (<code>float</code>, <em>optional</em>, defaults to 1) &#x2014;
Relative weight of the Focal loss in the panoptic segmentation loss.`,name:"mask_loss_coefficient"},{anchor:"transformers.ConditionalDetrConfig.dice_loss_coefficient",description:`<strong>dice_loss_coefficient</strong> (<code>float</code>, <em>optional</em>, defaults to 1) &#x2014;
Relative weight of the DICE/F-1 loss in the panoptic segmentation loss.`,name:"dice_loss_coefficient"},{anchor:"transformers.ConditionalDetrConfig.bbox_loss_coefficient",description:`<strong>bbox_loss_coefficient</strong> (<code>float</code>, <em>optional</em>, defaults to 5) &#x2014;
Relative weight of the L1 bounding box loss in the object detection loss.`,name:"bbox_loss_coefficient"},{anchor:"transformers.ConditionalDetrConfig.giou_loss_coefficient",description:`<strong>giou_loss_coefficient</strong> (<code>float</code>, <em>optional</em>, defaults to 2) &#x2014;
Relative weight of the generalized IoU loss in the object detection loss.`,name:"giou_loss_coefficient"},{anchor:"transformers.ConditionalDetrConfig.eos_coefficient",description:`<strong>eos_coefficient</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
Relative classification weight of the &#x2018;no-object&#x2019; class in the object detection loss.`,name:"eos_coefficient"},{anchor:"transformers.ConditionalDetrConfig.focal_alpha",description:`<strong>focal_alpha</strong> (<code>float</code>, <em>optional</em>, defaults to 0.25) &#x2014;
Alpha parameter in the focal loss.`,name:"focal_alpha"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/conditional_detr/configuration_conditional_detr.py#L37"}}),le=new Zn({props:{anchor:"transformers.ConditionalDetrConfig.example",$$slots:{default:[hd]},$$scope:{ctx:E}}}),Ge=new ne({}),Je=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/v4.27.1/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L744"}}),Xe=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 annotation is for object
detection, the annotations should be a dictionary with the following keys:<ul>
<li>&#x201C;image_id&#x201D; (<code>int</code>): The image id.</li>
<li>&#x201C;annotations&#x201D; (<code>List[Dict]</code>): List of annotations for an image. Each annotation should be a
dictionary. An image can have no annotations, in which case the list should be empty.
If annotation is for segmentation, the annotations should be a dictionary with the following keys:</li>
<li>&#x201C;image_id&#x201D; (<code>int</code>): The image id.</li>
<li>&#x201C;segments_info&#x201D; (<code>List[Dict]</code>): List of segments for an image. Each segment should be a dictionary.
An image can have no segments, in which case the list should be empty.</li>
<li>&#x201C;file_name&#x201D; (<code>str</code>): The file name of the image.</li>
</ul>`,name:"annotations"},{anchor:"transformers.ConditionalDetrImageProcessor.preprocess.return_segmentation_masks",description:`<strong>return_segmentation_masks</strong> (<code>bool</code>, <em>optional</em>, defaults to self.return_segmentation_masks) &#x2014;
Whether to return segmentation masks.`,name:"return_segmentation_masks"},{anchor:"transformers.ConditionalDetrImageProcessor.preprocess.masks_path",description:`<strong>masks_path</strong> (<code>str</code> or <code>pathlib.Path</code>, <em>optional</em>) &#x2014;
Path to the directory containing the segmentation masks.`,name:"masks_path"},{anchor:"transformers.ConditionalDetrImageProcessor.preprocess.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to self.do_resize) &#x2014;
Whether to resize the image.`,name:"do_resize"},{anchor:"transformers.ConditionalDetrImageProcessor.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to self.size) &#x2014;
Size of the image after resizing.`,name:"size"},{anchor:"transformers.ConditionalDetrImageProcessor.preprocess.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to self.resample) &#x2014;
Resampling filter to use when resizing the image.`,name:"resample"},{anchor:"transformers.ConditionalDetrImageProcessor.preprocess.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to self.do_rescale) &#x2014;
Whether to rescale the image.`,name:"do_rescale"},{anchor:"transformers.ConditionalDetrImageProcessor.preprocess.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to self.rescale_factor) &#x2014;
Rescale factor to use when rescaling the image.`,name:"rescale_factor"},{anchor:"transformers.ConditionalDetrImageProcessor.preprocess.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to self.do_normalize) &#x2014;
Whether to normalize the image.`,name:"do_normalize"},{anchor:"transformers.ConditionalDetrImageProcessor.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to self.image_mean) &#x2014;
Mean to use when normalizing the image.`,name:"image_mean"},{anchor:"transformers.ConditionalDetrImageProcessor.preprocess.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to self.image_std) &#x2014;
Standard deviation to use when normalizing the image.`,name:"image_std"},{anchor:"transformers.ConditionalDetrImageProcessor.preprocess.do_pad",description:`<strong>do_pad</strong> (<code>bool</code>, <em>optional</em>, defaults to self.do_pad) &#x2014;
Whether to pad the image.`,name:"do_pad"},{anchor:"transformers.ConditionalDetrImageProcessor.preprocess.format",description:`<strong>format</strong> (<code>str</code> or <code>AnnotionFormat</code>, <em>optional</em>, defaults to self.format) &#x2014;
Format of the annotations.`,name:"format"},{anchor:"transformers.ConditionalDetrImageProcessor.preprocess.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>, defaults to self.return_tensors) &#x2014;
Type of tensors to return. If <code>None</code>, will return the list of images.`,name:"return_tensors"},{anchor:"transformers.ConditionalDetrImageProcessor.preprocess.data_format",description:`<strong>data_format</strong> (<code>str</code> or <code>ChannelDimension</code>, <em>optional</em>, defaults to self.data_format) &#x2014;
The channel dimension format of the image. If not provided, it will be the same as the input image.`,name:"data_format"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L1077"}}),Ze=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/v4.27.1/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L980"}}),Ke=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/v4.27.1/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L1332",returnDescription:`
<p>A list of dictionaries, each dictionary containing the scores, labels and boxes for an image
in the batch as predicted by the model.</p>
`,returnType:`
<p><code>List[Dict]</code></p>
`}}),et=new 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/v4.27.1/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation">ConditionalDetrForSegmentation</a>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.ConditionalDetrImageProcessor.post_process_instance_segmentation.threshold",description:`<strong>threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
The probability score threshold to keep predicted instance masks.`,name:"threshold"},{anchor:"transformers.ConditionalDetrImageProcessor.post_process_instance_segmentation.mask_threshold",description:`<strong>mask_threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
Threshold to use when turning the predicted masks into binary values.`,name:"mask_threshold"},{anchor:"transformers.ConditionalDetrImageProcessor.post_process_instance_segmentation.overlap_mask_area_threshold",description:`<strong>overlap_mask_area_threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.8) &#x2014;
The overlap mask area threshold to merge or discard small disconnected parts within each binary
instance mask.`,name:"overlap_mask_area_threshold"},{anchor:"transformers.ConditionalDetrImageProcessor.post_process_instance_segmentation.target_sizes",description:`<strong>target_sizes</strong> (<code>List[Tuple]</code>, <em>optional</em>) &#x2014;
List of length (batch_size), where each list item (<code>Tuple[int, int]]</code>) corresponds to the requested
final size (height, width) of each prediction. If unset, predictions will not be resized.`,name:"target_sizes"},{anchor:"transformers.ConditionalDetrImageProcessor.post_process_instance_segmentation.return_coco_annotation",description:`<strong>return_coco_annotation</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Defaults to <code>False</code>. If set to <code>True</code>, segmentation maps are returned in COCO run-length encoding (RLE)
format.`,name:"return_coco_annotation"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L1436",returnDescription:`
<p>A list of dictionaries, one per image, each dictionary containing two keys:</p>
<ul>
<li><strong>segmentation</strong> \u2014 A tensor of shape <code>(height, width)</code> where each pixel represents a <code>segment_id</code> or
<code>List[List]</code> run-length encoding (RLE) of the segmentation map if return_coco_annotation is set to
<code>True</code>. Set to <code>None</code> if no mask if found above <code>threshold</code>.</li>
<li><strong>segments_info</strong> \u2014 A dictionary that contains additional information on each segment.<ul>
<li><strong>id</strong> \u2014 An integer representing the <code>segment_id</code>.</li>
<li><strong>label_id</strong> \u2014 An integer representing the label / semantic class id corresponding to <code>segment_id</code>.</li>
<li><strong>score</strong> \u2014 Prediction score of segment with <code>segment_id</code>.</li>
</ul></li>
</ul>
`,returnType:`
<p><code>List[Dict]</code></p>
`}}),ot=new 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/v4.27.1/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation">ConditionalDetrForSegmentation</a>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.ConditionalDetrImageProcessor.post_process_semantic_segmentation.target_sizes",description:`<strong>target_sizes</strong> (<code>List[Tuple[int, int]]</code>, <em>optional</em>) &#x2014;
A list of tuples (<code>Tuple[int, int]</code>) containing the target size (height, width) of each image in the
batch. If unset, predictions will not be resized.`,name:"target_sizes"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L1387",returnDescription:`
<p>A list of length <code>batch_size</code>, where each item is a semantic segmentation map of shape (height, width)
corresponding to the target_sizes entry (if <code>target_sizes</code> is specified). Each entry of each
<code>torch.Tensor</code> correspond to a semantic class id.</p>
`,returnType:`
<p><code>List[torch.Tensor]</code></p>
`}}),st=new 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/v4.27.1/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation">ConditionalDetrForSegmentation</a>) &#x2014;
The outputs from <a href="/docs/transformers/v4.27.1/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation">ConditionalDetrForSegmentation</a>.`,name:"outputs"},{anchor:"transformers.ConditionalDetrImageProcessor.post_process_panoptic_segmentation.threshold",description:`<strong>threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
The probability score threshold to keep predicted instance masks.`,name:"threshold"},{anchor:"transformers.ConditionalDetrImageProcessor.post_process_panoptic_segmentation.mask_threshold",description:`<strong>mask_threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
Threshold to use when turning the predicted masks into binary values.`,name:"mask_threshold"},{anchor:"transformers.ConditionalDetrImageProcessor.post_process_panoptic_segmentation.overlap_mask_area_threshold",description:`<strong>overlap_mask_area_threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.8) &#x2014;
The overlap mask area threshold to merge or discard small disconnected parts within each binary
instance mask.`,name:"overlap_mask_area_threshold"},{anchor:"transformers.ConditionalDetrImageProcessor.post_process_panoptic_segmentation.label_ids_to_fuse",description:`<strong>label_ids_to_fuse</strong> (<code>Set[int]</code>, <em>optional</em>) &#x2014;
The labels in this state will have all their instances be fused together. For instance we could say
there can only be one sky in an image, but several persons, so the label ID for sky would be in that
set, but not the one for person.`,name:"label_ids_to_fuse"},{anchor:"transformers.ConditionalDetrImageProcessor.post_process_panoptic_segmentation.target_sizes",description:`<strong>target_sizes</strong> (<code>List[Tuple]</code>, <em>optional</em>) &#x2014;
List of length (batch_size), where each list item (<code>Tuple[int, int]]</code>) corresponds to the requested
final size (height, width) of each prediction in batch. If unset, predictions will not be resized.`,name:"target_sizes"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L1521",returnDescription:`
<p>A list of dictionaries, one per image, each dictionary containing two keys:</p>
<ul>
<li><strong>segmentation</strong> \u2014 a tensor of shape <code>(height, width)</code> where each pixel represents a <code>segment_id</code> or
<code>None</code> if no mask if found above <code>threshold</code>. If <code>target_sizes</code> is specified, segmentation is resized to
the corresponding <code>target_sizes</code> entry.</li>
<li><strong>segments_info</strong> \u2014 A dictionary that contains additional information on each segment.<ul>
<li><strong>id</strong> \u2014 an integer representing the <code>segment_id</code>.</li>
<li><strong>label_id</strong> \u2014 An integer representing the label / semantic class id corresponding to <code>segment_id</code>.</li>
<li><strong>was_fused</strong> \u2014 a boolean, <code>True</code> if <code>label_id</code> was in <code>label_ids_to_fuse</code>, <code>False</code> otherwise.
Multiple instances of the same class / label were fused and assigned a single <code>segment_id</code>.</li>
<li><strong>score</strong> \u2014 Prediction score of segment with <code>segment_id</code>.</li>
</ul></li>
</ul>
`,returnType:`
<p><code>List[Dict]</code></p>
`}}),at=new ne({}),it=new k({props:{name:"class transformers.ConditionalDetrFeatureExtractor",anchor:"transformers.ConditionalDetrFeatureExtractor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/conditional_detr/feature_extraction_conditional_detr.py#L26"}}),dt=new k({props:{name:"__call__",anchor:"transformers.ConditionalDetrFeatureExtractor.__call__",parameters:[{name:"images",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/image_processing_utils.py#L456"}}),ct=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/v4.27.1/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L980"}}),lt=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/v4.27.1/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L1332",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>
`}}),pt=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/v4.27.1/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation">ConditionalDetrForSegmentation</a>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_instance_segmentation.threshold",description:`<strong>threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
The probability score threshold to keep predicted instance masks.`,name:"threshold"},{anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_instance_segmentation.mask_threshold",description:`<strong>mask_threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
Threshold to use when turning the predicted masks into binary values.`,name:"mask_threshold"},{anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_instance_segmentation.overlap_mask_area_threshold",description:`<strong>overlap_mask_area_threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.8) &#x2014;
The overlap mask area threshold to merge or discard small disconnected parts within each binary
instance mask.`,name:"overlap_mask_area_threshold"},{anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_instance_segmentation.target_sizes",description:`<strong>target_sizes</strong> (<code>List[Tuple]</code>, <em>optional</em>) &#x2014;
List of length (batch_size), where each list item (<code>Tuple[int, int]]</code>) corresponds to the requested
final size (height, width) of each prediction. If unset, predictions will not be resized.`,name:"target_sizes"},{anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_instance_segmentation.return_coco_annotation",description:`<strong>return_coco_annotation</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Defaults to <code>False</code>. If set to <code>True</code>, segmentation maps are returned in COCO run-length encoding (RLE)
format.`,name:"return_coco_annotation"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L1436",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>
`}}),gt=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/v4.27.1/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation">ConditionalDetrForSegmentation</a>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_semantic_segmentation.target_sizes",description:`<strong>target_sizes</strong> (<code>List[Tuple[int, int]]</code>, <em>optional</em>) &#x2014;
A list of tuples (<code>Tuple[int, int]</code>) containing the target size (height, width) of each image in the
batch. If unset, predictions will not be resized.`,name:"target_sizes"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L1387",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>
`}}),ut=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/v4.27.1/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation">ConditionalDetrForSegmentation</a>) &#x2014;
The outputs from <a href="/docs/transformers/v4.27.1/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation">ConditionalDetrForSegmentation</a>.`,name:"outputs"},{anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_panoptic_segmentation.threshold",description:`<strong>threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
The probability score threshold to keep predicted instance masks.`,name:"threshold"},{anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_panoptic_segmentation.mask_threshold",description:`<strong>mask_threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
Threshold to use when turning the predicted masks into binary values.`,name:"mask_threshold"},{anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_panoptic_segmentation.overlap_mask_area_threshold",description:`<strong>overlap_mask_area_threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.8) &#x2014;
The overlap mask area threshold to merge or discard small disconnected parts within each binary
instance mask.`,name:"overlap_mask_area_threshold"},{anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_panoptic_segmentation.label_ids_to_fuse",description:`<strong>label_ids_to_fuse</strong> (<code>Set[int]</code>, <em>optional</em>) &#x2014;
The labels in this state will have all their instances be fused together. For instance we could say
there can only be one sky in an image, but several persons, so the label ID for sky would be in that
set, but not the one for person.`,name:"label_ids_to_fuse"},{anchor:"transformers.ConditionalDetrFeatureExtractor.post_process_panoptic_segmentation.target_sizes",description:`<strong>target_sizes</strong> (<code>List[Tuple]</code>, <em>optional</em>) &#x2014;
List of length (batch_size), where each list item (<code>Tuple[int, int]]</code>) corresponds to the requested
final size (height, width) of each prediction in batch. If unset, predictions will not be resized.`,name:"target_sizes"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/conditional_detr/image_processing_conditional_detr.py#L1521",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>
`}}),bt=new ne({}),vt=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/v4.27.1/en/model_doc/conditional_detr#transformers.ConditionalDetrConfig">ConditionalDetrConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/conditional_detr/modeling_conditional_detr.py#L1478"}}),wt=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/v4.27.1/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.27.1/en/model_doc/videomae#transformers.VideoMAEFeatureExtractor.__call__">ConditionalDetrImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.ConditionalDetrModel.forward.pixel_mask",description:`<strong>pixel_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, height, width)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding pixel values. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for pixels that are real (i.e. <strong>not masked</strong>),</li>
<li>0 for pixels that are padding (i.e. <strong>masked</strong>).</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"pixel_mask"},{anchor:"transformers.ConditionalDetrModel.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_queries)</code>, <em>optional</em>) &#x2014;
Not used by default. Can be used to mask object queries.`,name:"decoder_attention_mask"},{anchor:"transformers.ConditionalDetrModel.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.ConditionalDetrModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing the flattened feature map (output of the backbone + projection layer), you
can choose to directly pass a flattened representation of an image.`,name:"inputs_embeds"},{anchor:"transformers.ConditionalDetrModel.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_queries, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of initializing the queries with a tensor of zeros, you can choose to directly pass an
embedded representation.`,name:"decoder_inputs_embeds"},{anchor:"transformers.ConditionalDetrModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.ConditionalDetrModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.ConditionalDetrModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/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/v4.27.1/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>
`}}),$e=new Ja({props:{$$slots:{default:[gd]},$$scope:{ctx:E}}}),ke=new Zn({props:{anchor:"transformers.ConditionalDetrModel.forward.example",$$slots:{default:[fd]},$$scope:{ctx:E}}}),Tt=new ne({}),xt=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/v4.27.1/en/model_doc/conditional_detr#transformers.ConditionalDetrConfig">ConditionalDetrConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/conditional_detr/modeling_conditional_detr.py#L1647"}}),Et=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/v4.27.1/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.27.1/en/model_doc/videomae#transformers.VideoMAEFeatureExtractor.__call__">ConditionalDetrImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.ConditionalDetrForObjectDetection.forward.pixel_mask",description:`<strong>pixel_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, height, width)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding pixel values. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for pixels that are real (i.e. <strong>not masked</strong>),</li>
<li>0 for pixels that are padding (i.e. <strong>masked</strong>).</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"pixel_mask"},{anchor:"transformers.ConditionalDetrForObjectDetection.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_queries)</code>, <em>optional</em>) &#x2014;
Not used by default. Can be used to mask object queries.`,name:"decoder_attention_mask"},{anchor:"transformers.ConditionalDetrForObjectDetection.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.ConditionalDetrForObjectDetection.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing the flattened feature map (output of the backbone + projection layer), you
can choose to directly pass a flattened representation of an image.`,name:"inputs_embeds"},{anchor:"transformers.ConditionalDetrForObjectDetection.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_queries, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of initializing the queries with a tensor of zeros, you can choose to directly pass an
embedded representation.`,name:"decoder_inputs_embeds"},{anchor:"transformers.ConditionalDetrForObjectDetection.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.ConditionalDetrForObjectDetection.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.ConditionalDetrForObjectDetection.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ConditionalDetrForObjectDetection.forward.labels",description:`<strong>labels</strong> (<code>List[Dict]</code> of len <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the bipartite matching loss. List of dicts, each dictionary containing at least the
following 2 keys: &#x2018;class_labels&#x2019; and &#x2018;boxes&#x2019; (the class labels and bounding boxes of an image in the batch
respectively). The class labels themselves should be a <code>torch.LongTensor</code> of len <code>(number of bounding boxes in the image,)</code> and the boxes a <code>torch.FloatTensor</code> of shape <code>(number of bounding boxes in the image, 4)</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/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/v4.27.1/en/model_doc/conditional_detr#transformers.ConditionalDetrConfig"
>ConditionalDetrConfig</a>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> are provided)) \u2014 Total loss as a linear combination of a negative log-likehood (cross-entropy) for class prediction and a
bounding box loss. The latter is defined as a linear combination of the L1 loss and the generalized
scale-invariant IoU loss.</li>
<li><strong>loss_dict</strong> (<code>Dict</code>, <em>optional</em>) \u2014 A dictionary containing the individual losses. Useful for logging.</li>
<li><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_queries, num_classes + 1)</code>) \u2014 Classification logits (including no-object) for all queries.</li>
<li><strong>pred_boxes</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_queries, 4)</code>) \u2014 Normalized boxes coordinates for all queries, represented as (center_x, center_y, width, height). These
values are normalized in [0, 1], relative to the size of each individual image in the batch (disregarding
possible padding). You can use <a
  href="/docs/transformers/v4.27.1/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>
`}}),Ee=new Ja({props:{$$slots:{default:[ud]},$$scope:{ctx:E}}}),Fe=new Zn({props:{anchor:"transformers.ConditionalDetrForObjectDetection.forward.example",$$slots:{default:[_d]},$$scope:{ctx:E}}}),Ft=new ne({}),zt=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/v4.27.1/en/model_doc/conditional_detr#transformers.ConditionalDetrConfig">ConditionalDetrConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/conditional_detr/modeling_conditional_detr.py#L1835"}}),At=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/v4.27.1/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.27.1/en/model_doc/videomae#transformers.VideoMAEFeatureExtractor.__call__">ConditionalDetrImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.ConditionalDetrForSegmentation.forward.pixel_mask",description:`<strong>pixel_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, height, width)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding pixel values. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for pixels that are real (i.e. <strong>not masked</strong>),</li>
<li>0 for pixels that are padding (i.e. <strong>masked</strong>).</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"pixel_mask"},{anchor:"transformers.ConditionalDetrForSegmentation.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_queries)</code>, <em>optional</em>) &#x2014;
Not used by default. Can be used to mask object queries.`,name:"decoder_attention_mask"},{anchor:"transformers.ConditionalDetrForSegmentation.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.ConditionalDetrForSegmentation.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing the flattened feature map (output of the backbone + projection layer), you
can choose to directly pass a flattened representation of an image.`,name:"inputs_embeds"},{anchor:"transformers.ConditionalDetrForSegmentation.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_queries, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of initializing the queries with a tensor of zeros, you can choose to directly pass an
embedded representation.`,name:"decoder_inputs_embeds"},{anchor:"transformers.ConditionalDetrForSegmentation.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.ConditionalDetrForSegmentation.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.ConditionalDetrForSegmentation.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ConditionalDetrForSegmentation.forward.labels",description:`<strong>labels</strong> (<code>List[Dict]</code> of len <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the bipartite matching loss, DICE/F-1 loss and Focal loss. List of dicts, each
dictionary containing at least the following 3 keys: &#x2018;class_labels&#x2019;, &#x2018;boxes&#x2019; and &#x2018;masks&#x2019; (the class labels,
bounding boxes and segmentation masks of an image in the batch respectively). The class labels themselves
should be a <code>torch.LongTensor</code> of len <code>(number of bounding boxes in the image,)</code>, the boxes a
<code>torch.FloatTensor</code> of shape <code>(number of bounding boxes in the image, 4)</code> and the masks a
<code>torch.FloatTensor</code> of shape <code>(number of bounding boxes in the image, height, width)</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/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/v4.27.1/en/model_doc/conditional_detr#transformers.ConditionalDetrConfig"
>ConditionalDetrConfig</a>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> are provided)) \u2014 Total loss as a linear combination of a negative log-likehood (cross-entropy) for class prediction and a
bounding box loss. The latter is defined as a linear combination of the L1 loss and the generalized
scale-invariant IoU loss.</li>
<li><strong>loss_dict</strong> (<code>Dict</code>, <em>optional</em>) \u2014 A dictionary containing the individual losses. Useful for logging.</li>
<li><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_queries, num_classes + 1)</code>) \u2014 Classification logits (including no-object) for all queries.</li>
<li><strong>pred_boxes</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_queries, 4)</code>) \u2014 Normalized boxes coordinates for all queries, represented as (center_x, center_y, width, height). These
values are normalized in [0, 1], relative to the size of each individual image in the batch (disregarding
possible padding). You can use <a
  href="/docs/transformers/v4.27.1/en/model_doc/conditional_detr#transformers.ConditionalDetrFeatureExtractor.post_process_object_detection"
>post_process_object_detection()</a> to retrieve
the unnormalized bounding boxes.</li>
<li><strong>pred_masks</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_queries, height/4, width/4)</code>) \u2014 Segmentation masks logits for all queries. See also
<a
  href="/docs/transformers/v4.27.1/en/model_doc/conditional_detr#transformers.ConditionalDetrFeatureExtractor.post_process_semantic_segmentation"
>post_process_semantic_segmentation()</a> or
<a
  href="/docs/transformers/v4.27.1/en/model_doc/conditional_detr#transformers.ConditionalDetrFeatureExtractor.post_process_instance_segmentation"
>post_process_instance_segmentation()</a>
<a
  href="/docs/transformers/v4.27.1/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>
`}}),Pe=new Ja({props:{$$slots:{default:[bd]},$$scope:{ctx:E}}}),Ie=new Zn({props:{anchor:"transformers.ConditionalDetrForSegmentation.forward.example",$$slots:{default:[vd]},$$scope:{ctx:E}}}),{c(){p=n("meta"),x=l(),_=n("h1"),f=n("a"),T=n("span"),b(c.$$.fragment),u=l(),q=n("span"),es=a("Conditional DETR"),Yo=l(),W=n("h2"),se=n("a"),ho=n("span"),b(Ne.$$.fragment),ts=l(),go=n("span"),os=a("Overview"),Bo=l(),re=n("p"),ns=a("The Conditional DETR model was proposed in "),Se=n("a"),ss=a("Conditional DETR for Fast Training Convergence"),rs=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."),Go=l(),Nt=n("p"),as=a("The abstract from the paper is the following:"),Jo=l(),St=n("p"),Me=n("em"),is=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 "),Re=n("a"),ds=a("https://github.com/Atten4Vis/ConditionalDETR"),cs=a("."),Xo=l(),ae=n("img"),Zo=l(),ie=n("small"),ls=a("Conditional DETR shows much faster convergence compared to the original DETR. Taken from the "),Mt=n("a"),ms=a("original paper"),ps=a("."),Ko=l(),M=n("p"),hs=a("This model was contributed by "),Ue=n("a"),gs=a("DepuMeng"),fs=a(". The original code can be found "),Ve=n("a"),us=a("here"),_s=a("."),Qo=l(),H=n("h2"),de=n("a"),fo=n("span"),b(We.$$.fragment),bs=l(),uo=n("span"),vs=a("Documentation resources"),en=l(),Rt=n("ul"),_o=n("li"),Ut=n("a"),ys=a("Object detection task guide"),tn=l(),Y=n("h2"),ce=n("a"),bo=n("span"),b(He.$$.fragment),Ds=l(),vo=n("span"),Cs=a("ConditionalDetrConfig"),on=l(),L=n("div"),b(Ye.$$.fragment),ws=l(),B=n("p"),Ts=a("This is the configuration class to store the configuration of a "),Vt=n("a"),xs=a("ConditionalDetrModel"),$s=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
`),Be=n("a"),ks=a("microsoft/conditional-detr-resnet-50"),js=a(" architecture."),Es=l(),G=n("p"),Fs=a("Configuration objects inherit from "),Wt=n("a"),zs=a("PretrainedConfig"),Ps=a(` and can be used to control the model outputs. Read the
documentation from `),Ht=n("a"),Is=a("PretrainedConfig"),qs=a(" for more information."),As=l(),b(le.$$.fragment),nn=l(),J=n("h2"),me=n("a"),yo=n("span"),b(Ge.$$.fragment),Ls=l(),Do=n("span"),Os=a("ConditionalDetrImageProcessor"),sn=l(),$=n("div"),b(Je.$$.fragment),Ns=l(),Co=n("p"),Ss=a("Constructs a Conditional Detr image processor."),Ms=l(),pe=n("div"),b(Xe.$$.fragment),Rs=l(),wo=n("p"),Us=a("Preprocess an image or a batch of images so that it can be used by the model."),Vs=l(),he=n("div"),b(Ze.$$.fragment),Ws=l(),To=n("p"),Hs=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.`),Ys=l(),ge=n("div"),b(Ke.$$.fragment),Bs=l(),Qe=n("p"),Gs=a("Converts the raw output of "),Yt=n("a"),Js=a("ConditionalDetrForObjectDetection"),Xs=a(` into final bounding boxes in (top_left_x,
top_left_y, bottom_right_x, bottom_right_y) format. Only supports PyTorch.`),Zs=l(),fe=n("div"),b(et.$$.fragment),Ks=l(),tt=n("p"),Qs=a("Converts the output of "),Bt=n("a"),er=a("ConditionalDetrForSegmentation"),tr=a(` into instance segmentation predictions. Only supports
PyTorch.`),or=l(),ue=n("div"),b(ot.$$.fragment),nr=l(),nt=n("p"),sr=a("Converts the output of "),Gt=n("a"),rr=a("ConditionalDetrForSegmentation"),ar=a(` into semantic segmentation maps. Only supports
PyTorch.`),ir=l(),_e=n("div"),b(st.$$.fragment),dr=l(),rt=n("p"),cr=a("Converts the output of "),Jt=n("a"),lr=a("ConditionalDetrForSegmentation"),mr=a(` into image panoptic segmentation predictions. Only
supports PyTorch.`),rn=l(),X=n("h2"),be=n("a"),xo=n("span"),b(at.$$.fragment),pr=l(),$o=n("span"),hr=a("ConditionalDetrFeatureExtractor"),an=l(),j=n("div"),b(it.$$.fragment),gr=l(),ve=n("div"),b(dt.$$.fragment),fr=l(),ko=n("p"),ur=a("Preprocess an image or a batch of images."),_r=l(),ye=n("div"),b(ct.$$.fragment),br=l(),jo=n("p"),vr=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.`),yr=l(),De=n("div"),b(lt.$$.fragment),Dr=l(),mt=n("p"),Cr=a("Converts the raw output of "),Xt=n("a"),wr=a("ConditionalDetrForObjectDetection"),Tr=a(` into final bounding boxes in (top_left_x,
top_left_y, bottom_right_x, bottom_right_y) format. Only supports PyTorch.`),xr=l(),Ce=n("div"),b(pt.$$.fragment),$r=l(),ht=n("p"),kr=a("Converts the output of "),Zt=n("a"),jr=a("ConditionalDetrForSegmentation"),Er=a(` into instance segmentation predictions. Only supports
PyTorch.`),Fr=l(),we=n("div"),b(gt.$$.fragment),zr=l(),ft=n("p"),Pr=a("Converts the output of "),Kt=n("a"),Ir=a("ConditionalDetrForSegmentation"),qr=a(` into semantic segmentation maps. Only supports
PyTorch.`),Ar=l(),Te=n("div"),b(ut.$$.fragment),Lr=l(),_t=n("p"),Or=a("Converts the output of "),Qt=n("a"),Nr=a("ConditionalDetrForSegmentation"),Sr=a(` into image panoptic segmentation predictions. Only
supports PyTorch.`),dn=l(),Z=n("h2"),xe=n("a"),Eo=n("span"),b(bt.$$.fragment),Mr=l(),Fo=n("span"),Rr=a("ConditionalDetrModel"),cn=l(),z=n("div"),b(vt.$$.fragment),Ur=l(),zo=n("p"),Vr=a(`The bare Conditional DETR Model (consisting of a backbone and encoder-decoder Transformer) outputting raw
hidden-states without any specific head on top.`),Wr=l(),yt=n("p"),Hr=a("This model inherits from "),eo=n("a"),Yr=a("PreTrainedModel"),Br=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Gr=l(),Dt=n("p"),Jr=a("This model is also a PyTorch "),Ct=n("a"),Xr=a("torch.nn.Module"),Zr=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Kr=l(),O=n("div"),b(wt.$$.fragment),Qr=l(),K=n("p"),ea=a("The "),to=n("a"),ta=a("ConditionalDetrModel"),oa=a(" forward method, overrides the "),Po=n("code"),na=a("__call__"),sa=a(" special method."),ra=l(),b($e.$$.fragment),aa=l(),b(ke.$$.fragment),ln=l(),Q=n("h2"),je=n("a"),Io=n("span"),b(Tt.$$.fragment),ia=l(),qo=n("span"),da=a("ConditionalDetrForObjectDetection"),mn=l(),P=n("div"),b(xt.$$.fragment),ca=l(),Ao=n("p"),la=a(`CONDITIONAL_DETR Model (consisting of a backbone and encoder-decoder Transformer) with object detection heads on
top, for tasks such as COCO detection.`),ma=l(),$t=n("p"),pa=a("This model inherits from "),oo=n("a"),ha=a("PreTrainedModel"),ga=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.)`),fa=l(),kt=n("p"),ua=a("This model is also a PyTorch "),jt=n("a"),_a=a("torch.nn.Module"),ba=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),va=l(),N=n("div"),b(Et.$$.fragment),ya=l(),ee=n("p"),Da=a("The "),no=n("a"),Ca=a("ConditionalDetrForObjectDetection"),wa=a(" forward method, overrides the "),Lo=n("code"),Ta=a("__call__"),xa=a(" special method."),$a=l(),b(Ee.$$.fragment),ka=l(),b(Fe.$$.fragment),pn=l(),te=n("h2"),ze=n("a"),Oo=n("span"),b(Ft.$$.fragment),ja=l(),No=n("span"),Ea=a("ConditionalDetrForSegmentation"),hn=l(),I=n("div"),b(zt.$$.fragment),Fa=l(),So=n("p"),za=a(`CONDITIONAL_DETR Model (consisting of a backbone and encoder-decoder Transformer) with a segmentation head on top,
for tasks such as COCO panoptic.`),Pa=l(),Pt=n("p"),Ia=a("This model inherits from "),so=n("a"),qa=a("PreTrainedModel"),Aa=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.)`),La=l(),It=n("p"),Oa=a("This model is also a PyTorch "),qt=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.`),Ma=l(),S=n("div"),b(At.$$.fragment),Ra=l(),oe=n("p"),Ua=a("The "),ro=n("a"),Va=a("ConditionalDetrForSegmentation"),Wa=a(" forward method, overrides the "),Mo=n("code"),Ha=a("__call__"),Ya=a(" special method."),Ba=l(),b(Pe.$$.fragment),Ga=l(),b(Ie.$$.fragment),this.h()},l(t){const h=ld('[data-svelte="svelte-1phssyn"]',document.head);p=s(h,"META",{name:!0,content:!0}),h.forEach(o),x=m(t),_=s(t,"H1",{class:!0});var Lt=r(_);f=s(Lt,"A",{id:!0,class:!0,href:!0});var Ro=r(f);T=s(Ro,"SPAN",{});var Uo=r(T);v(c.$$.fragment,Uo),Uo.forEach(o),Ro.forEach(o),u=m(Lt),q=s(Lt,"SPAN",{});var Vo=r(q);es=i(Vo,"Conditional DETR"),Vo.forEach(o),Lt.forEach(o),Yo=m(t),W=s(t,"H2",{class:!0});var Ot=r(W);se=s(Ot,"A",{id:!0,class:!0,href:!0});var Wo=r(se);ho=s(Wo,"SPAN",{});var Ho=r(ho);v(Ne.$$.fragment,Ho),Ho.forEach(o),Wo.forEach(o),ts=m(Ot),go=s(Ot,"SPAN",{});var Za=r(go);os=i(Za,"Overview"),Za.forEach(o),Ot.forEach(o),Bo=m(t),re=s(t,"P",{});var fn=r(re);ns=i(fn,"The Conditional DETR model was proposed in "),Se=s(fn,"A",{href:!0,rel:!0});var Ka=r(Se);ss=i(Ka,"Conditional DETR for Fast Training Convergence"),Ka.forEach(o),rs=i(fn," 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."),fn.forEach(o),Go=m(t),Nt=s(t,"P",{});var Qa=r(Nt);as=i(Qa,"The abstract from the paper is the following:"),Qa.forEach(o),Jo=m(t),St=s(t,"P",{});var ei=r(St);Me=s(ei,"EM",{});var un=r(Me);is=i(un,"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 "),Re=s(un,"A",{href:!0,rel:!0});var ti=r(Re);ds=i(ti,"https://github.com/Atten4Vis/ConditionalDETR"),ti.forEach(o),cs=i(un,"."),un.forEach(o),ei.forEach(o),Xo=m(t),ae=s(t,"IMG",{src:!0,alt:!0,width:!0}),Zo=m(t),ie=s(t,"SMALL",{});var _n=r(ie);ls=i(_n,"Conditional DETR shows much faster convergence compared to the original DETR. Taken from the "),Mt=s(_n,"A",{href:!0});var oi=r(Mt);ms=i(oi,"original paper"),oi.forEach(o),ps=i(_n,"."),_n.forEach(o),Ko=m(t),M=s(t,"P",{});var ao=r(M);hs=i(ao,"This model was contributed by "),Ue=s(ao,"A",{href:!0,rel:!0});var ni=r(Ue);gs=i(ni,"DepuMeng"),ni.forEach(o),fs=i(ao,". The original code can be found "),Ve=s(ao,"A",{href:!0,rel:!0});var si=r(Ve);us=i(si,"here"),si.forEach(o),_s=i(ao,"."),ao.forEach(o),Qo=m(t),H=s(t,"H2",{class:!0});var bn=r(H);de=s(bn,"A",{id:!0,class:!0,href:!0});var ri=r(de);fo=s(ri,"SPAN",{});var ai=r(fo);v(We.$$.fragment,ai),ai.forEach(o),ri.forEach(o),bs=m(bn),uo=s(bn,"SPAN",{});var ii=r(uo);vs=i(ii,"Documentation resources"),ii.forEach(o),bn.forEach(o),en=m(t),Rt=s(t,"UL",{});var di=r(Rt);_o=s(di,"LI",{});var ci=r(_o);Ut=s(ci,"A",{href:!0});var li=r(Ut);ys=i(li,"Object detection task guide"),li.forEach(o),ci.forEach(o),di.forEach(o),tn=m(t),Y=s(t,"H2",{class:!0});var vn=r(Y);ce=s(vn,"A",{id:!0,class:!0,href:!0});var mi=r(ce);bo=s(mi,"SPAN",{});var pi=r(bo);v(He.$$.fragment,pi),pi.forEach(o),mi.forEach(o),Ds=m(vn),vo=s(vn,"SPAN",{});var hi=r(vo);Cs=i(hi,"ConditionalDetrConfig"),hi.forEach(o),vn.forEach(o),on=m(t),L=s(t,"DIV",{class:!0});var qe=r(L);v(Ye.$$.fragment,qe),ws=m(qe),B=s(qe,"P",{});var io=r(B);Ts=i(io,"This is the configuration class to store the configuration of a "),Vt=s(io,"A",{href:!0});var gi=r(Vt);xs=i(gi,"ConditionalDetrModel"),gi.forEach(o),$s=i(io,`. It is used to instantiate
a Conditional DETR model according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the Conditional DETR
`),Be=s(io,"A",{href:!0,rel:!0});var fi=r(Be);ks=i(fi,"microsoft/conditional-detr-resnet-50"),fi.forEach(o),js=i(io," architecture."),io.forEach(o),Es=m(qe),G=s(qe,"P",{});var co=r(G);Fs=i(co,"Configuration objects inherit from "),Wt=s(co,"A",{href:!0});var ui=r(Wt);zs=i(ui,"PretrainedConfig"),ui.forEach(o),Ps=i(co,` and can be used to control the model outputs. Read the
documentation from `),Ht=s(co,"A",{href:!0});var _i=r(Ht);Is=i(_i,"PretrainedConfig"),_i.forEach(o),qs=i(co," for more information."),co.forEach(o),As=m(qe),v(le.$$.fragment,qe),qe.forEach(o),nn=m(t),J=s(t,"H2",{class:!0});var yn=r(J);me=s(yn,"A",{id:!0,class:!0,href:!0});var bi=r(me);yo=s(bi,"SPAN",{});var vi=r(yo);v(Ge.$$.fragment,vi),vi.forEach(o),bi.forEach(o),Ls=m(yn),Do=s(yn,"SPAN",{});var yi=r(Do);Os=i(yi,"ConditionalDetrImageProcessor"),yi.forEach(o),yn.forEach(o),sn=m(t),$=s(t,"DIV",{class:!0});var F=r($);v(Je.$$.fragment,F),Ns=m(F),Co=s(F,"P",{});var Di=r(Co);Ss=i(Di,"Constructs a Conditional Detr image processor."),Di.forEach(o),Ms=m(F),pe=s(F,"DIV",{class:!0});var Dn=r(pe);v(Xe.$$.fragment,Dn),Rs=m(Dn),wo=s(Dn,"P",{});var Ci=r(wo);Us=i(Ci,"Preprocess an image or a batch of images so that it can be used by the model."),Ci.forEach(o),Dn.forEach(o),Vs=m(F),he=s(F,"DIV",{class:!0});var Cn=r(he);v(Ze.$$.fragment,Cn),Ws=m(Cn),To=s(Cn,"P",{});var wi=r(To);Hs=i(wi,`Pads a batch of images with zeros to the size of largest height and width in the batch and returns their
corresponding pixel mask.`),wi.forEach(o),Cn.forEach(o),Ys=m(F),ge=s(F,"DIV",{class:!0});var wn=r(ge);v(Ke.$$.fragment,wn),Bs=m(wn),Qe=s(wn,"P",{});var Tn=r(Qe);Gs=i(Tn,"Converts the raw output of "),Yt=s(Tn,"A",{href:!0});var Ti=r(Yt);Js=i(Ti,"ConditionalDetrForObjectDetection"),Ti.forEach(o),Xs=i(Tn,` into final bounding boxes in (top_left_x,
top_left_y, bottom_right_x, bottom_right_y) format. Only supports PyTorch.`),Tn.forEach(o),wn.forEach(o),Zs=m(F),fe=s(F,"DIV",{class:!0});var xn=r(fe);v(et.$$.fragment,xn),Ks=m(xn),tt=s(xn,"P",{});var $n=r(tt);Qs=i($n,"Converts the output of "),Bt=s($n,"A",{href:!0});var xi=r(Bt);er=i(xi,"ConditionalDetrForSegmentation"),xi.forEach(o),tr=i($n,` into instance segmentation predictions. Only supports
PyTorch.`),$n.forEach(o),xn.forEach(o),or=m(F),ue=s(F,"DIV",{class:!0});var kn=r(ue);v(ot.$$.fragment,kn),nr=m(kn),nt=s(kn,"P",{});var jn=r(nt);sr=i(jn,"Converts the output of "),Gt=s(jn,"A",{href:!0});var $i=r(Gt);rr=i($i,"ConditionalDetrForSegmentation"),$i.forEach(o),ar=i(jn,` into semantic segmentation maps. Only supports
PyTorch.`),jn.forEach(o),kn.forEach(o),ir=m(F),_e=s(F,"DIV",{class:!0});var En=r(_e);v(st.$$.fragment,En),dr=m(En),rt=s(En,"P",{});var Fn=r(rt);cr=i(Fn,"Converts the output of "),Jt=s(Fn,"A",{href:!0});var ki=r(Jt);lr=i(ki,"ConditionalDetrForSegmentation"),ki.forEach(o),mr=i(Fn,` into image panoptic segmentation predictions. Only
supports PyTorch.`),Fn.forEach(o),En.forEach(o),F.forEach(o),rn=m(t),X=s(t,"H2",{class:!0});var zn=r(X);be=s(zn,"A",{id:!0,class:!0,href:!0});var ji=r(be);xo=s(ji,"SPAN",{});var Ei=r(xo);v(at.$$.fragment,Ei),Ei.forEach(o),ji.forEach(o),pr=m(zn),$o=s(zn,"SPAN",{});var Fi=r($o);hr=i(Fi,"ConditionalDetrFeatureExtractor"),Fi.forEach(o),zn.forEach(o),an=m(t),j=s(t,"DIV",{class:!0});var A=r(j);v(it.$$.fragment,A),gr=m(A),ve=s(A,"DIV",{class:!0});var Pn=r(ve);v(dt.$$.fragment,Pn),fr=m(Pn),ko=s(Pn,"P",{});var zi=r(ko);ur=i(zi,"Preprocess an image or a batch of images."),zi.forEach(o),Pn.forEach(o),_r=m(A),ye=s(A,"DIV",{class:!0});var In=r(ye);v(ct.$$.fragment,In),br=m(In),jo=s(In,"P",{});var Pi=r(jo);vr=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(o),In.forEach(o),yr=m(A),De=s(A,"DIV",{class:!0});var qn=r(De);v(lt.$$.fragment,qn),Dr=m(qn),mt=s(qn,"P",{});var An=r(mt);Cr=i(An,"Converts the raw output of "),Xt=s(An,"A",{href:!0});var Ii=r(Xt);wr=i(Ii,"ConditionalDetrForObjectDetection"),Ii.forEach(o),Tr=i(An,` into final bounding boxes in (top_left_x,
top_left_y, bottom_right_x, bottom_right_y) format. Only supports PyTorch.`),An.forEach(o),qn.forEach(o),xr=m(A),Ce=s(A,"DIV",{class:!0});var Ln=r(Ce);v(pt.$$.fragment,Ln),$r=m(Ln),ht=s(Ln,"P",{});var On=r(ht);kr=i(On,"Converts the output of "),Zt=s(On,"A",{href:!0});var qi=r(Zt);jr=i(qi,"ConditionalDetrForSegmentation"),qi.forEach(o),Er=i(On,` into instance segmentation predictions. Only supports
PyTorch.`),On.forEach(o),Ln.forEach(o),Fr=m(A),we=s(A,"DIV",{class:!0});var Nn=r(we);v(gt.$$.fragment,Nn),zr=m(Nn),ft=s(Nn,"P",{});var Sn=r(ft);Pr=i(Sn,"Converts the output of "),Kt=s(Sn,"A",{href:!0});var Ai=r(Kt);Ir=i(Ai,"ConditionalDetrForSegmentation"),Ai.forEach(o),qr=i(Sn,` into semantic segmentation maps. Only supports
PyTorch.`),Sn.forEach(o),Nn.forEach(o),Ar=m(A),Te=s(A,"DIV",{class:!0});var Mn=r(Te);v(ut.$$.fragment,Mn),Lr=m(Mn),_t=s(Mn,"P",{});var Rn=r(_t);Or=i(Rn,"Converts the output of "),Qt=s(Rn,"A",{href:!0});var Li=r(Qt);Nr=i(Li,"ConditionalDetrForSegmentation"),Li.forEach(o),Sr=i(Rn,` into image panoptic segmentation predictions. Only
supports PyTorch.`),Rn.forEach(o),Mn.forEach(o),A.forEach(o),dn=m(t),Z=s(t,"H2",{class:!0});var Un=r(Z);xe=s(Un,"A",{id:!0,class:!0,href:!0});var Oi=r(xe);Eo=s(Oi,"SPAN",{});var Ni=r(Eo);v(bt.$$.fragment,Ni),Ni.forEach(o),Oi.forEach(o),Mr=m(Un),Fo=s(Un,"SPAN",{});var Si=r(Fo);Rr=i(Si,"ConditionalDetrModel"),Si.forEach(o),Un.forEach(o),cn=m(t),z=s(t,"DIV",{class:!0});var R=r(z);v(vt.$$.fragment,R),Ur=m(R),zo=s(R,"P",{});var Mi=r(zo);Vr=i(Mi,`The bare Conditional DETR Model (consisting of a backbone and encoder-decoder Transformer) outputting raw
hidden-states without any specific head on top.`),Mi.forEach(o),Wr=m(R),yt=s(R,"P",{});var Vn=r(yt);Hr=i(Vn,"This model inherits from "),eo=s(Vn,"A",{href:!0});var Ri=r(eo);Yr=i(Ri,"PreTrainedModel"),Ri.forEach(o),Br=i(Vn,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Vn.forEach(o),Gr=m(R),Dt=s(R,"P",{});var Wn=r(Dt);Jr=i(Wn,"This model is also a PyTorch "),Ct=s(Wn,"A",{href:!0,rel:!0});var Ui=r(Ct);Xr=i(Ui,"torch.nn.Module"),Ui.forEach(o),Zr=i(Wn,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Wn.forEach(o),Kr=m(R),O=s(R,"DIV",{class:!0});var Ae=r(O);v(wt.$$.fragment,Ae),Qr=m(Ae),K=s(Ae,"P",{});var lo=r(K);ea=i(lo,"The "),to=s(lo,"A",{href:!0});var Vi=r(to);ta=i(Vi,"ConditionalDetrModel"),Vi.forEach(o),oa=i(lo," forward method, overrides the "),Po=s(lo,"CODE",{});var Wi=r(Po);na=i(Wi,"__call__"),Wi.forEach(o),sa=i(lo," special method."),lo.forEach(o),ra=m(Ae),v($e.$$.fragment,Ae),aa=m(Ae),v(ke.$$.fragment,Ae),Ae.forEach(o),R.forEach(o),ln=m(t),Q=s(t,"H2",{class:!0});var Hn=r(Q);je=s(Hn,"A",{id:!0,class:!0,href:!0});var Hi=r(je);Io=s(Hi,"SPAN",{});var Yi=r(Io);v(Tt.$$.fragment,Yi),Yi.forEach(o),Hi.forEach(o),ia=m(Hn),qo=s(Hn,"SPAN",{});var Bi=r(qo);da=i(Bi,"ConditionalDetrForObjectDetection"),Bi.forEach(o),Hn.forEach(o),mn=m(t),P=s(t,"DIV",{class:!0});var U=r(P);v(xt.$$.fragment,U),ca=m(U),Ao=s(U,"P",{});var Gi=r(Ao);la=i(Gi,`CONDITIONAL_DETR Model (consisting of a backbone and encoder-decoder Transformer) with object detection heads on
top, for tasks such as COCO detection.`),Gi.forEach(o),ma=m(U),$t=s(U,"P",{});var Yn=r($t);pa=i(Yn,"This model inherits from "),oo=s(Yn,"A",{href:!0});var Ji=r(oo);ha=i(Ji,"PreTrainedModel"),Ji.forEach(o),ga=i(Yn,`. 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.)`),Yn.forEach(o),fa=m(U),kt=s(U,"P",{});var Bn=r(kt);ua=i(Bn,"This model is also a PyTorch "),jt=s(Bn,"A",{href:!0,rel:!0});var Xi=r(jt);_a=i(Xi,"torch.nn.Module"),Xi.forEach(o),ba=i(Bn,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Bn.forEach(o),va=m(U),N=s(U,"DIV",{class:!0});var Le=r(N);v(Et.$$.fragment,Le),ya=m(Le),ee=s(Le,"P",{});var mo=r(ee);Da=i(mo,"The "),no=s(mo,"A",{href:!0});var Zi=r(no);Ca=i(Zi,"ConditionalDetrForObjectDetection"),Zi.forEach(o),wa=i(mo," forward method, overrides the "),Lo=s(mo,"CODE",{});var Ki=r(Lo);Ta=i(Ki,"__call__"),Ki.forEach(o),xa=i(mo," special method."),mo.forEach(o),$a=m(Le),v(Ee.$$.fragment,Le),ka=m(Le),v(Fe.$$.fragment,Le),Le.forEach(o),U.forEach(o),pn=m(t),te=s(t,"H2",{class:!0});var Gn=r(te);ze=s(Gn,"A",{id:!0,class:!0,href:!0});var Qi=r(ze);Oo=s(Qi,"SPAN",{});var ed=r(Oo);v(Ft.$$.fragment,ed),ed.forEach(o),Qi.forEach(o),ja=m(Gn),No=s(Gn,"SPAN",{});var td=r(No);Ea=i(td,"ConditionalDetrForSegmentation"),td.forEach(o),Gn.forEach(o),hn=m(t),I=s(t,"DIV",{class:!0});var V=r(I);v(zt.$$.fragment,V),Fa=m(V),So=s(V,"P",{});var od=r(So);za=i(od,`CONDITIONAL_DETR Model (consisting of a backbone and encoder-decoder Transformer) with a segmentation head on top,
for tasks such as COCO panoptic.`),od.forEach(o),Pa=m(V),Pt=s(V,"P",{});var Jn=r(Pt);Ia=i(Jn,"This model inherits from "),so=s(Jn,"A",{href:!0});var nd=r(so);qa=i(nd,"PreTrainedModel"),nd.forEach(o),Aa=i(Jn,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Jn.forEach(o),La=m(V),It=s(V,"P",{});var Xn=r(It);Oa=i(Xn,"This model is also a PyTorch "),qt=s(Xn,"A",{href:!0,rel:!0});var sd=r(qt);Na=i(sd,"torch.nn.Module"),sd.forEach(o),Sa=i(Xn,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Xn.forEach(o),Ma=m(V),S=s(V,"DIV",{class:!0});var Oe=r(S);v(At.$$.fragment,Oe),Ra=m(Oe),oe=s(Oe,"P",{});var po=r(oe);Ua=i(po,"The "),ro=s(po,"A",{href:!0});var rd=r(ro);Va=i(rd,"ConditionalDetrForSegmentation"),rd.forEach(o),Wa=i(po," forward method, overrides the "),Mo=s(po,"CODE",{});var ad=r(Mo);Ha=i(ad,"__call__"),ad.forEach(o),Ya=i(po," special method."),po.forEach(o),Ba=m(Oe),v(Pe.$$.fragment,Oe),Ga=m(Oe),v(Ie.$$.fragment,Oe),Oe.forEach(o),V.forEach(o),this.h()},h(){d(p,"name","hf:doc:metadata"),d(p,"content",JSON.stringify(Dd)),d(f,"id","conditional-detr"),d(f,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(f,"href","#conditional-detr"),d(_,"class","relative group"),d(se,"id","overview"),d(se,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(se,"href","#overview"),d(W,"class","relative group"),d(Se,"href","https://arxiv.org/abs/2108.06152"),d(Se,"rel","nofollow"),d(Re,"href","https://github.com/Atten4Vis/ConditionalDETR"),d(Re,"rel","nofollow"),md(ae.src,Xa="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/conditional_detr_curve.jpg")||d(ae,"src",Xa),d(ae,"alt","drawing"),d(ae,"width","600"),d(Mt,"href","https://arxiv.org/abs/2108.06152"),d(Ue,"href","https://huggingface.co/DepuMeng"),d(Ue,"rel","nofollow"),d(Ve,"href","https://github.com/Atten4Vis/ConditionalDETR"),d(Ve,"rel","nofollow"),d(de,"id","documentation-resources"),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","#documentation-resources"),d(H,"class","relative group"),d(Ut,"href","./tasks/object_detection"),d(ce,"id","transformers.ConditionalDetrConfig"),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.ConditionalDetrConfig"),d(Y,"class","relative group"),d(Vt,"href","/docs/transformers/v4.27.1/en/model_doc/conditional_detr#transformers.ConditionalDetrModel"),d(Be,"href","https://huggingface.co/microsoft/conditional-detr-resnet-50"),d(Be,"rel","nofollow"),d(Wt,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),d(Ht,"href","/docs/transformers/v4.27.1/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(me,"id","transformers.ConditionalDetrImageProcessor"),d(me,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(me,"href","#transformers.ConditionalDetrImageProcessor"),d(J,"class","relative group"),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(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(Yt,"href","/docs/transformers/v4.27.1/en/model_doc/conditional_detr#transformers.ConditionalDetrForObjectDetection"),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(Bt,"href","/docs/transformers/v4.27.1/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation"),d(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Gt,"href","/docs/transformers/v4.27.1/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation"),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(Jt,"href","/docs/transformers/v4.27.1/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation"),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($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(be,"id","transformers.ConditionalDetrFeatureExtractor"),d(be,"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(be,"href","#transformers.ConditionalDetrFeatureExtractor"),d(X,"class","relative group"),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(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(Xt,"href","/docs/transformers/v4.27.1/en/model_doc/conditional_detr#transformers.ConditionalDetrForObjectDetection"),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(Zt,"href","/docs/transformers/v4.27.1/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation"),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(Kt,"href","/docs/transformers/v4.27.1/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation"),d(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Qt,"href","/docs/transformers/v4.27.1/en/model_doc/conditional_detr#transformers.ConditionalDetrForSegmentation"),d(Te,"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(xe,"id","transformers.ConditionalDetrModel"),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.ConditionalDetrModel"),d(Z,"class","relative group"),d(eo,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),d(Ct,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Ct,"rel","nofollow"),d(to,"href","/docs/transformers/v4.27.1/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(je,"id","transformers.ConditionalDetrForObjectDetection"),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.ConditionalDetrForObjectDetection"),d(Q,"class","relative group"),d(oo,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),d(jt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(jt,"rel","nofollow"),d(no,"href","/docs/transformers/v4.27.1/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(ze,"id","transformers.ConditionalDetrForSegmentation"),d(ze,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(ze,"href","#transformers.ConditionalDetrForSegmentation"),d(te,"class","relative group"),d(so,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),d(qt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(qt,"rel","nofollow"),d(ro,"href","/docs/transformers/v4.27.1/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(t,h){e(document.head,p),g(t,x,h),g(t,_,h),e(_,f),e(f,T),y(c,T,null),e(_,u),e(_,q),e(q,es),g(t,Yo,h),g(t,W,h),e(W,se),e(se,ho),y(Ne,ho,null),e(W,ts),e(W,go),e(go,os),g(t,Bo,h),g(t,re,h),e(re,ns),e(re,Se),e(Se,ss),e(re,rs),g(t,Go,h),g(t,Nt,h),e(Nt,as),g(t,Jo,h),g(t,St,h),e(St,Me),e(Me,is),e(Me,Re),e(Re,ds),e(Me,cs),g(t,Xo,h),g(t,ae,h),g(t,Zo,h),g(t,ie,h),e(ie,ls),e(ie,Mt),e(Mt,ms),e(ie,ps),g(t,Ko,h),g(t,M,h),e(M,hs),e(M,Ue),e(Ue,gs),e(M,fs),e(M,Ve),e(Ve,us),e(M,_s),g(t,Qo,h),g(t,H,h),e(H,de),e(de,fo),y(We,fo,null),e(H,bs),e(H,uo),e(uo,vs),g(t,en,h),g(t,Rt,h),e(Rt,_o),e(_o,Ut),e(Ut,ys),g(t,tn,h),g(t,Y,h),e(Y,ce),e(ce,bo),y(He,bo,null),e(Y,Ds),e(Y,vo),e(vo,Cs),g(t,on,h),g(t,L,h),y(Ye,L,null),e(L,ws),e(L,B),e(B,Ts),e(B,Vt),e(Vt,xs),e(B,$s),e(B,Be),e(Be,ks),e(B,js),e(L,Es),e(L,G),e(G,Fs),e(G,Wt),e(Wt,zs),e(G,Ps),e(G,Ht),e(Ht,Is),e(G,qs),e(L,As),y(le,L,null),g(t,nn,h),g(t,J,h),e(J,me),e(me,yo),y(Ge,yo,null),e(J,Ls),e(J,Do),e(Do,Os),g(t,sn,h),g(t,$,h),y(Je,$,null),e($,Ns),e($,Co),e(Co,Ss),e($,Ms),e($,pe),y(Xe,pe,null),e(pe,Rs),e(pe,wo),e(wo,Us),e($,Vs),e($,he),y(Ze,he,null),e(he,Ws),e(he,To),e(To,Hs),e($,Ys),e($,ge),y(Ke,ge,null),e(ge,Bs),e(ge,Qe),e(Qe,Gs),e(Qe,Yt),e(Yt,Js),e(Qe,Xs),e($,Zs),e($,fe),y(et,fe,null),e(fe,Ks),e(fe,tt),e(tt,Qs),e(tt,Bt),e(Bt,er),e(tt,tr),e($,or),e($,ue),y(ot,ue,null),e(ue,nr),e(ue,nt),e(nt,sr),e(nt,Gt),e(Gt,rr),e(nt,ar),e($,ir),e($,_e),y(st,_e,null),e(_e,dr),e(_e,rt),e(rt,cr),e(rt,Jt),e(Jt,lr),e(rt,mr),g(t,rn,h),g(t,X,h),e(X,be),e(be,xo),y(at,xo,null),e(X,pr),e(X,$o),e($o,hr),g(t,an,h),g(t,j,h),y(it,j,null),e(j,gr),e(j,ve),y(dt,ve,null),e(ve,fr),e(ve,ko),e(ko,ur),e(j,_r),e(j,ye),y(ct,ye,null),e(ye,br),e(ye,jo),e(jo,vr),e(j,yr),e(j,De),y(lt,De,null),e(De,Dr),e(De,mt),e(mt,Cr),e(mt,Xt),e(Xt,wr),e(mt,Tr),e(j,xr),e(j,Ce),y(pt,Ce,null),e(Ce,$r),e(Ce,ht),e(ht,kr),e(ht,Zt),e(Zt,jr),e(ht,Er),e(j,Fr),e(j,we),y(gt,we,null),e(we,zr),e(we,ft),e(ft,Pr),e(ft,Kt),e(Kt,Ir),e(ft,qr),e(j,Ar),e(j,Te),y(ut,Te,null),e(Te,Lr),e(Te,_t),e(_t,Or),e(_t,Qt),e(Qt,Nr),e(_t,Sr),g(t,dn,h),g(t,Z,h),e(Z,xe),e(xe,Eo),y(bt,Eo,null),e(Z,Mr),e(Z,Fo),e(Fo,Rr),g(t,cn,h),g(t,z,h),y(vt,z,null),e(z,Ur),e(z,zo),e(zo,Vr),e(z,Wr),e(z,yt),e(yt,Hr),e(yt,eo),e(eo,Yr),e(yt,Br),e(z,Gr),e(z,Dt),e(Dt,Jr),e(Dt,Ct),e(Ct,Xr),e(Dt,Zr),e(z,Kr),e(z,O),y(wt,O,null),e(O,Qr),e(O,K),e(K,ea),e(K,to),e(to,ta),e(K,oa),e(K,Po),e(Po,na),e(K,sa),e(O,ra),y($e,O,null),e(O,aa),y(ke,O,null),g(t,ln,h),g(t,Q,h),e(Q,je),e(je,Io),y(Tt,Io,null),e(Q,ia),e(Q,qo),e(qo,da),g(t,mn,h),g(t,P,h),y(xt,P,null),e(P,ca),e(P,Ao),e(Ao,la),e(P,ma),e(P,$t),e($t,pa),e($t,oo),e(oo,ha),e($t,ga),e(P,fa),e(P,kt),e(kt,ua),e(kt,jt),e(jt,_a),e(kt,ba),e(P,va),e(P,N),y(Et,N,null),e(N,ya),e(N,ee),e(ee,Da),e(ee,no),e(no,Ca),e(ee,wa),e(ee,Lo),e(Lo,Ta),e(ee,xa),e(N,$a),y(Ee,N,null),e(N,ka),y(Fe,N,null),g(t,pn,h),g(t,te,h),e(te,ze),e(ze,Oo),y(Ft,Oo,null),e(te,ja),e(te,No),e(No,Ea),g(t,hn,h),g(t,I,h),y(zt,I,null),e(I,Fa),e(I,So),e(So,za),e(I,Pa),e(I,Pt),e(Pt,Ia),e(Pt,so),e(so,qa),e(Pt,Aa),e(I,La),e(I,It),e(It,Oa),e(It,qt),e(qt,Na),e(It,Sa),e(I,Ma),e(I,S),y(At,S,null),e(S,Ra),e(S,oe),e(oe,Ua),e(oe,ro),e(ro,Va),e(oe,Wa),e(oe,Mo),e(Mo,Ha),e(oe,Ya),e(S,Ba),y(Pe,S,null),e(S,Ga),y(Ie,S,null),gn=!0},p(t,[h]){const Lt={};h&2&&(Lt.$$scope={dirty:h,ctx:t}),le.$set(Lt);const Ro={};h&2&&(Ro.$$scope={dirty:h,ctx:t}),$e.$set(Ro);const Uo={};h&2&&(Uo.$$scope={dirty:h,ctx:t}),ke.$set(Uo);const Vo={};h&2&&(Vo.$$scope={dirty:h,ctx:t}),Ee.$set(Vo);const Ot={};h&2&&(Ot.$$scope={dirty:h,ctx:t}),Fe.$set(Ot);const Wo={};h&2&&(Wo.$$scope={dirty:h,ctx:t}),Pe.$set(Wo);const Ho={};h&2&&(Ho.$$scope={dirty:h,ctx:t}),Ie.$set(Ho)},i(t){gn||(D(c.$$.fragment,t),D(Ne.$$.fragment,t),D(We.$$.fragment,t),D(He.$$.fragment,t),D(Ye.$$.fragment,t),D(le.$$.fragment,t),D(Ge.$$.fragment,t),D(Je.$$.fragment,t),D(Xe.$$.fragment,t),D(Ze.$$.fragment,t),D(Ke.$$.fragment,t),D(et.$$.fragment,t),D(ot.$$.fragment,t),D(st.$$.fragment,t),D(at.$$.fragment,t),D(it.$$.fragment,t),D(dt.$$.fragment,t),D(ct.$$.fragment,t),D(lt.$$.fragment,t),D(pt.$$.fragment,t),D(gt.$$.fragment,t),D(ut.$$.fragment,t),D(bt.$$.fragment,t),D(vt.$$.fragment,t),D(wt.$$.fragment,t),D($e.$$.fragment,t),D(ke.$$.fragment,t),D(Tt.$$.fragment,t),D(xt.$$.fragment,t),D(Et.$$.fragment,t),D(Ee.$$.fragment,t),D(Fe.$$.fragment,t),D(Ft.$$.fragment,t),D(zt.$$.fragment,t),D(At.$$.fragment,t),D(Pe.$$.fragment,t),D(Ie.$$.fragment,t),gn=!0)},o(t){C(c.$$.fragment,t),C(Ne.$$.fragment,t),C(We.$$.fragment,t),C(He.$$.fragment,t),C(Ye.$$.fragment,t),C(le.$$.fragment,t),C(Ge.$$.fragment,t),C(Je.$$.fragment,t),C(Xe.$$.fragment,t),C(Ze.$$.fragment,t),C(Ke.$$.fragment,t),C(et.$$.fragment,t),C(ot.$$.fragment,t),C(st.$$.fragment,t),C(at.$$.fragment,t),C(it.$$.fragment,t),C(dt.$$.fragment,t),C(ct.$$.fragment,t),C(lt.$$.fragment,t),C(pt.$$.fragment,t),C(gt.$$.fragment,t),C(ut.$$.fragment,t),C(bt.$$.fragment,t),C(vt.$$.fragment,t),C(wt.$$.fragment,t),C($e.$$.fragment,t),C(ke.$$.fragment,t),C(Tt.$$.fragment,t),C(xt.$$.fragment,t),C(Et.$$.fragment,t),C(Ee.$$.fragment,t),C(Fe.$$.fragment,t),C(Ft.$$.fragment,t),C(zt.$$.fragment,t),C(At.$$.fragment,t),C(Pe.$$.fragment,t),C(Ie.$$.fragment,t),gn=!1},d(t){o(p),t&&o(x),t&&o(_),w(c),t&&o(Yo),t&&o(W),w(Ne),t&&o(Bo),t&&o(re),t&&o(Go),t&&o(Nt),t&&o(Jo),t&&o(St),t&&o(Xo),t&&o(ae),t&&o(Zo),t&&o(ie),t&&o(Ko),t&&o(M),t&&o(Qo),t&&o(H),w(We),t&&o(en),t&&o(Rt),t&&o(tn),t&&o(Y),w(He),t&&o(on),t&&o(L),w(Ye),w(le),t&&o(nn),t&&o(J),w(Ge),t&&o(sn),t&&o($),w(Je),w(Xe),w(Ze),w(Ke),w(et),w(ot),w(st),t&&o(rn),t&&o(X),w(at),t&&o(an),t&&o(j),w(it),w(dt),w(ct),w(lt),w(pt),w(gt),w(ut),t&&o(dn),t&&o(Z),w(bt),t&&o(cn),t&&o(z),w(vt),w(wt),w($e),w(ke),t&&o(ln),t&&o(Q),w(Tt),t&&o(mn),t&&o(P),w(xt),w(Et),w(Ee),w(Fe),t&&o(pn),t&&o(te),w(Ft),t&&o(hn),t&&o(I),w(zt),w(At),w(Pe),w(Ie)}}}const Dd={local:"conditional-detr",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.ConditionalDetrConfig",title:"ConditionalDetrConfig"},{local:"transformers.ConditionalDetrImageProcessor",title:"ConditionalDetrImageProcessor"},{local:"transformers.ConditionalDetrFeatureExtractor",title:"ConditionalDetrFeatureExtractor"},{local:"transformers.ConditionalDetrModel",title:"ConditionalDetrModel"},{local:"transformers.ConditionalDetrForObjectDetection",title:"ConditionalDetrForObjectDetection"},{local:"transformers.ConditionalDetrForSegmentation",title:"ConditionalDetrForSegmentation"}],title:"Conditional DETR"};function Cd(E){return pd(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ed extends id{constructor(p){super();dd(this,p,Cd,yd,cd,{})}}export{Ed as default,Dd as metadata};
