import{S as Sn,i as Wn,s as Hn,e as r,k as c,w as v,t as s,M as Un,c as a,d as o,m,a as n,x,h as i,b as d,N as Bn,G as e,g as u,y as w,q as T,o as y,B as $,v as Vn,L as Ua}from"../../chunks/vendor-hf-doc-builder.js";import{T as Wa}from"../../chunks/Tip-hf-doc-builder.js";import{D as M}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ba}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Tt}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ha}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Xn(z){let f,b;return{c(){f=r("p"),b=s(`NumPy arrays and PyTorch tensors are converted to PIL images when resizing, so the most efficient is to pass
PIL images.`)},l(g){f=a(g,"P",{});var h=n(f);b=i(h,`NumPy arrays and PyTorch tensors are converted to PIL images when resizing, so the most efficient is to pass
PIL images.`),h.forEach(o)},m(g,h){u(g,f,h),e(f,b)},d(g){g&&o(f)}}}function Gn(z){let f,b,g,h,D;return h=new Ba({props:{code:`from transformers import DeformableDetrModel, DeformableDetrConfig

# Initializing a Deformable DETR SenseTime/deformable-detr style configuration
configuration = DeformableDetrConfig()

# Initializing a model from the SenseTime/deformable-detr style configuration
model = DeformableDetrModel(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> DeformableDetrModel, DeformableDetrConfig

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){f=r("p"),b=s("Examples:"),g=c(),v(h.$$.fragment)},l(l){f=a(l,"P",{});var _=n(f);b=i(_,"Examples:"),_.forEach(o),g=m(l),x(h.$$.fragment,l)},m(l,_){u(l,f,_),e(f,b),u(l,g,_),w(h,l,_),D=!0},p:Ua,i(l){D||(T(h.$$.fragment,l),D=!0)},o(l){y(h.$$.fragment,l),D=!1},d(l){l&&o(f),l&&o(g),$(h,l)}}}function Jn(z){let f,b,g,h,D;return{c(){f=r("p"),b=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r("code"),h=s("Module"),D=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){f=a(l,"P",{});var _=n(f);b=i(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a(_,"CODE",{});var O=n(g);h=i(O,"Module"),O.forEach(o),D=i(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(o)},m(l,_){u(l,f,_),e(f,b),e(f,g),e(g,h),e(f,D)},d(l){l&&o(f)}}}function Zn(z){let f,b,g,h,D;return h=new Ba({props:{code:`from transformers import AutoFeatureExtractor, DeformableDetrModel
from PIL import Image
import requests

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

feature_extractor = AutoFeatureExtractor.from_pretrained("SenseTime/deformable-detr")
model = DeformableDetrModel.from_pretrained("SenseTime/deformable-detr")

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

outputs = model(**inputs)

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> AutoFeatureExtractor, DeformableDetrModel
<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>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;SenseTime/deformable-detr&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DeformableDetrModel.from_pretrained(<span class="hljs-string">&quot;SenseTime/deformable-detr&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_states.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">300</span>, <span class="hljs-number">256</span>]`}}),{c(){f=r("p"),b=s("Examples:"),g=c(),v(h.$$.fragment)},l(l){f=a(l,"P",{});var _=n(f);b=i(_,"Examples:"),_.forEach(o),g=m(l),x(h.$$.fragment,l)},m(l,_){u(l,f,_),e(f,b),u(l,g,_),w(h,l,_),D=!0},p:Ua,i(l){D||(T(h.$$.fragment,l),D=!0)},o(l){y(h.$$.fragment,l),D=!1},d(l){l&&o(f),l&&o(g),$(h,l)}}}function Yn(z){let f,b,g,h,D;return{c(){f=r("p"),b=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r("code"),h=s("Module"),D=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){f=a(l,"P",{});var _=n(f);b=i(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a(_,"CODE",{});var O=n(g);h=i(O,"Module"),O.forEach(o),D=i(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(o)},m(l,_){u(l,f,_),e(f,b),e(f,g),e(g,h),e(f,D)},d(l){l&&o(f)}}}function Kn(z){let f,b,g,h,D;return h=new Ba({props:{code:`from transformers import AutoFeatureExtractor, DeformableDetrForObjectDetection
from PIL import Image
import requests

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

feature_extractor = AutoFeatureExtractor.from_pretrained("SenseTime/deformable-detr")
model = DeformableDetrForObjectDetection.from_pretrained("SenseTime/deformable-detr")

inputs = feature_extractor(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 = feature_extractor.post_process(outputs, 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()]
    # let's only keep detections with score > 0.5
    if score > 0.5:
        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> AutoFeatureExtractor, DeformableDetrForObjectDetection
<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>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;SenseTime/deformable-detr&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DeformableDetrForObjectDetection.from_pretrained(<span class="hljs-string">&quot;SenseTime/deformable-detr&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(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 = feature_extractor.post_process(outputs, target_sizes=target_sizes)[<span class="hljs-number">0</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-comment"># let&#x27;s only keep detections with score &gt; 0.5</span>
<span class="hljs-meta">... </span>    <span class="hljs-keyword">if</span> score &gt; <span class="hljs-number">0.5</span>:
<span class="hljs-meta">... </span>        <span class="hljs-built_in">print</span>(
<span class="hljs-meta">... </span>            <span class="hljs-string">f&quot;Detected <span class="hljs-subst">{model.config.id2label[label.item()]}</span> with confidence &quot;</span>
<span class="hljs-meta">... </span>            <span class="hljs-string">f&quot;<span class="hljs-subst">{<span class="hljs-built_in">round</span>(score.item(), <span class="hljs-number">3</span>)}</span> at location <span class="hljs-subst">{box}</span>&quot;</span>
<span class="hljs-meta">... </span>        )
Detected cat <span class="hljs-keyword">with</span> confidence <span class="hljs-number">0.8</span> at location [<span class="hljs-number">16.5</span>, <span class="hljs-number">52.84</span>, <span class="hljs-number">318.25</span>, <span class="hljs-number">470.78</span>]
Detected cat <span class="hljs-keyword">with</span> confidence <span class="hljs-number">0.789</span> at location [<span class="hljs-number">342.19</span>, <span class="hljs-number">24.3</span>, <span class="hljs-number">640.02</span>, <span class="hljs-number">372.25</span>]
Detected remote <span class="hljs-keyword">with</span> confidence <span class="hljs-number">0.633</span> at location [<span class="hljs-number">40.79</span>, <span class="hljs-number">72.78</span>, <span class="hljs-number">176.76</span>, <span class="hljs-number">117.25</span>]`}}),{c(){f=r("p"),b=s("Examples:"),g=c(),v(h.$$.fragment)},l(l){f=a(l,"P",{});var _=n(f);b=i(_,"Examples:"),_.forEach(o),g=m(l),x(h.$$.fragment,l)},m(l,_){u(l,f,_),e(f,b),u(l,g,_),w(h,l,_),D=!0},p:Ua,i(l){D||(T(h.$$.fragment,l),D=!0)},o(l){y(h.$$.fragment,l),D=!1},d(l){l&&o(f),l&&o(g),$(h,l)}}}function Qn(z){let f,b,g,h,D,l,_,O,Po,Gt,S,Y,yt,be,Oo,$t,Mo,Jt,I,Io,De,Ao,Lo,Qe,No,Ro,Zt,et,So,Yt,tt,Et,Wo,Kt,ot,Ho,Qt,K,ve,Uo,rt,Bo,Vo,Xo,W,Go,at,Jo,Zo,xe,Yo,Ko,eo,Q,Va,to,ee,Qo,nt,er,tr,oo,A,or,we,rr,ar,Te,nr,sr,ro,H,te,Ft,ye,ir,kt,lr,ao,E,$e,dr,jt,cr,mr,Ee,fr,st,pr,hr,ur,L,Fe,gr,zt,_r,br,oe,Dr,re,ke,vr,je,xr,qt,wr,Tr,yr,ae,ze,$r,qe,Er,it,Fr,kr,jr,ne,Ce,zr,Pe,qr,Ct,Cr,Pr,Or,se,Oe,Mr,Me,Ir,Pt,Ar,Lr,no,U,ie,Ot,Ie,Nr,Mt,Rr,so,q,Ae,Sr,B,Wr,lt,Hr,Ur,Le,Br,Vr,Xr,V,Gr,dt,Jr,Zr,ct,Yr,Kr,Qr,le,io,X,de,It,Ne,ea,At,ta,lo,k,Re,oa,Lt,ra,aa,Se,na,mt,sa,ia,la,We,da,He,ca,ma,fa,C,Ue,pa,G,ha,ft,ua,ga,Nt,_a,ba,Da,ce,va,me,co,J,fe,Rt,Be,xa,St,wa,mo,j,Ve,Ta,Wt,ya,$a,Xe,Ea,pt,Fa,ka,ja,Ge,za,Je,qa,Ca,Pa,P,Ze,Oa,Z,Ma,ht,Ia,Aa,Ht,La,Na,Ra,pe,Sa,he,fo;return l=new Tt({}),be=new Tt({}),ye=new Tt({}),$e=new M({props:{name:"class transformers.DeformableDetrFeatureExtractor",anchor:"transformers.DeformableDetrFeatureExtractor",parameters:[{name:"format",val:" = 'coco_detection'"},{name:"do_resize",val:" = True"},{name:"size",val:" = 800"},{name:"max_size",val:" = 1333"},{name:"do_normalize",val:" = True"},{name:"image_mean",val:" = None"},{name:"image_std",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DeformableDetrFeatureExtractor.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.DeformableDetrFeatureExtractor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize the input to a certain <code>size</code>.`,name:"do_resize"},{anchor:"transformers.DeformableDetrFeatureExtractor.size",description:`<strong>size</strong> (<code>int</code>, <em>optional</em>, defaults to 800) &#x2014;
Resize the input to the given size. Only has an effect if <code>do_resize</code> is set to <code>True</code>. If size is a
sequence like <code>(width, height)</code>, output size will be matched to this. If size is an int, smaller edge of
the image will be matched to this number. i.e, if <code>height &gt; width</code>, then image will be rescaled to <code>(size * height / width, size)</code>.`,name:"size"},{anchor:"transformers.DeformableDetrFeatureExtractor.max_size",description:`<strong>max_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1333) &#x2014;
The largest size an image dimension can have (otherwise it&#x2019;s capped). Only has an effect if <code>do_resize</code> is
set to <code>True</code>.`,name:"max_size"},{anchor:"transformers.DeformableDetrFeatureExtractor.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to normalize the input with mean and standard deviation.`,name:"do_normalize"},{anchor:"transformers.DeformableDetrFeatureExtractor.image_mean",description:`<strong>image_mean</strong> (<code>int</code>, <em>optional</em>, defaults to <code>[0.485, 0.456, 0.406]</code>) &#x2014;
The sequence of means for each channel, to be used when normalizing images. Defaults to the ImageNet mean.`,name:"image_mean"},{anchor:"transformers.DeformableDetrFeatureExtractor.image_std",description:`<strong>image_std</strong> (<code>int</code>, <em>optional</em>, defaults to <code>[0.229, 0.224, 0.225]</code>) &#x2014;
The sequence of standard deviations for each channel, to be used when normalizing images. Defaults to the
ImageNet std.`,name:"image_std"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/deformable_detr/feature_extraction_deformable_detr.py#L124"}}),Fe=new M({props:{name:"__call__",anchor:"transformers.DeformableDetrFeatureExtractor.__call__",parameters:[{name:"images",val:": typing.Union[PIL.Image.Image, numpy.ndarray, ForwardRef('torch.Tensor'), typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.List[ForwardRef('torch.Tensor')]]"},{name:"annotations",val:": typing.Union[typing.List[typing.Dict], typing.List[typing.List[typing.Dict]]] = None"},{name:"return_segmentation_masks",val:": typing.Optional[bool] = False"},{name:"masks_path",val:": typing.Optional[pathlib.Path] = None"},{name:"pad_and_return_pixel_mask",val:": typing.Optional[bool] = True"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DeformableDetrFeatureExtractor.__call__.images",description:`<strong>images</strong> (<code>PIL.Image.Image</code>, <code>np.ndarray</code>, <code>torch.Tensor</code>, <code>List[PIL.Image.Image]</code>, <code>List[np.ndarray]</code>, <code>List[torch.Tensor]</code>) &#x2014;
The image or batch of images to be prepared. Each image can be a PIL image, NumPy array or PyTorch
tensor. In case of a NumPy array/PyTorch tensor, each image should be of shape (C, H, W), where C is a
number of channels, H and W are image height and width.`,name:"images"},{anchor:"transformers.DeformableDetrFeatureExtractor.__call__.annotations",description:`<strong>annotations</strong> (<code>Dict</code>, <code>List[Dict]</code>, <em>optional</em>) &#x2014;
The corresponding annotations in COCO format.</p>
<p>In case <a href="/docs/transformers/pr_19907/en/model_doc/detr#transformers.DetrFeatureExtractor">DetrFeatureExtractor</a> was initialized with <code>format = &quot;coco_detection&quot;</code>, the annotations for
each image should have the following format: {&#x2018;image_id&#x2019;: int, &#x2018;annotations&#x2019;: [annotation]}, with the
annotations being a list of COCO object annotations.</p>
<p>In case <a href="/docs/transformers/pr_19907/en/model_doc/detr#transformers.DetrFeatureExtractor">DetrFeatureExtractor</a> was initialized with <code>format = &quot;coco_panoptic&quot;</code>, the annotations for
each image should have the following format: {&#x2018;image_id&#x2019;: int, &#x2018;file_name&#x2019;: str, &#x2018;segments_info&#x2019;:
[segment_info]} with segments_info being a list of COCO panoptic annotations.`,name:"annotations"},{anchor:"transformers.DeformableDetrFeatureExtractor.__call__.return_segmentation_masks",description:`<strong>return_segmentation_masks</strong> (<code>Dict</code>, <code>List[Dict]</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to also include instance segmentation masks as part of the labels in case <code>format = &quot;coco_detection&quot;</code>.`,name:"return_segmentation_masks"},{anchor:"transformers.DeformableDetrFeatureExtractor.__call__.masks_path",description:`<strong>masks_path</strong> (<code>pathlib.Path</code>, <em>optional</em>) &#x2014;
Path to the directory containing the PNG files that store the class-agnostic image segmentations. Only
relevant in case <a href="/docs/transformers/pr_19907/en/model_doc/detr#transformers.DetrFeatureExtractor">DetrFeatureExtractor</a> was initialized with <code>format = &quot;coco_panoptic&quot;</code>.`,name:"masks_path"},{anchor:"transformers.DeformableDetrFeatureExtractor.__call__.pad_and_return_pixel_mask",description:`<strong>pad_and_return_pixel_mask</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to pad images up to the largest image in a batch and create a pixel mask.</p>
<p>If left to the default, will return a pixel mask that is:</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>`,name:"pad_and_return_pixel_mask"},{anchor:"transformers.DeformableDetrFeatureExtractor.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/pr_19907/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of NumPy arrays. If set to <code>&apos;pt&apos;</code>, return PyTorch <code>torch.Tensor</code>
objects.`,name:"return_tensors"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/deformable_detr/feature_extraction_deformable_detr.py#L412",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/en/main_classes/feature_extractor#transformers.BatchFeature"
>BatchFeature</a> with the following fields:</p>
<ul>
<li><strong>pixel_values</strong> \u2014 Pixel values to be fed to a model.</li>
<li><strong>pixel_mask</strong> \u2014 Pixel mask to be fed to a model (when <code>pad_and_return_pixel_mask=True</code> or if
<em>\u201Cpixel_mask\u201D</em> is in <code>self.model_input_names</code>).</li>
<li><strong>labels</strong> \u2014 Optional labels to be fed to a model (when <code>annotations</code> are provided)</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_19907/en/main_classes/feature_extractor#transformers.BatchFeature"
>BatchFeature</a></p>
`}}),oe=new Wa({props:{warning:!0,$$slots:{default:[Xn]},$$scope:{ctx:z}}}),ke=new M({props:{name:"pad_and_create_pixel_mask",anchor:"transformers.DeformableDetrFeatureExtractor.pad_and_create_pixel_mask",parameters:[{name:"pixel_values_list",val:": typing.List[ForwardRef('torch.Tensor')]"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"}],parametersDescription:[{anchor:"transformers.DeformableDetrFeatureExtractor.pad_and_create_pixel_mask.pixel_values_list",description:`<strong>pixel_values_list</strong> (<code>List[torch.Tensor]</code>) &#x2014;
List of images (pixel values) to be padded. Each image should be a tensor of shape (C, H, W).`,name:"pixel_values_list"},{anchor:"transformers.DeformableDetrFeatureExtractor.pad_and_create_pixel_mask.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/pr_19907/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of NumPy arrays. If set to <code>&apos;pt&apos;</code>, return PyTorch <code>torch.Tensor</code>
objects.`,name:"return_tensors"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/deformable_detr/feature_extraction_deformable_detr.py#L652",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/en/main_classes/feature_extractor#transformers.BatchFeature"
>BatchFeature</a> with the following fields:</p>
<ul>
<li><strong>pixel_values</strong> \u2014 Pixel values to be fed to a model.</li>
<li><strong>pixel_mask</strong> \u2014 Pixel mask to be fed to a model (when <code>pad_and_return_pixel_mask=True</code> or if
<em>\u201Cpixel_mask\u201D</em> is in <code>self.model_input_names</code>).</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_19907/en/main_classes/feature_extractor#transformers.BatchFeature"
>BatchFeature</a></p>
`}}),ze=new M({props:{name:"post_process",anchor:"transformers.DeformableDetrFeatureExtractor.post_process",parameters:[{name:"outputs",val:""},{name:"target_sizes",val:""}],parametersDescription:[{anchor:"transformers.DeformableDetrFeatureExtractor.post_process.outputs",description:`<strong>outputs</strong> (<code>DeformableDetrObjectDetectionOutput</code>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.DeformableDetrFeatureExtractor.post_process.target_sizes",description:`<strong>target_sizes</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, 2)</code>) &#x2014;
Tensor containing the size (height, width) of each image of the batch. For evaluation, this must be the
original image size (before any data augmentation). For visualization, this should be the image size
after data augment, but before padding.`,name:"target_sizes"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/deformable_detr/feature_extraction_deformable_detr.py#L694",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>
`}}),Ce=new M({props:{name:"post_process_segmentation",anchor:"transformers.DeformableDetrFeatureExtractor.post_process_segmentation",parameters:[{name:"outputs",val:""},{name:"target_sizes",val:""},{name:"threshold",val:" = 0.9"},{name:"mask_threshold",val:" = 0.5"}],parametersDescription:[{anchor:"transformers.DeformableDetrFeatureExtractor.post_process_segmentation.outputs",description:`<strong>outputs</strong> (<code>DeformableDetrSegmentationOutput</code>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.DeformableDetrFeatureExtractor.post_process_segmentation.target_sizes",description:`<strong>target_sizes</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, 2)</code> or <code>List[Tuple]</code> of length <code>batch_size</code>) &#x2014;
Torch Tensor (or list) corresponding to the requested final size (h, w) of each prediction.`,name:"target_sizes"},{anchor:"transformers.DeformableDetrFeatureExtractor.post_process_segmentation.threshold",description:`<strong>threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.9) &#x2014;
Threshold to use to filter out queries.`,name:"threshold"},{anchor:"transformers.DeformableDetrFeatureExtractor.post_process_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"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/deformable_detr/feature_extraction_deformable_detr.py#L735",returnDescription:`
<p>A list of dictionaries, each dictionary containing the scores, labels, and masks for an image
in the batch as predicted by the model.</p>
`,returnType:`
<p><code>List[Dict]</code></p>
`}}),Oe=new M({props:{name:"post_process_panoptic",anchor:"transformers.DeformableDetrFeatureExtractor.post_process_panoptic",parameters:[{name:"outputs",val:""},{name:"processed_sizes",val:""},{name:"target_sizes",val:" = None"},{name:"is_thing_map",val:" = None"},{name:"threshold",val:" = 0.85"}],parametersDescription:[{anchor:"transformers.DeformableDetrFeatureExtractor.post_process_panoptic.outputs",description:`<strong>outputs</strong> (<code>DeformableDetrSegmentationOutput</code>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.DeformableDetrFeatureExtractor.post_process_panoptic.processed_sizes",description:`<strong>processed_sizes</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, 2)</code> or <code>List[Tuple]</code> of length <code>batch_size</code>) &#x2014;
Torch Tensor (or list) containing the size (h, w) of each image of the batch, i.e. the size after data
augmentation but before batching.`,name:"processed_sizes"},{anchor:"transformers.DeformableDetrFeatureExtractor.post_process_panoptic.target_sizes",description:`<strong>target_sizes</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, 2)</code> or <code>List[Tuple]</code> of length <code>batch_size</code>, <em>optional</em>) &#x2014;
Torch Tensor (or list) corresponding to the requested final size (h, w) of each prediction. If left to
None, it will default to the <code>processed_sizes</code>.`,name:"target_sizes"},{anchor:"transformers.DeformableDetrFeatureExtractor.post_process_panoptic.is_thing_map",description:`<strong>is_thing_map</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, 2)</code>, <em>optional</em>) &#x2014;
Dictionary mapping class indices to either True or False, depending on whether or not they are a thing.
If not set, defaults to the <code>is_thing_map</code> of COCO panoptic.`,name:"is_thing_map"},{anchor:"transformers.DeformableDetrFeatureExtractor.post_process_panoptic.threshold",description:`<strong>threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.85) &#x2014;
Threshold to use to filter out queries.`,name:"threshold"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/deformable_detr/feature_extraction_deformable_detr.py#L832",returnDescription:`
<p>A list of dictionaries, each dictionary containing a PNG string and segments_info values for
an image in the batch as predicted by the model.</p>
`,returnType:`
<p><code>List[Dict]</code></p>
`}}),Ie=new Tt({}),Ae=new M({props:{name:"class transformers.DeformableDetrConfig",anchor:"transformers.DeformableDetrConfig",parameters:[{name:"num_queries",val:" = 300"},{name:"max_position_embeddings",val:" = 1024"},{name:"encoder_layers",val:" = 6"},{name:"encoder_ffn_dim",val:" = 1024"},{name:"encoder_attention_heads",val:" = 8"},{name:"decoder_layers",val:" = 6"},{name:"decoder_ffn_dim",val:" = 1024"},{name:"decoder_attention_heads",val:" = 8"},{name:"encoder_layerdrop",val:" = 0.0"},{name:"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:"return_intermediate",val:" = True"},{name:"auxiliary_loss",val:" = False"},{name:"position_embedding_type",val:" = 'sine'"},{name:"backbone",val:" = 'resnet50'"},{name:"dilation",val:" = False"},{name:"num_feature_levels",val:" = 4"},{name:"encoder_n_points",val:" = 4"},{name:"decoder_n_points",val:" = 4"},{name:"two_stage",val:" = False"},{name:"two_stage_num_proposals",val:" = 300"},{name:"with_box_refine",val:" = False"},{name:"class_cost",val:" = 1"},{name:"bbox_cost",val:" = 5"},{name:"giou_cost",val:" = 2"},{name:"mask_loss_coefficient",val:" = 1"},{name:"dice_loss_coefficient",val:" = 1"},{name:"bbox_loss_coefficient",val:" = 5"},{name:"giou_loss_coefficient",val:" = 2"},{name:"eos_coefficient",val:" = 0.1"},{name:"focal_alpha",val:" = 0.25"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DeformableDetrConfig.num_queries",description:`<strong>num_queries</strong> (<code>int</code>, <em>optional</em>, defaults to 300) &#x2014;
Number of object queries, i.e. detection slots. This is the maximal number of objects
<a href="/docs/transformers/pr_19907/en/model_doc/deformable_detr#transformers.DeformableDetrModel">DeformableDetrModel</a> can detect in a single image. In case <code>two_stage</code> is set to <code>True</code>, we use
<code>two_stage_num_proposals</code> instead.`,name:"num_queries"},{anchor:"transformers.DeformableDetrConfig.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.DeformableDetrConfig.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.DeformableDetrConfig.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.DeformableDetrConfig.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.DeformableDetrConfig.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.DeformableDetrConfig.decoder_ffn_dim",description:`<strong>decoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
Dimension of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in decoder.`,name:"decoder_ffn_dim"},{anchor:"transformers.DeformableDetrConfig.encoder_ffn_dim",description:`<strong>encoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
Dimension of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in decoder.`,name:"encoder_ffn_dim"},{anchor:"transformers.DeformableDetrConfig.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.DeformableDetrConfig.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.DeformableDetrConfig.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.DeformableDetrConfig.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.DeformableDetrConfig.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.DeformableDetrConfig.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.
encoder_layerdrop &#x2014; (<code>float</code>, <em>optional</em>, defaults to 0.0):
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.
decoder_layerdrop &#x2014; (<code>float</code>, <em>optional</em>, defaults to 0.0):
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:"init_xavier_std"},{anchor:"transformers.DeformableDetrConfig.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.DeformableDetrConfig.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.DeformableDetrConfig.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. 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.DeformableDetrConfig.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).`,name:"dilation"},{anchor:"transformers.DeformableDetrConfig.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.DeformableDetrConfig.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.DeformableDetrConfig.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.DeformableDetrConfig.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.DeformableDetrConfig.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.DeformableDetrConfig.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.DeformableDetrConfig.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.DeformableDetrConfig.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.DeformableDetrConfig.num_feature_levels",description:`<strong>num_feature_levels</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
The number of input feature levels.`,name:"num_feature_levels"},{anchor:"transformers.DeformableDetrConfig.encoder_n_points",description:`<strong>encoder_n_points</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
The number of sampled keys in each feature level for each attention head in the encoder.`,name:"encoder_n_points"},{anchor:"transformers.DeformableDetrConfig.decoder_n_points",description:`<strong>decoder_n_points</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
The number of sampled keys in each feature level for each attention head in the decoder.`,name:"decoder_n_points"},{anchor:"transformers.DeformableDetrConfig.two_stage",description:`<strong>two_stage</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to apply a two-stage deformable DETR, where the region proposals are also generated by a variant of
Deformable DETR, which are further fed into the decoder for iterative bounding box refinement.`,name:"two_stage"},{anchor:"transformers.DeformableDetrConfig.two_stage_num_proposals",description:`<strong>two_stage_num_proposals</strong> (<code>int</code>, <em>optional</em>, defaults to 300) &#x2014;
The number of region proposals to be generated, in case <code>two_stage</code> is set to <code>True</code>.`,name:"two_stage_num_proposals"},{anchor:"transformers.DeformableDetrConfig.with_box_refine",description:`<strong>with_box_refine</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to apply iterative bounding box refinement, where each decoder layer refines the bounding boxes
based on the predictions from the previous layer.`,name:"with_box_refine"},{anchor:"transformers.DeformableDetrConfig.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/vr_19907/src/transformers/models/deformable_detr/configuration_deformable_detr.py#L29"}}),le=new Ha({props:{anchor:"transformers.DeformableDetrConfig.example",$$slots:{default:[Gn]},$$scope:{ctx:z}}}),Ne=new Tt({}),Re=new M({props:{name:"class transformers.DeformableDetrModel",anchor:"transformers.DeformableDetrModel",parameters:[{name:"config",val:": DeformableDetrConfig"}],parametersDescription:[{anchor:"transformers.DeformableDetrModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_19907/en/model_doc/deformable_detr#transformers.DeformableDetrConfig">DeformableDetrConfig</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/pr_19907/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/vr_19907/src/transformers/models/deformable_detr/modeling_deformable_detr.py#L1431"}}),Ue=new M({props:{name:"forward",anchor:"transformers.DeformableDetrModel.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.DeformableDetrModel.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/pr_19907/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a>. See <code>AutoFeatureExtractor.__call__()</code> for
details.`,name:"pixel_values"},{anchor:"transformers.DeformableDetrModel.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.DeformableDetrModel.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.DeformableDetrModel.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.DeformableDetrModel.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.DeformableDetrModel.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.DeformableDetrModel.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.DeformableDetrModel.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.DeformableDetrModel.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/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/deformable_detr/modeling_deformable_detr.py#L1579",returnDescription:`
<p>A <code>transformers.models.deformable_detr.modeling_deformable_detr.DeformableDetrModelOutput</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/pr_19907/en/model_doc/deformable_detr#transformers.DeformableDetrConfig"
>DeformableDetrConfig</a>) and inputs.</p>
<ul>
<li><strong>init_reference_points</strong> (<code>torch.FloatTensor</code> of shape  <code>(batch_size, num_queries, 4)</code>) \u2014 Initial reference points sent through the Transformer decoder.</li>
<li><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_queries, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the decoder of the model.</li>
<li><strong>intermediate_hidden_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.decoder_layers, num_queries, hidden_size)</code>) \u2014 Stacked intermediate hidden states (output of each layer of the decoder).</li>
<li><strong>intermediate_reference_points</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.decoder_layers, num_queries, 4)</code>) \u2014 Stacked intermediate reference points (reference points of each layer of the decoder).</li>
<li><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, num_queries, hidden_size)</code>. Hidden-states of the decoder at the output of each layer
plus the initial embedding outputs.</li>
<li><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, num_queries, num_queries)</code>. Attentions weights of the decoder, after the attention softmax, used to compute the weighted
average in the self-attention heads.</li>
<li><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_queries, num_heads, 4, 4)</code>.
Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</li>
<li><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</li>
<li><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of the encoder at the output of each
layer plus the initial embedding outputs.</li>
<li><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_queries, num_heads, 4, 4)</code>.
Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</li>
<li><strong>enc_outputs_class</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>, <em>optional</em>, returned when <code>config.with_box_refine=True</code> and <code>config.two_stage=True</code>) \u2014 Predicted bounding boxes scores where the top <code>config.two_stage_num_proposals</code> scoring bounding boxes are
picked as region proposals in the first stage. Output of bounding box binary classification (i.e.
foreground and background).</li>
<li><strong>enc_outputs_coord_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, 4)</code>, <em>optional</em>, returned when <code>config.with_box_refine=True</code> and <code>config.two_stage=True</code>) \u2014 Logits of predicted bounding boxes coordinates in the first stage.</li>
</ul>
`,returnType:`
<p><code>transformers.models.deformable_detr.modeling_deformable_detr.DeformableDetrModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ce=new Wa({props:{$$slots:{default:[Jn]},$$scope:{ctx:z}}}),me=new Ha({props:{anchor:"transformers.DeformableDetrModel.forward.example",$$slots:{default:[Zn]},$$scope:{ctx:z}}}),Be=new Tt({}),Ve=new M({props:{name:"class transformers.DeformableDetrForObjectDetection",anchor:"transformers.DeformableDetrForObjectDetection",parameters:[{name:"config",val:": DeformableDetrConfig"}],parametersDescription:[{anchor:"transformers.DeformableDetrForObjectDetection.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_19907/en/model_doc/deformable_detr#transformers.DeformableDetrConfig">DeformableDetrConfig</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/pr_19907/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/vr_19907/src/transformers/models/deformable_detr/modeling_deformable_detr.py#L1790"}}),Ze=new M({props:{name:"forward",anchor:"transformers.DeformableDetrForObjectDetection.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.DeformableDetrForObjectDetection.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/pr_19907/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a>. See <code>AutoFeatureExtractor.__call__()</code> for
details.`,name:"pixel_values"},{anchor:"transformers.DeformableDetrForObjectDetection.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.DeformableDetrForObjectDetection.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.DeformableDetrForObjectDetection.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.DeformableDetrForObjectDetection.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.DeformableDetrForObjectDetection.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.DeformableDetrForObjectDetection.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.DeformableDetrForObjectDetection.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.DeformableDetrForObjectDetection.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/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.DeformableDetrForObjectDetection.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/vr_19907/src/transformers/models/deformable_detr/modeling_deformable_detr.py#L1839",returnDescription:`
<p>A <code>transformers.models.deformable_detr.modeling_deformable_detr.DeformableDetrObjectDetectionOutput</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/pr_19907/en/model_doc/deformable_detr#transformers.DeformableDetrConfig"
>DeformableDetrConfig</a>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> are provided)) \u2014 Total loss as a linear combination of a negative log-likehood (cross-entropy) for class prediction and a
bounding box loss. The latter is defined as a linear combination of the L1 loss and the generalized
scale-invariant IoU loss.</li>
<li><strong>loss_dict</strong> (<code>Dict</code>, <em>optional</em>) \u2014 A dictionary containing the individual losses. Useful for logging.</li>
<li><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_queries, num_classes + 1)</code>) \u2014 Classification logits (including no-object) for all queries.</li>
<li><strong>pred_boxes</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_queries, 4)</code>) \u2014 Normalized boxes coordinates for all queries, represented as (center_x, center_y, width, height). These
values are normalized in [0, 1], relative to the size of each individual image in the batch (disregarding
possible padding). You can use <code>~AutoFeatureExtractor.post_process</code> to retrieve the unnormalized bounding
boxes.</li>
<li><strong>auxiliary_outputs</strong> (<code>list[Dict]</code>, <em>optional</em>) \u2014 Optional, only returned when auxilary losses are activated (i.e. <code>config.auxiliary_loss</code> is set to <code>True</code>)
and labels are provided. It is a list of dictionaries containing the two above keys (<code>logits</code> and
<code>pred_boxes</code>) for each decoder layer.</li>
<li><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_queries, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the decoder of the model.</li>
<li><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, num_queries, hidden_size)</code>. Hidden-states of the decoder at the output of each layer
plus the initial embedding outputs.</li>
<li><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, num_queries, num_queries)</code>. Attentions weights of the decoder, after the attention softmax, used to compute the weighted
average in the self-attention heads.</li>
<li><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_queries, num_heads, 4, 4)</code>.
Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</li>
<li><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</li>
<li><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of the encoder at the output of each
layer plus the initial embedding outputs.</li>
<li><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, sequence_length, num_heads, 4, 4)</code>. Attentions weights of the encoder, after the attention softmax, used to compute the weighted average
in the self-attention heads.</li>
<li><strong>intermediate_hidden_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.decoder_layers, num_queries, hidden_size)</code>) \u2014 Stacked intermediate hidden states (output of each layer of the decoder).</li>
<li><strong>intermediate_reference_points</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.decoder_layers, num_queries, 4)</code>) \u2014 Stacked intermediate reference points (reference points of each layer of the decoder).</li>
<li><strong>init_reference_points</strong> (<code>torch.FloatTensor</code> of shape  <code>(batch_size, num_queries, 4)</code>) \u2014 Initial reference points sent through the Transformer decoder.</li>
<li><strong>enc_outputs_class</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>, <em>optional</em>, returned when <code>config.with_box_refine=True</code> and <code>config.two_stage=True</code>) \u2014 Predicted bounding boxes scores where the top <code>config.two_stage_num_proposals</code> scoring bounding boxes are
picked as region proposals in the first stage. Output of bounding box binary classification (i.e.
foreground and background).</li>
<li><strong>enc_outputs_coord_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, 4)</code>, <em>optional</em>, returned when <code>config.with_box_refine=True</code> and <code>config.two_stage=True</code>) \u2014 Logits of predicted bounding boxes coordinates in the first stage.</li>
</ul>
`,returnType:`
<p><code>transformers.models.deformable_detr.modeling_deformable_detr.DeformableDetrObjectDetectionOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),pe=new Wa({props:{$$slots:{default:[Yn]},$$scope:{ctx:z}}}),he=new Ha({props:{anchor:"transformers.DeformableDetrForObjectDetection.forward.example",$$slots:{default:[Kn]},$$scope:{ctx:z}}}),{c(){f=r("meta"),b=c(),g=r("h1"),h=r("a"),D=r("span"),v(l.$$.fragment),_=c(),O=r("span"),Po=s("Deformable DETR"),Gt=c(),S=r("h2"),Y=r("a"),yt=r("span"),v(be.$$.fragment),Oo=c(),$t=r("span"),Mo=s("Overview"),Jt=c(),I=r("p"),Io=s("The Deformable DETR model was proposed in "),De=r("a"),Ao=s("Deformable DETR: Deformable Transformers for End-to-End Object Detection"),Lo=s(` by Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, Jifeng Dai.
Deformable DETR mitigates the slow convergence issues and limited feature spatial resolution of the original `),Qe=r("a"),No=s("DETR"),Ro=s(" by leveraging a new deformable attention module which only attends to a small set of key sampling points around a reference."),Zt=c(),et=r("p"),So=s("The abstract from the paper is the following:"),Yt=c(),tt=r("p"),Et=r("em"),Wo=s("DETR has been recently proposed to eliminate the need for many hand-designed components in object detection while demonstrating good performance. However, it suffers from slow convergence and limited feature spatial resolution, due to the limitation of Transformer attention modules in processing image feature maps. To mitigate these issues, we proposed Deformable DETR, whose attention modules only attend to a small set of key sampling points around a reference. Deformable DETR can achieve better performance than DETR (especially on small objects) with 10 times less training epochs. Extensive experiments on the COCO benchmark demonstrate the effectiveness of our approach."),Kt=c(),ot=r("p"),Ho=s("Tips:"),Qt=c(),K=r("ul"),ve=r("li"),Uo=s("One can use "),rt=r("a"),Bo=s("DeformableDetrFeatureExtractor"),Vo=s(" to prepare images (and optional targets) for the model."),Xo=c(),W=r("li"),Go=s("Training Deformable DETR is equivalent to training the original "),at=r("a"),Jo=s("DETR"),Zo=s(" model. Demo notebooks can be found "),xe=r("a"),Yo=s("here"),Ko=s("."),eo=c(),Q=r("img"),to=c(),ee=r("small"),Qo=s("Deformable DETR architecture. Taken from the "),nt=r("a"),er=s("original paper"),tr=s("."),oo=c(),A=r("p"),or=s("This model was contributed by "),we=r("a"),rr=s("nielsr"),ar=s(". The original code can be found "),Te=r("a"),nr=s("here"),sr=s("."),ro=c(),H=r("h2"),te=r("a"),Ft=r("span"),v(ye.$$.fragment),ir=c(),kt=r("span"),lr=s("DeformableDetrFeatureExtractor"),ao=c(),E=r("div"),v($e.$$.fragment),dr=c(),jt=r("p"),cr=s(`Constructs a Deformable DETR feature extractor. Differs only in the postprocessing of object detection compared to
DETR.`),mr=c(),Ee=r("p"),fr=s("This feature extractor inherits from "),st=r("a"),pr=s("FeatureExtractionMixin"),hr=s(` which contains most of the main methods. Users
should refer to this superclass for more information regarding those methods.`),ur=c(),L=r("div"),v(Fe.$$.fragment),gr=c(),zt=r("p"),_r=s(`Main method to prepare for the model one or several image(s) and optional annotations. Images are by default
padded up to the largest image in a batch, and a pixel mask is created that indicates which pixels are
real/which are padding.`),br=c(),v(oe.$$.fragment),Dr=c(),re=r("div"),v(ke.$$.fragment),vr=c(),je=r("p"),xr=s("Pad images up to the largest image in a batch and create a corresponding "),qt=r("code"),wr=s("pixel_mask"),Tr=s("."),yr=c(),ae=r("div"),v(ze.$$.fragment),$r=c(),qe=r("p"),Er=s("Converts the output of "),it=r("a"),Fr=s("DeformableDetrForObjectDetection"),kr=s(` into the format expected by the COCO api. Only
supports PyTorch.`),jr=c(),ne=r("div"),v(Ce.$$.fragment),zr=c(),Pe=r("p"),qr=s("Converts the output of "),Ct=r("code"),Cr=s("DeformableDetrForSegmentation"),Pr=s(` into image segmentation predictions. Only supports
PyTorch.`),Or=c(),se=r("div"),v(Oe.$$.fragment),Mr=c(),Me=r("p"),Ir=s("Converts the output of "),Pt=r("code"),Ar=s("DeformableDetrForSegmentation"),Lr=s(` into actual panoptic predictions. Only supports
PyTorch.`),no=c(),U=r("h2"),ie=r("a"),Ot=r("span"),v(Ie.$$.fragment),Nr=c(),Mt=r("span"),Rr=s("DeformableDetrConfig"),so=c(),q=r("div"),v(Ae.$$.fragment),Sr=c(),B=r("p"),Wr=s("This is the configuration class to store the configuration of a "),lt=r("a"),Hr=s("DeformableDetrModel"),Ur=s(`. It is used to instantiate
a Deformable 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 Deformable DETR
`),Le=r("a"),Br=s("SenseTime/deformable-detr"),Vr=s(" architecture."),Xr=c(),V=r("p"),Gr=s("Configuration objects inherit from "),dt=r("a"),Jr=s("PretrainedConfig"),Zr=s(` and can be used to control the model outputs. Read the
documentation from `),ct=r("a"),Yr=s("PretrainedConfig"),Kr=s(" for more information."),Qr=c(),v(le.$$.fragment),io=c(),X=r("h2"),de=r("a"),It=r("span"),v(Ne.$$.fragment),ea=c(),At=r("span"),ta=s("DeformableDetrModel"),lo=c(),k=r("div"),v(Re.$$.fragment),oa=c(),Lt=r("p"),ra=s(`The bare Deformable DETR Model (consisting of a backbone and encoder-decoder Transformer) outputting raw
hidden-states without any specific head on top.`),aa=c(),Se=r("p"),na=s("This model inherits from "),mt=r("a"),sa=s("PreTrainedModel"),ia=s(`. 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=c(),We=r("p"),da=s("This model is also a PyTorch "),He=r("a"),ca=s("torch.nn.Module"),ma=s(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),fa=c(),C=r("div"),v(Ue.$$.fragment),pa=c(),G=r("p"),ha=s("The "),ft=r("a"),ua=s("DeformableDetrModel"),ga=s(" forward method, overrides the "),Nt=r("code"),_a=s("__call__"),ba=s(" special method."),Da=c(),v(ce.$$.fragment),va=c(),v(me.$$.fragment),co=c(),J=r("h2"),fe=r("a"),Rt=r("span"),v(Be.$$.fragment),xa=c(),St=r("span"),wa=s("DeformableDetrForObjectDetection"),mo=c(),j=r("div"),v(Ve.$$.fragment),Ta=c(),Wt=r("p"),ya=s(`Deformable DETR Model (consisting of a backbone and encoder-decoder Transformer) with object detection heads on
top, for tasks such as COCO detection.`),$a=c(),Xe=r("p"),Ea=s("This model inherits from "),pt=r("a"),Fa=s("PreTrainedModel"),ka=s(`. 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.)`),ja=c(),Ge=r("p"),za=s("This model is also a PyTorch "),Je=r("a"),qa=s("torch.nn.Module"),Ca=s(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Pa=c(),P=r("div"),v(Ze.$$.fragment),Oa=c(),Z=r("p"),Ma=s("The "),ht=r("a"),Ia=s("DeformableDetrForObjectDetection"),Aa=s(" forward method, overrides the "),Ht=r("code"),La=s("__call__"),Na=s(" special method."),Ra=c(),v(pe.$$.fragment),Sa=c(),v(he.$$.fragment),this.h()},l(t){const p=Un('[data-svelte="svelte-1phssyn"]',document.head);f=a(p,"META",{name:!0,content:!0}),p.forEach(o),b=m(t),g=a(t,"H1",{class:!0});var Ye=n(g);h=a(Ye,"A",{id:!0,class:!0,href:!0});var Ut=n(h);D=a(Ut,"SPAN",{});var Bt=n(D);x(l.$$.fragment,Bt),Bt.forEach(o),Ut.forEach(o),_=m(Ye),O=a(Ye,"SPAN",{});var Vt=n(O);Po=i(Vt,"Deformable DETR"),Vt.forEach(o),Ye.forEach(o),Gt=m(t),S=a(t,"H2",{class:!0});var Ke=n(S);Y=a(Ke,"A",{id:!0,class:!0,href:!0});var Xt=n(Y);yt=a(Xt,"SPAN",{});var Xa=n(yt);x(be.$$.fragment,Xa),Xa.forEach(o),Xt.forEach(o),Oo=m(Ke),$t=a(Ke,"SPAN",{});var Ga=n($t);Mo=i(Ga,"Overview"),Ga.forEach(o),Ke.forEach(o),Jt=m(t),I=a(t,"P",{});var ut=n(I);Io=i(ut,"The Deformable DETR model was proposed in "),De=a(ut,"A",{href:!0,rel:!0});var Ja=n(De);Ao=i(Ja,"Deformable DETR: Deformable Transformers for End-to-End Object Detection"),Ja.forEach(o),Lo=i(ut,` by Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, Jifeng Dai.
Deformable DETR mitigates the slow convergence issues and limited feature spatial resolution of the original `),Qe=a(ut,"A",{href:!0});var Za=n(Qe);No=i(Za,"DETR"),Za.forEach(o),Ro=i(ut," by leveraging a new deformable attention module which only attends to a small set of key sampling points around a reference."),ut.forEach(o),Zt=m(t),et=a(t,"P",{});var Ya=n(et);So=i(Ya,"The abstract from the paper is the following:"),Ya.forEach(o),Yt=m(t),tt=a(t,"P",{});var Ka=n(tt);Et=a(Ka,"EM",{});var Qa=n(Et);Wo=i(Qa,"DETR has been recently proposed to eliminate the need for many hand-designed components in object detection while demonstrating good performance. However, it suffers from slow convergence and limited feature spatial resolution, due to the limitation of Transformer attention modules in processing image feature maps. To mitigate these issues, we proposed Deformable DETR, whose attention modules only attend to a small set of key sampling points around a reference. Deformable DETR can achieve better performance than DETR (especially on small objects) with 10 times less training epochs. Extensive experiments on the COCO benchmark demonstrate the effectiveness of our approach."),Qa.forEach(o),Ka.forEach(o),Kt=m(t),ot=a(t,"P",{});var en=n(ot);Ho=i(en,"Tips:"),en.forEach(o),Qt=m(t),K=a(t,"UL",{});var po=n(K);ve=a(po,"LI",{});var ho=n(ve);Uo=i(ho,"One can use "),rt=a(ho,"A",{href:!0});var tn=n(rt);Bo=i(tn,"DeformableDetrFeatureExtractor"),tn.forEach(o),Vo=i(ho," to prepare images (and optional targets) for the model."),ho.forEach(o),Xo=m(po),W=a(po,"LI",{});var gt=n(W);Go=i(gt,"Training Deformable DETR is equivalent to training the original "),at=a(gt,"A",{href:!0});var on=n(at);Jo=i(on,"DETR"),on.forEach(o),Zo=i(gt," model. Demo notebooks can be found "),xe=a(gt,"A",{href:!0,rel:!0});var rn=n(xe);Yo=i(rn,"here"),rn.forEach(o),Ko=i(gt,"."),gt.forEach(o),po.forEach(o),eo=m(t),Q=a(t,"IMG",{src:!0,alt:!0,width:!0}),to=m(t),ee=a(t,"SMALL",{});var uo=n(ee);Qo=i(uo,"Deformable DETR architecture. Taken from the "),nt=a(uo,"A",{href:!0});var an=n(nt);er=i(an,"original paper"),an.forEach(o),tr=i(uo,"."),uo.forEach(o),oo=m(t),A=a(t,"P",{});var _t=n(A);or=i(_t,"This model was contributed by "),we=a(_t,"A",{href:!0,rel:!0});var nn=n(we);rr=i(nn,"nielsr"),nn.forEach(o),ar=i(_t,". The original code can be found "),Te=a(_t,"A",{href:!0,rel:!0});var sn=n(Te);nr=i(sn,"here"),sn.forEach(o),sr=i(_t,"."),_t.forEach(o),ro=m(t),H=a(t,"H2",{class:!0});var go=n(H);te=a(go,"A",{id:!0,class:!0,href:!0});var ln=n(te);Ft=a(ln,"SPAN",{});var dn=n(Ft);x(ye.$$.fragment,dn),dn.forEach(o),ln.forEach(o),ir=m(go),kt=a(go,"SPAN",{});var cn=n(kt);lr=i(cn,"DeformableDetrFeatureExtractor"),cn.forEach(o),go.forEach(o),ao=m(t),E=a(t,"DIV",{class:!0});var F=n(E);x($e.$$.fragment,F),dr=m(F),jt=a(F,"P",{});var mn=n(jt);cr=i(mn,`Constructs a Deformable DETR feature extractor. Differs only in the postprocessing of object detection compared to
DETR.`),mn.forEach(o),mr=m(F),Ee=a(F,"P",{});var _o=n(Ee);fr=i(_o,"This feature extractor inherits from "),st=a(_o,"A",{href:!0});var fn=n(st);pr=i(fn,"FeatureExtractionMixin"),fn.forEach(o),hr=i(_o,` which contains most of the main methods. Users
should refer to this superclass for more information regarding those methods.`),_o.forEach(o),ur=m(F),L=a(F,"DIV",{class:!0});var bt=n(L);x(Fe.$$.fragment,bt),gr=m(bt),zt=a(bt,"P",{});var pn=n(zt);_r=i(pn,`Main method to prepare for the model one or several image(s) and optional annotations. Images are by default
padded up to the largest image in a batch, and a pixel mask is created that indicates which pixels are
real/which are padding.`),pn.forEach(o),br=m(bt),x(oe.$$.fragment,bt),bt.forEach(o),Dr=m(F),re=a(F,"DIV",{class:!0});var bo=n(re);x(ke.$$.fragment,bo),vr=m(bo),je=a(bo,"P",{});var Do=n(je);xr=i(Do,"Pad images up to the largest image in a batch and create a corresponding "),qt=a(Do,"CODE",{});var hn=n(qt);wr=i(hn,"pixel_mask"),hn.forEach(o),Tr=i(Do,"."),Do.forEach(o),bo.forEach(o),yr=m(F),ae=a(F,"DIV",{class:!0});var vo=n(ae);x(ze.$$.fragment,vo),$r=m(vo),qe=a(vo,"P",{});var xo=n(qe);Er=i(xo,"Converts the output of "),it=a(xo,"A",{href:!0});var un=n(it);Fr=i(un,"DeformableDetrForObjectDetection"),un.forEach(o),kr=i(xo,` into the format expected by the COCO api. Only
supports PyTorch.`),xo.forEach(o),vo.forEach(o),jr=m(F),ne=a(F,"DIV",{class:!0});var wo=n(ne);x(Ce.$$.fragment,wo),zr=m(wo),Pe=a(wo,"P",{});var To=n(Pe);qr=i(To,"Converts the output of "),Ct=a(To,"CODE",{});var gn=n(Ct);Cr=i(gn,"DeformableDetrForSegmentation"),gn.forEach(o),Pr=i(To,` into image segmentation predictions. Only supports
PyTorch.`),To.forEach(o),wo.forEach(o),Or=m(F),se=a(F,"DIV",{class:!0});var yo=n(se);x(Oe.$$.fragment,yo),Mr=m(yo),Me=a(yo,"P",{});var $o=n(Me);Ir=i($o,"Converts the output of "),Pt=a($o,"CODE",{});var _n=n(Pt);Ar=i(_n,"DeformableDetrForSegmentation"),_n.forEach(o),Lr=i($o,` into actual panoptic predictions. Only supports
PyTorch.`),$o.forEach(o),yo.forEach(o),F.forEach(o),no=m(t),U=a(t,"H2",{class:!0});var Eo=n(U);ie=a(Eo,"A",{id:!0,class:!0,href:!0});var bn=n(ie);Ot=a(bn,"SPAN",{});var Dn=n(Ot);x(Ie.$$.fragment,Dn),Dn.forEach(o),bn.forEach(o),Nr=m(Eo),Mt=a(Eo,"SPAN",{});var vn=n(Mt);Rr=i(vn,"DeformableDetrConfig"),vn.forEach(o),Eo.forEach(o),so=m(t),q=a(t,"DIV",{class:!0});var ue=n(q);x(Ae.$$.fragment,ue),Sr=m(ue),B=a(ue,"P",{});var Dt=n(B);Wr=i(Dt,"This is the configuration class to store the configuration of a "),lt=a(Dt,"A",{href:!0});var xn=n(lt);Hr=i(xn,"DeformableDetrModel"),xn.forEach(o),Ur=i(Dt,`. It is used to instantiate
a Deformable 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 Deformable DETR
`),Le=a(Dt,"A",{href:!0,rel:!0});var wn=n(Le);Br=i(wn,"SenseTime/deformable-detr"),wn.forEach(o),Vr=i(Dt," architecture."),Dt.forEach(o),Xr=m(ue),V=a(ue,"P",{});var vt=n(V);Gr=i(vt,"Configuration objects inherit from "),dt=a(vt,"A",{href:!0});var Tn=n(dt);Jr=i(Tn,"PretrainedConfig"),Tn.forEach(o),Zr=i(vt,` and can be used to control the model outputs. Read the
documentation from `),ct=a(vt,"A",{href:!0});var yn=n(ct);Yr=i(yn,"PretrainedConfig"),yn.forEach(o),Kr=i(vt," for more information."),vt.forEach(o),Qr=m(ue),x(le.$$.fragment,ue),ue.forEach(o),io=m(t),X=a(t,"H2",{class:!0});var Fo=n(X);de=a(Fo,"A",{id:!0,class:!0,href:!0});var $n=n(de);It=a($n,"SPAN",{});var En=n(It);x(Ne.$$.fragment,En),En.forEach(o),$n.forEach(o),ea=m(Fo),At=a(Fo,"SPAN",{});var Fn=n(At);ta=i(Fn,"DeformableDetrModel"),Fn.forEach(o),Fo.forEach(o),lo=m(t),k=a(t,"DIV",{class:!0});var N=n(k);x(Re.$$.fragment,N),oa=m(N),Lt=a(N,"P",{});var kn=n(Lt);ra=i(kn,`The bare Deformable DETR Model (consisting of a backbone and encoder-decoder Transformer) outputting raw
hidden-states without any specific head on top.`),kn.forEach(o),aa=m(N),Se=a(N,"P",{});var ko=n(Se);na=i(ko,"This model inherits from "),mt=a(ko,"A",{href:!0});var jn=n(mt);sa=i(jn,"PreTrainedModel"),jn.forEach(o),ia=i(ko,`. 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.)`),ko.forEach(o),la=m(N),We=a(N,"P",{});var jo=n(We);da=i(jo,"This model is also a PyTorch "),He=a(jo,"A",{href:!0,rel:!0});var zn=n(He);ca=i(zn,"torch.nn.Module"),zn.forEach(o),ma=i(jo,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),jo.forEach(o),fa=m(N),C=a(N,"DIV",{class:!0});var ge=n(C);x(Ue.$$.fragment,ge),pa=m(ge),G=a(ge,"P",{});var xt=n(G);ha=i(xt,"The "),ft=a(xt,"A",{href:!0});var qn=n(ft);ua=i(qn,"DeformableDetrModel"),qn.forEach(o),ga=i(xt," forward method, overrides the "),Nt=a(xt,"CODE",{});var Cn=n(Nt);_a=i(Cn,"__call__"),Cn.forEach(o),ba=i(xt," special method."),xt.forEach(o),Da=m(ge),x(ce.$$.fragment,ge),va=m(ge),x(me.$$.fragment,ge),ge.forEach(o),N.forEach(o),co=m(t),J=a(t,"H2",{class:!0});var zo=n(J);fe=a(zo,"A",{id:!0,class:!0,href:!0});var Pn=n(fe);Rt=a(Pn,"SPAN",{});var On=n(Rt);x(Be.$$.fragment,On),On.forEach(o),Pn.forEach(o),xa=m(zo),St=a(zo,"SPAN",{});var Mn=n(St);wa=i(Mn,"DeformableDetrForObjectDetection"),Mn.forEach(o),zo.forEach(o),mo=m(t),j=a(t,"DIV",{class:!0});var R=n(j);x(Ve.$$.fragment,R),Ta=m(R),Wt=a(R,"P",{});var In=n(Wt);ya=i(In,`Deformable DETR Model (consisting of a backbone and encoder-decoder Transformer) with object detection heads on
top, for tasks such as COCO detection.`),In.forEach(o),$a=m(R),Xe=a(R,"P",{});var qo=n(Xe);Ea=i(qo,"This model inherits from "),pt=a(qo,"A",{href:!0});var An=n(pt);Fa=i(An,"PreTrainedModel"),An.forEach(o),ka=i(qo,`. 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.)`),qo.forEach(o),ja=m(R),Ge=a(R,"P",{});var Co=n(Ge);za=i(Co,"This model is also a PyTorch "),Je=a(Co,"A",{href:!0,rel:!0});var Ln=n(Je);qa=i(Ln,"torch.nn.Module"),Ln.forEach(o),Ca=i(Co,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Co.forEach(o),Pa=m(R),P=a(R,"DIV",{class:!0});var _e=n(P);x(Ze.$$.fragment,_e),Oa=m(_e),Z=a(_e,"P",{});var wt=n(Z);Ma=i(wt,"The "),ht=a(wt,"A",{href:!0});var Nn=n(ht);Ia=i(Nn,"DeformableDetrForObjectDetection"),Nn.forEach(o),Aa=i(wt," forward method, overrides the "),Ht=a(wt,"CODE",{});var Rn=n(Ht);La=i(Rn,"__call__"),Rn.forEach(o),Na=i(wt," special method."),wt.forEach(o),Ra=m(_e),x(pe.$$.fragment,_e),Sa=m(_e),x(he.$$.fragment,_e),_e.forEach(o),R.forEach(o),this.h()},h(){d(f,"name","hf:doc:metadata"),d(f,"content",JSON.stringify(es)),d(h,"id","deformable-detr"),d(h,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(h,"href","#deformable-detr"),d(g,"class","relative group"),d(Y,"id","overview"),d(Y,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Y,"href","#overview"),d(S,"class","relative group"),d(De,"href","https://arxiv.org/abs/2010.04159"),d(De,"rel","nofollow"),d(Qe,"href","detr"),d(rt,"href","/docs/transformers/pr_19907/en/model_doc/deformable_detr#transformers.DeformableDetrFeatureExtractor"),d(at,"href","detr"),d(xe,"href","https://github.com/NielsRogge/Transformers-Tutorials/tree/master/DETR"),d(xe,"rel","nofollow"),Bn(Q.src,Va="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/deformable_detr_architecture.png")||d(Q,"src",Va),d(Q,"alt","drawing"),d(Q,"width","600"),d(nt,"href","https://arxiv.org/abs/2010.04159"),d(we,"href","https://huggingface.co/nielsr"),d(we,"rel","nofollow"),d(Te,"href","https://github.com/fundamentalvision/Deformable-DETR"),d(Te,"rel","nofollow"),d(te,"id","transformers.DeformableDetrFeatureExtractor"),d(te,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(te,"href","#transformers.DeformableDetrFeatureExtractor"),d(H,"class","relative group"),d(st,"href","/docs/transformers/pr_19907/en/internal/image_processing_utils#transformers.FeatureExtractionMixin"),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(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(it,"href","/docs/transformers/pr_19907/en/model_doc/deformable_detr#transformers.DeformableDetrForObjectDetection"),d(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ie,"id","transformers.DeformableDetrConfig"),d(ie,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(ie,"href","#transformers.DeformableDetrConfig"),d(U,"class","relative group"),d(lt,"href","/docs/transformers/pr_19907/en/model_doc/deformable_detr#transformers.DeformableDetrModel"),d(Le,"href","https://huggingface.co/SenseTime/deformable-detr"),d(Le,"rel","nofollow"),d(dt,"href","/docs/transformers/pr_19907/en/main_classes/configuration#transformers.PretrainedConfig"),d(ct,"href","/docs/transformers/pr_19907/en/main_classes/configuration#transformers.PretrainedConfig"),d(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(de,"id","transformers.DeformableDetrModel"),d(de,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(de,"href","#transformers.DeformableDetrModel"),d(X,"class","relative group"),d(mt,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel"),d(He,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(He,"rel","nofollow"),d(ft,"href","/docs/transformers/pr_19907/en/model_doc/deformable_detr#transformers.DeformableDetrModel"),d(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(fe,"id","transformers.DeformableDetrForObjectDetection"),d(fe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(fe,"href","#transformers.DeformableDetrForObjectDetection"),d(J,"class","relative group"),d(pt,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel"),d(Je,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Je,"rel","nofollow"),d(ht,"href","/docs/transformers/pr_19907/en/model_doc/deformable_detr#transformers.DeformableDetrForObjectDetection"),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(j,"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,p){e(document.head,f),u(t,b,p),u(t,g,p),e(g,h),e(h,D),w(l,D,null),e(g,_),e(g,O),e(O,Po),u(t,Gt,p),u(t,S,p),e(S,Y),e(Y,yt),w(be,yt,null),e(S,Oo),e(S,$t),e($t,Mo),u(t,Jt,p),u(t,I,p),e(I,Io),e(I,De),e(De,Ao),e(I,Lo),e(I,Qe),e(Qe,No),e(I,Ro),u(t,Zt,p),u(t,et,p),e(et,So),u(t,Yt,p),u(t,tt,p),e(tt,Et),e(Et,Wo),u(t,Kt,p),u(t,ot,p),e(ot,Ho),u(t,Qt,p),u(t,K,p),e(K,ve),e(ve,Uo),e(ve,rt),e(rt,Bo),e(ve,Vo),e(K,Xo),e(K,W),e(W,Go),e(W,at),e(at,Jo),e(W,Zo),e(W,xe),e(xe,Yo),e(W,Ko),u(t,eo,p),u(t,Q,p),u(t,to,p),u(t,ee,p),e(ee,Qo),e(ee,nt),e(nt,er),e(ee,tr),u(t,oo,p),u(t,A,p),e(A,or),e(A,we),e(we,rr),e(A,ar),e(A,Te),e(Te,nr),e(A,sr),u(t,ro,p),u(t,H,p),e(H,te),e(te,Ft),w(ye,Ft,null),e(H,ir),e(H,kt),e(kt,lr),u(t,ao,p),u(t,E,p),w($e,E,null),e(E,dr),e(E,jt),e(jt,cr),e(E,mr),e(E,Ee),e(Ee,fr),e(Ee,st),e(st,pr),e(Ee,hr),e(E,ur),e(E,L),w(Fe,L,null),e(L,gr),e(L,zt),e(zt,_r),e(L,br),w(oe,L,null),e(E,Dr),e(E,re),w(ke,re,null),e(re,vr),e(re,je),e(je,xr),e(je,qt),e(qt,wr),e(je,Tr),e(E,yr),e(E,ae),w(ze,ae,null),e(ae,$r),e(ae,qe),e(qe,Er),e(qe,it),e(it,Fr),e(qe,kr),e(E,jr),e(E,ne),w(Ce,ne,null),e(ne,zr),e(ne,Pe),e(Pe,qr),e(Pe,Ct),e(Ct,Cr),e(Pe,Pr),e(E,Or),e(E,se),w(Oe,se,null),e(se,Mr),e(se,Me),e(Me,Ir),e(Me,Pt),e(Pt,Ar),e(Me,Lr),u(t,no,p),u(t,U,p),e(U,ie),e(ie,Ot),w(Ie,Ot,null),e(U,Nr),e(U,Mt),e(Mt,Rr),u(t,so,p),u(t,q,p),w(Ae,q,null),e(q,Sr),e(q,B),e(B,Wr),e(B,lt),e(lt,Hr),e(B,Ur),e(B,Le),e(Le,Br),e(B,Vr),e(q,Xr),e(q,V),e(V,Gr),e(V,dt),e(dt,Jr),e(V,Zr),e(V,ct),e(ct,Yr),e(V,Kr),e(q,Qr),w(le,q,null),u(t,io,p),u(t,X,p),e(X,de),e(de,It),w(Ne,It,null),e(X,ea),e(X,At),e(At,ta),u(t,lo,p),u(t,k,p),w(Re,k,null),e(k,oa),e(k,Lt),e(Lt,ra),e(k,aa),e(k,Se),e(Se,na),e(Se,mt),e(mt,sa),e(Se,ia),e(k,la),e(k,We),e(We,da),e(We,He),e(He,ca),e(We,ma),e(k,fa),e(k,C),w(Ue,C,null),e(C,pa),e(C,G),e(G,ha),e(G,ft),e(ft,ua),e(G,ga),e(G,Nt),e(Nt,_a),e(G,ba),e(C,Da),w(ce,C,null),e(C,va),w(me,C,null),u(t,co,p),u(t,J,p),e(J,fe),e(fe,Rt),w(Be,Rt,null),e(J,xa),e(J,St),e(St,wa),u(t,mo,p),u(t,j,p),w(Ve,j,null),e(j,Ta),e(j,Wt),e(Wt,ya),e(j,$a),e(j,Xe),e(Xe,Ea),e(Xe,pt),e(pt,Fa),e(Xe,ka),e(j,ja),e(j,Ge),e(Ge,za),e(Ge,Je),e(Je,qa),e(Ge,Ca),e(j,Pa),e(j,P),w(Ze,P,null),e(P,Oa),e(P,Z),e(Z,Ma),e(Z,ht),e(ht,Ia),e(Z,Aa),e(Z,Ht),e(Ht,La),e(Z,Na),e(P,Ra),w(pe,P,null),e(P,Sa),w(he,P,null),fo=!0},p(t,[p]){const Ye={};p&2&&(Ye.$$scope={dirty:p,ctx:t}),oe.$set(Ye);const Ut={};p&2&&(Ut.$$scope={dirty:p,ctx:t}),le.$set(Ut);const Bt={};p&2&&(Bt.$$scope={dirty:p,ctx:t}),ce.$set(Bt);const Vt={};p&2&&(Vt.$$scope={dirty:p,ctx:t}),me.$set(Vt);const Ke={};p&2&&(Ke.$$scope={dirty:p,ctx:t}),pe.$set(Ke);const Xt={};p&2&&(Xt.$$scope={dirty:p,ctx:t}),he.$set(Xt)},i(t){fo||(T(l.$$.fragment,t),T(be.$$.fragment,t),T(ye.$$.fragment,t),T($e.$$.fragment,t),T(Fe.$$.fragment,t),T(oe.$$.fragment,t),T(ke.$$.fragment,t),T(ze.$$.fragment,t),T(Ce.$$.fragment,t),T(Oe.$$.fragment,t),T(Ie.$$.fragment,t),T(Ae.$$.fragment,t),T(le.$$.fragment,t),T(Ne.$$.fragment,t),T(Re.$$.fragment,t),T(Ue.$$.fragment,t),T(ce.$$.fragment,t),T(me.$$.fragment,t),T(Be.$$.fragment,t),T(Ve.$$.fragment,t),T(Ze.$$.fragment,t),T(pe.$$.fragment,t),T(he.$$.fragment,t),fo=!0)},o(t){y(l.$$.fragment,t),y(be.$$.fragment,t),y(ye.$$.fragment,t),y($e.$$.fragment,t),y(Fe.$$.fragment,t),y(oe.$$.fragment,t),y(ke.$$.fragment,t),y(ze.$$.fragment,t),y(Ce.$$.fragment,t),y(Oe.$$.fragment,t),y(Ie.$$.fragment,t),y(Ae.$$.fragment,t),y(le.$$.fragment,t),y(Ne.$$.fragment,t),y(Re.$$.fragment,t),y(Ue.$$.fragment,t),y(ce.$$.fragment,t),y(me.$$.fragment,t),y(Be.$$.fragment,t),y(Ve.$$.fragment,t),y(Ze.$$.fragment,t),y(pe.$$.fragment,t),y(he.$$.fragment,t),fo=!1},d(t){o(f),t&&o(b),t&&o(g),$(l),t&&o(Gt),t&&o(S),$(be),t&&o(Jt),t&&o(I),t&&o(Zt),t&&o(et),t&&o(Yt),t&&o(tt),t&&o(Kt),t&&o(ot),t&&o(Qt),t&&o(K),t&&o(eo),t&&o(Q),t&&o(to),t&&o(ee),t&&o(oo),t&&o(A),t&&o(ro),t&&o(H),$(ye),t&&o(ao),t&&o(E),$($e),$(Fe),$(oe),$(ke),$(ze),$(Ce),$(Oe),t&&o(no),t&&o(U),$(Ie),t&&o(so),t&&o(q),$(Ae),$(le),t&&o(io),t&&o(X),$(Ne),t&&o(lo),t&&o(k),$(Re),$(Ue),$(ce),$(me),t&&o(co),t&&o(J),$(Be),t&&o(mo),t&&o(j),$(Ve),$(Ze),$(pe),$(he)}}}const es={local:"deformable-detr",sections:[{local:"overview",title:"Overview"},{local:"transformers.DeformableDetrFeatureExtractor",title:"DeformableDetrFeatureExtractor"},{local:"transformers.DeformableDetrConfig",title:"DeformableDetrConfig"},{local:"transformers.DeformableDetrModel",title:"DeformableDetrModel"},{local:"transformers.DeformableDetrForObjectDetection",title:"DeformableDetrForObjectDetection"}],title:"Deformable DETR"};function ts(z){return Vn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ls extends Sn{constructor(f){super();Wn(this,f,ts,Qn,Hn,{})}}export{ls as default,es as metadata};
