import{S as Mn,i as qn,s as Nn,e as r,k as c,w as T,t as n,M as Ln,c as s,d as o,m,a,x as b,h as i,b as d,N as On,G as e,g as f,y as P,q as y,o as w,B as D,v as Rn,L as pr}from"../../chunks/vendor-hf-doc-builder.js";import{T as za}from"../../chunks/Tip-hf-doc-builder.js";import{D as I}from"../../chunks/Docstring-hf-doc-builder.js";import{C as hr}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as oe}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as mr}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Vn(x){let h,$,_,u,v;return u=new hr({props:{code:`from transformers import DPTModel, DPTConfig

# Initializing a DPT dpt-large style configuration
configuration = DPTConfig()

# Initializing a model from the dpt-large style configuration
model = DPTModel(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> DPTModel, DPTConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a DPT dpt-large style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = DPTConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the dpt-large style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DPTModel(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(){h=r("p"),$=n("Example:"),_=c(),T(u.$$.fragment)},l(l){h=s(l,"P",{});var g=a(h);$=i(g,"Example:"),g.forEach(o),_=m(l),b(u.$$.fragment,l)},m(l,g){f(l,h,g),e(h,$),f(l,_,g),P(u,l,g),v=!0},p:pr,i(l){v||(y(u.$$.fragment,l),v=!0)},o(l){w(u.$$.fragment,l),v=!1},d(l){l&&o(h),l&&o(_),D(u,l)}}}function Wn(x){let h,$,_,u,v;return{c(){h=r("p"),$=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=r("code"),u=n("Module"),v=n(`
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){h=s(l,"P",{});var g=a(h);$=i(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(g,"CODE",{});var E=a(_);u=i(E,"Module"),E.forEach(o),v=i(g,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),g.forEach(o)},m(l,g){f(l,h,g),e(h,$),e(h,_),e(_,u),e(h,v)},d(l){l&&o(h)}}}function Un(x){let h,$,_,u,v;return u=new hr({props:{code:`from transformers import AutoImageProcessor, DPTModel
import torch
from datasets import load_dataset

dataset = load_dataset("huggingface/cats-image")
image = dataset["test"]["image"][0]

image_processor = AutoImageProcessor.from_pretrained("Intel/dpt-large")
model = DPTModel.from_pretrained("Intel/dpt-large")

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

with torch.no_grad():
    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> AutoImageProcessor, DPTModel
<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">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;huggingface/cats-image&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;Intel/dpt-large&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DPTModel.from_pretrained(<span class="hljs-string">&quot;Intel/dpt-large&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </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">577</span>, <span class="hljs-number">1024</span>]`}}),{c(){h=r("p"),$=n("Example:"),_=c(),T(u.$$.fragment)},l(l){h=s(l,"P",{});var g=a(h);$=i(g,"Example:"),g.forEach(o),_=m(l),b(u.$$.fragment,l)},m(l,g){f(l,h,g),e(h,$),f(l,_,g),P(u,l,g),v=!0},p:pr,i(l){v||(y(u.$$.fragment,l),v=!0)},o(l){w(u.$$.fragment,l),v=!1},d(l){l&&o(h),l&&o(_),D(u,l)}}}function Hn(x){let h,$,_,u,v;return{c(){h=r("p"),$=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=r("code"),u=n("Module"),v=n(`
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){h=s(l,"P",{});var g=a(h);$=i(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(g,"CODE",{});var E=a(_);u=i(E,"Module"),E.forEach(o),v=i(g,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),g.forEach(o)},m(l,g){f(l,h,g),e(h,$),e(h,_),e(_,u),e(h,v)},d(l){l&&o(h)}}}function Bn(x){let h,$,_,u,v;return u=new hr({props:{code:`from transformers import AutoImageProcessor, DPTForDepthEstimation
import torch
import numpy as np
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("Intel/dpt-large")
model = DPTForDepthEstimation.from_pretrained("Intel/dpt-large")

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

with torch.no_grad():
    outputs = model(**inputs)
    predicted_depth = outputs.predicted_depth

# interpolate to original size
prediction = torch.nn.functional.interpolate(
    predicted_depth.unsqueeze(1),
    size=image.size[::-1],
    mode="bicubic",
    align_corners=False,
)

# visualize the prediction
output = prediction.squeeze().cpu().numpy()
formatted = (output * 255 / np.max(output)).astype("uint8")
depth = Image.fromarray(formatted)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, DPTForDepthEstimation
<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-keyword">as</span> np
<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;Intel/dpt-large&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DPTForDepthEstimation.from_pretrained(<span class="hljs-string">&quot;Intel/dpt-large&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-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**inputs)
<span class="hljs-meta">... </span>    predicted_depth = outputs.predicted_depth

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># interpolate to original size</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>prediction = torch.nn.functional.interpolate(
<span class="hljs-meta">... </span>    predicted_depth.unsqueeze(<span class="hljs-number">1</span>),
<span class="hljs-meta">... </span>    size=image.size[::-<span class="hljs-number">1</span>],
<span class="hljs-meta">... </span>    mode=<span class="hljs-string">&quot;bicubic&quot;</span>,
<span class="hljs-meta">... </span>    align_corners=<span class="hljs-literal">False</span>,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># visualize the prediction</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>output = prediction.squeeze().cpu().numpy()
<span class="hljs-meta">&gt;&gt;&gt; </span>formatted = (output * <span class="hljs-number">255</span> / np.<span class="hljs-built_in">max</span>(output)).astype(<span class="hljs-string">&quot;uint8&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>depth = Image.fromarray(formatted)`}}),{c(){h=r("p"),$=n("Examples:"),_=c(),T(u.$$.fragment)},l(l){h=s(l,"P",{});var g=a(h);$=i(g,"Examples:"),g.forEach(o),_=m(l),b(u.$$.fragment,l)},m(l,g){f(l,h,g),e(h,$),f(l,_,g),P(u,l,g),v=!0},p:pr,i(l){v||(y(u.$$.fragment,l),v=!0)},o(l){w(u.$$.fragment,l),v=!1},d(l){l&&o(h),l&&o(_),D(u,l)}}}function Kn(x){let h,$,_,u,v;return{c(){h=r("p"),$=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=r("code"),u=n("Module"),v=n(`
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){h=s(l,"P",{});var g=a(h);$=i(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(g,"CODE",{});var E=a(_);u=i(E,"Module"),E.forEach(o),v=i(g,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),g.forEach(o)},m(l,g){f(l,h,g),e(h,$),e(h,_),e(_,u),e(h,v)},d(l){l&&o(h)}}}function Gn(x){let h,$,_,u,v;return u=new hr({props:{code:`from transformers import AutoImageProcessor, DPTForSemanticSegmentation
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("Intel/dpt-large-ade")
model = DPTForSemanticSegmentation.from_pretrained("Intel/dpt-large-ade")

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

outputs = model(**inputs)
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, DPTForSemanticSegmentation
<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;Intel/dpt-large-ade&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DPTForSemanticSegmentation.from_pretrained(<span class="hljs-string">&quot;Intel/dpt-large-ade&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>logits = outputs.logits`}}),{c(){h=r("p"),$=n("Examples:"),_=c(),T(u.$$.fragment)},l(l){h=s(l,"P",{});var g=a(h);$=i(g,"Examples:"),g.forEach(o),_=m(l),b(u.$$.fragment,l)},m(l,g){f(l,h,g),e(h,$),f(l,_,g),P(u,l,g),v=!0},p:pr,i(l){v||(y(u.$$.fragment,l),v=!0)},o(l){w(u.$$.fragment,l),v=!1},d(l){l&&o(h),l&&o(_),D(u,l)}}}function Yn(x){let h,$,_,u,v,l,g,E,fr,yo,R,re,Ut,Se,ur,Ht,gr,wo,N,_r,je,vr,Tr,gt,br,Pr,Do,_t,yr,$o,vt,Bt,wr,xo,se,Fa,ko,ae,Dr,Ce,$r,xr,Eo,L,kr,Ae,Er,Ir,Me,zr,Fr,Io,V,ne,Kt,qe,Sr,Gt,jr,zo,Tt,Cr,Fo,ie,W,Ar,bt,Mr,qr,Ne,Nr,Lr,Or,Pt,Rr,yt,Vr,So,wt,Wr,jo,U,le,Yt,Le,Ur,Jt,Hr,Co,k,Oe,Br,H,Kr,Dt,Gr,Yr,Re,Jr,Xr,Qr,B,Zr,$t,es,ts,xt,os,rs,ss,de,as,ce,Ve,ns,K,is,kt,ls,ds,Xt,cs,ms,Ao,G,me,Qt,We,ps,Zt,hs,Mo,M,Ue,fs,pe,He,us,eo,gs,_s,he,Be,vs,Ke,Ts,Et,bs,Ps,qo,Y,fe,to,Ge,ys,oo,ws,No,z,Ye,Ds,ro,$s,xs,ue,Je,ks,so,Es,Is,ge,Xe,zs,Qe,Fs,It,Ss,js,Lo,J,_e,ao,Ze,Cs,no,As,Oo,q,et,Ms,tt,qs,ot,Ns,Ls,Os,j,rt,Rs,X,Vs,zt,Ws,Us,io,Hs,Bs,Ks,ve,Gs,Te,Ro,Q,be,lo,st,Ys,co,Js,Vo,F,at,Xs,mo,Qs,Zs,nt,ea,it,ta,oa,ra,C,lt,sa,Z,aa,Ft,na,ia,po,la,da,ca,Pe,ma,ye,Wo,ee,we,ho,dt,pa,fo,ha,Uo,S,ct,fa,uo,ua,ga,mt,_a,pt,va,Ta,ba,A,ht,Pa,te,ya,St,wa,Da,go,$a,xa,ka,De,Ea,$e,Ho;return l=new oe({}),Se=new oe({}),qe=new oe({}),Le=new oe({}),Oe=new I({props:{name:"class transformers.DPTConfig",anchor:"transformers.DPTConfig",parameters:[{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.0"},{name:"attention_probs_dropout_prob",val:" = 0.0"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"image_size",val:" = 384"},{name:"patch_size",val:" = 16"},{name:"num_channels",val:" = 3"},{name:"is_hybrid",val:" = False"},{name:"qkv_bias",val:" = True"},{name:"backbone_out_indices",val:" = [2, 5, 8, 11]"},{name:"readout_type",val:" = 'project'"},{name:"reassemble_factors",val:" = [4, 2, 1, 0.5]"},{name:"neck_hidden_sizes",val:" = [96, 192, 384, 768]"},{name:"fusion_hidden_size",val:" = 256"},{name:"head_in_index",val:" = -1"},{name:"use_batch_norm_in_fusion_residual",val:" = False"},{name:"use_auxiliary_head",val:" = True"},{name:"auxiliary_loss_weight",val:" = 0.4"},{name:"semantic_loss_ignore_index",val:" = 255"},{name:"semantic_classifier_dropout",val:" = 0.1"},{name:"backbone_featmap_shape",val:" = [1, 1024, 24, 24]"},{name:"neck_ignore_stages",val:" = [0, 1]"},{name:"backbone_config",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DPTConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.DPTConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.DPTConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.DPTConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.DPTConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&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;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.DPTConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probabilitiy for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.DPTConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.DPTConfig.initializer_range",description:`<strong>initializer_range</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:"initializer_range"},{anchor:"transformers.DPTConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.DPTConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 384) &#x2014;
The size (resolution) of each image.`,name:"image_size"},{anchor:"transformers.DPTConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
The size (resolution) of each patch.`,name:"patch_size"},{anchor:"transformers.DPTConfig.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.DPTConfig.qkv_bias",description:`<strong>qkv_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to add a bias to the queries, keys and values.`,name:"qkv_bias"},{anchor:"transformers.DPTConfig.backbone_out_indices",description:`<strong>backbone_out_indices</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[2, 5, 8, 11]</code>) &#x2014;
Indices of the intermediate hidden states to use from backbone.`,name:"backbone_out_indices"},{anchor:"transformers.DPTConfig.readout_type",description:`<strong>readout_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;project&quot;</code>) &#x2014;
The readout type to use when processing the readout token (CLS token) of the intermediate hidden states of
the ViT backbone. Can be one of [<code>&quot;ignore&quot;</code>, <code>&quot;add&quot;</code>, <code>&quot;project&quot;</code>].</p>
<ul>
<li>&#x201C;ignore&#x201D; simply ignores the CLS token.</li>
<li>&#x201C;add&#x201D; passes the information from the CLS token to all other tokens by adding the representations.</li>
<li>&#x201C;project&#x201D; passes information to the other tokens by concatenating the readout to all other tokens before
projecting the
representation to the original feature dimension D using a linear layer followed by a GELU non-linearity.</li>
</ul>`,name:"readout_type"},{anchor:"transformers.DPTConfig.is_hybrid",description:`<strong>is_hybrid</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use a hybrid backbone. Useful in the context of loading DPT-Hybrid models.`,name:"is_hybrid"},{anchor:"transformers.DPTConfig.reassemble_factors",description:`<strong>reassemble_factors</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[4, 2, 1, 0.5]</code>) &#x2014;
The up/downsampling factors of the reassemble layers.`,name:"reassemble_factors"},{anchor:"transformers.DPTConfig.neck_hidden_sizes",description:`<strong>neck_hidden_sizes</strong> (<code>List[str]</code>, <em>optional</em>, defaults to [96, 192, 384, 768]) &#x2014;
The hidden sizes to project to for the feature maps of the backbone.`,name:"neck_hidden_sizes"},{anchor:"transformers.DPTConfig.fusion_hidden_size",description:`<strong>fusion_hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
The number of channels before fusion.`,name:"fusion_hidden_size"},{anchor:"transformers.DPTConfig.head_in_index",description:`<strong>head_in_index</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
The index of the features to use in the heads.`,name:"head_in_index"},{anchor:"transformers.DPTConfig.use_batch_norm_in_fusion_residual",description:`<strong>use_batch_norm_in_fusion_residual</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use batch normalization in the pre-activate residual units of the fusion blocks.`,name:"use_batch_norm_in_fusion_residual"},{anchor:"transformers.DPTConfig.use_auxiliary_head",description:`<strong>use_auxiliary_head</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use an auxiliary head during training.`,name:"use_auxiliary_head"},{anchor:"transformers.DPTConfig.auxiliary_loss_weight",description:`<strong>auxiliary_loss_weight</strong> (<code>float</code>, <em>optional</em>, defaults to 0.4) &#x2014;
Weight of the cross-entropy loss of the auxiliary head.`,name:"auxiliary_loss_weight"},{anchor:"transformers.DPTConfig.semantic_loss_ignore_index",description:`<strong>semantic_loss_ignore_index</strong> (<code>int</code>, <em>optional</em>, defaults to 255) &#x2014;
The index that is ignored by the loss function of the semantic segmentation model.`,name:"semantic_loss_ignore_index"},{anchor:"transformers.DPTConfig.semantic_classifier_dropout",description:`<strong>semantic_classifier_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the semantic classification head.`,name:"semantic_classifier_dropout"},{anchor:"transformers.DPTConfig.backbone_featmap_shape",description:`<strong>backbone_featmap_shape</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[1, 1024, 24, 24]</code>) &#x2014;
Used only for the <code>hybrid</code> embedding type. The shape of the feature maps of the backbone.`,name:"backbone_featmap_shape"},{anchor:"transformers.DPTConfig.neck_ignore_stages",description:`<strong>neck_ignore_stages</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[0, 1]</code>) &#x2014;
Used only for the <code>hybrid</code> embedding type. The stages of the readout layers to ignore.`,name:"neck_ignore_stages"},{anchor:"transformers.DPTConfig.backbone_config",description:`<strong>backbone_config</strong> (<code>Union[Dict[str, Any], PretrainedConfig]</code>, <em>optional</em>) &#x2014;
Used only for the <code>hybrid</code> embedding type. The configuration of the backbone in a dictionary.`,name:"backbone_config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpt/configuration_dpt.py#L32"}}),de=new mr({props:{anchor:"transformers.DPTConfig.example",$$slots:{default:[Vn]},$$scope:{ctx:x}}}),Ve=new I({props:{name:"to_dict",anchor:"transformers.DPTConfig.to_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpt/configuration_dpt.py#L220"}}),We=new oe({}),Ue=new I({props:{name:"class transformers.DPTFeatureExtractor",anchor:"transformers.DPTFeatureExtractor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpt/feature_extraction_dpt.py#L26"}}),He=new I({props:{name:"__call__",anchor:"transformers.DPTFeatureExtractor.__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"}}),Be=new I({props:{name:"post_process_semantic_segmentation",anchor:"transformers.DPTFeatureExtractor.post_process_semantic_segmentation",parameters:[{name:"outputs",val:""},{name:"target_sizes",val:": typing.List[typing.Tuple] = None"}],parametersDescription:[{anchor:"transformers.DPTFeatureExtractor.post_process_semantic_segmentation.outputs",description:`<strong>outputs</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/dpt#transformers.DPTForSemanticSegmentation">DPTForSemanticSegmentation</a>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.DPTFeatureExtractor.post_process_semantic_segmentation.target_sizes",description:`<strong>target_sizes</strong> (<code>List[Tuple]</code> of length <code>batch_size</code>, <em>optional</em>) &#x2014;
List of tuples corresponding to the requested final size (height, width) of each prediction. If unset,
predictions will not be resized.`,name:"target_sizes"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpt/image_processing_dpt.py#L342",returnDescription:`
<p><code>List[torch.Tensor]</code> 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>semantic_segmentation</p>
`}}),Ge=new oe({}),Ye=new I({props:{name:"class transformers.DPTImageProcessor",anchor:"transformers.DPTImageProcessor",parameters:[{name:"do_resize",val:": bool = True"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": Resampling = <Resampling.BILINEAR: 2>"},{name:"keep_aspect_ratio",val:": bool = False"},{name:"ensure_multiple_of",val:": int = 1"},{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], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DPTImageProcessor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize the image&#x2019;s (height, width) dimensions. Can be overidden by <code>do_resize</code> in <code>preprocess</code>.`,name:"do_resize"},{anchor:"transformers.DPTImageProcessor.size",description:`<strong>size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to <code>{&quot;height&quot; -- 384, &quot;width&quot;: 384}</code>):
Size of the image after resizing. Can be overidden by <code>size</code> in <code>preprocess</code>.`,name:"size"},{anchor:"transformers.DPTImageProcessor.keep_aspect_ratio",description:`<strong>keep_aspect_ratio</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If <code>True</code>, the image is resized to the largest possible size such that the aspect ratio is preserved. Can
be overidden by <code>keep_aspect_ratio</code> in <code>preprocess</code>.`,name:"keep_aspect_ratio"},{anchor:"transformers.DPTImageProcessor.ensure_multiple_of",description:`<strong>ensure_multiple_of</strong> (<code>int</code>, <em>optional</em>, defaults to <code>1</code>) &#x2014;
If <code>do_resize</code> is <code>True</code>, the image is resized to a size that is a multiple of this value. Can be overidden
by <code>ensure_multiple_of</code> in <code>preprocess</code>.`,name:"ensure_multiple_of"},{anchor:"transformers.DPTImageProcessor.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>PILImageResampling.BILINEAR</code>) &#x2014;
Defines the resampling filter to use if resizing the image. Can be overidden by <code>resample</code> in <code>preprocess</code>.`,name:"resample"},{anchor:"transformers.DPTImageProcessor.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to rescale the image by the specified scale <code>rescale_factor</code>. Can be overidden by <code>do_rescale</code> in
<code>preprocess</code>.`,name:"do_rescale"},{anchor:"transformers.DPTImageProcessor.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 overidden by <code>rescale_factor</code> in <code>preprocess</code>.`,name:"rescale_factor"},{anchor:"transformers.DPTImageProcessor.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to normalize the image. Can be overridden by the <code>do_normalize</code> parameter in the <code>preprocess</code>
method.`,name:"do_normalize"},{anchor:"transformers.DPTImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_MEAN</code>) &#x2014;
Mean to use if normalizing the image. This is a float or list of floats the length of the number of
channels in the image. Can be overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method.`,name:"image_mean"},{anchor:"transformers.DPTImageProcessor.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_STD</code>) &#x2014;
Standard deviation to use if normalizing the image. This is a float or list of floats the length of the
number of channels in the image. Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.`,name:"image_std"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpt/image_processing_dpt.py#L88"}}),Je=new I({props:{name:"preprocess",anchor:"transformers.DPTImageProcessor.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:"do_resize",val:": bool = None"},{name:"size",val:": int = None"},{name:"keep_aspect_ratio",val:": bool = None"},{name:"ensure_multiple_of",val:": int = None"},{name:"resample",val:": Resampling = None"},{name:"do_rescale",val:": bool = None"},{name:"rescale_factor",val:": float = None"},{name:"do_normalize",val:": 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:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"data_format",val:": ChannelDimension = <ChannelDimension.FIRST: 'channels_first'>"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DPTImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to preprocess.`,name:"images"},{anchor:"transformers.DPTImageProcessor.preprocess.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_resize</code>) &#x2014;
Whether to resize the image.`,name:"do_resize"},{anchor:"transformers.DPTImageProcessor.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Size of the image after reszing. If <code>keep_aspect_ratio</code> is <code>True</code>, the image is resized to the largest
possible size such that the aspect ratio is preserved. If <code>ensure_multiple_of</code> is set, the image is
resized to a size that is a multiple of this value.`,name:"size"},{anchor:"transformers.DPTImageProcessor.preprocess.keep_aspect_ratio",description:`<strong>keep_aspect_ratio</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.keep_aspect_ratio</code>) &#x2014;
Whether to keep the aspect ratio of the image. If False, the image will be resized to (size, size). If
True, the image will be resized to keep the aspect ratio and the size will be the maximum possible.`,name:"keep_aspect_ratio"},{anchor:"transformers.DPTImageProcessor.preprocess.ensure_multiple_of",description:`<strong>ensure_multiple_of</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.ensure_multiple_of</code>) &#x2014;
Ensure that the image size is a multiple of this value.`,name:"ensure_multiple_of"},{anchor:"transformers.DPTImageProcessor.preprocess.resample",description:`<strong>resample</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.resample</code>) &#x2014;
Resampling filter to use if resizing the image. This can be one of the enum <code>PILImageResampling</code>, Only
has an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"resample"},{anchor:"transformers.DPTImageProcessor.preprocess.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_rescale</code>) &#x2014;
Whether to rescale the image values between [0 - 1].`,name:"do_rescale"},{anchor:"transformers.DPTImageProcessor.preprocess.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>self.rescale_factor</code>) &#x2014;
Rescale factor to rescale the image by if <code>do_rescale</code> is set to <code>True</code>.`,name:"rescale_factor"},{anchor:"transformers.DPTImageProcessor.preprocess.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_normalize</code>) &#x2014;
Whether to normalize the image.`,name:"do_normalize"},{anchor:"transformers.DPTImageProcessor.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_mean</code>) &#x2014;
Image mean.`,name:"image_mean"},{anchor:"transformers.DPTImageProcessor.preprocess.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_std</code>) &#x2014;
Image standard deviation.`,name:"image_std"},{anchor:"transformers.DPTImageProcessor.preprocess.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.DPTImageProcessor.preprocess.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>, defaults to <code>ChannelDimension.FIRST</code>) &#x2014;
The channel dimension format for the output image. Can be one of:<ul>
<li><code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
</ul>`,name:"data_format"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpt/image_processing_dpt.py#L237"}}),Xe=new I({props:{name:"post_process_semantic_segmentation",anchor:"transformers.DPTImageProcessor.post_process_semantic_segmentation",parameters:[{name:"outputs",val:""},{name:"target_sizes",val:": typing.List[typing.Tuple] = None"}],parametersDescription:[{anchor:"transformers.DPTImageProcessor.post_process_semantic_segmentation.outputs",description:`<strong>outputs</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/dpt#transformers.DPTForSemanticSegmentation">DPTForSemanticSegmentation</a>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.DPTImageProcessor.post_process_semantic_segmentation.target_sizes",description:`<strong>target_sizes</strong> (<code>List[Tuple]</code> of length <code>batch_size</code>, <em>optional</em>) &#x2014;
List of tuples corresponding to the requested final size (height, width) of each prediction. If unset,
predictions will not be resized.`,name:"target_sizes"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpt/image_processing_dpt.py#L342",returnDescription:`
<p><code>List[torch.Tensor]</code> 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>semantic_segmentation</p>
`}}),Ze=new oe({}),et=new I({props:{name:"class transformers.DPTModel",anchor:"transformers.DPTModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],parametersDescription:[{anchor:"transformers.DPTModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/vit#transformers.ViTConfig">ViTConfig</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/dpt/modeling_dpt.py#L864"}}),rt=new I({props:{name:"forward",anchor:"transformers.DPTModel.forward",parameters:[{name:"pixel_values",val:": FloatTensor"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.DPTModel.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. 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__">DPTImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.DPTModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.DPTModel.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.DPTModel.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.DPTModel.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/dpt/modeling_dpt.py#L896",returnDescription:`
<p>A <code>transformers.models.dpt.modeling_dpt.BaseModelOutputWithPoolingAndIntermediateActivations</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/dpt#transformers.DPTConfig"
>DPTConfig</a>) and inputs.</p>
<ul>
<li>
<p><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 model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>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, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>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>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>intermediate_activations</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>) \u2014 Intermediate activations that can be used to compute hidden states of the model at various layers.</p>
</li>
</ul>
`,returnType:`
<p><code>transformers.models.dpt.modeling_dpt.BaseModelOutputWithPoolingAndIntermediateActivations</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ve=new za({props:{$$slots:{default:[Wn]},$$scope:{ctx:x}}}),Te=new mr({props:{anchor:"transformers.DPTModel.forward.example",$$slots:{default:[Un]},$$scope:{ctx:x}}}),st=new oe({}),at=new I({props:{name:"class transformers.DPTForDepthEstimation",anchor:"transformers.DPTForDepthEstimation",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.DPTForDepthEstimation.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/vit#transformers.ViTConfig">ViTConfig</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/dpt/modeling_dpt.py#L1052"}}),lt=new I({props:{name:"forward",anchor:"transformers.DPTForDepthEstimation.forward",parameters:[{name:"pixel_values",val:": FloatTensor"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.DPTForDepthEstimation.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. 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__">DPTImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.DPTForDepthEstimation.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.DPTForDepthEstimation.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.DPTForDepthEstimation.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.DPTForDepthEstimation.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.DPTForDepthEstimation.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, height, width)</code>, <em>optional</em>) &#x2014;
Ground truth depth estimation maps for computing the loss.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpt/modeling_dpt.py#L1067",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.DepthEstimatorOutput"
>transformers.modeling_outputs.DepthEstimatorOutput</a> 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/dpt#transformers.DPTConfig"
>DPTConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>predicted_depth</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, height, width)</code>) \u2014 Predicted depth for each pixel.</p>
</li>
<li>
<p><strong>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, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, num_channels, height, width)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>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, patch_size, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.DepthEstimatorOutput"
>transformers.modeling_outputs.DepthEstimatorOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Pe=new za({props:{$$slots:{default:[Hn]},$$scope:{ctx:x}}}),ye=new mr({props:{anchor:"transformers.DPTForDepthEstimation.forward.example",$$slots:{default:[Bn]},$$scope:{ctx:x}}}),dt=new oe({}),ct=new I({props:{name:"class transformers.DPTForSemanticSegmentation",anchor:"transformers.DPTForSemanticSegmentation",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.DPTForSemanticSegmentation.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/vit#transformers.ViTConfig">ViTConfig</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/dpt/modeling_dpt.py#L1220"}}),ht=new I({props:{name:"forward",anchor:"transformers.DPTForSemanticSegmentation.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.DPTForSemanticSegmentation.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. 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__">DPTImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.DPTForSemanticSegmentation.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.DPTForSemanticSegmentation.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.DPTForSemanticSegmentation.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.DPTForSemanticSegmentation.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.DPTForSemanticSegmentation.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, height, width)</code>, <em>optional</em>) &#x2014;
Ground truth semantic segmentation maps for computing the loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels &gt; 1</code>, a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/dpt/modeling_dpt.py#L1236",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.SemanticSegmenterOutput"
>transformers.modeling_outputs.SemanticSegmenterOutput</a> 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/dpt#transformers.DPTConfig"
>DPTConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels, logits_height, logits_width)</code>) \u2014 Classification scores for each pixel.</p>
<Tip warning={true}>
<p>The logits returned do not necessarily have the same size as the <code>pixel_values</code> passed as inputs. This is
to avoid doing two interpolations and lose some quality when a user needs to resize the logits to the
original image size as post-processing. You should always check your logits shape and resize as needed.</p>
</Tip>
</li>
<li>
<p><strong>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, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, patch_size, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>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, patch_size, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.SemanticSegmenterOutput"
>transformers.modeling_outputs.SemanticSegmenterOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),De=new za({props:{$$slots:{default:[Kn]},$$scope:{ctx:x}}}),$e=new mr({props:{anchor:"transformers.DPTForSemanticSegmentation.forward.example",$$slots:{default:[Gn]},$$scope:{ctx:x}}}),{c(){h=r("meta"),$=c(),_=r("h1"),u=r("a"),v=r("span"),T(l.$$.fragment),g=c(),E=r("span"),fr=n("DPT"),yo=c(),R=r("h2"),re=r("a"),Ut=r("span"),T(Se.$$.fragment),ur=c(),Ht=r("span"),gr=n("Overview"),wo=c(),N=r("p"),_r=n("The DPT model was proposed in "),je=r("a"),vr=n("Vision Transformers for Dense Prediction"),Tr=n(` by Ren\xE9 Ranftl, Alexey Bochkovskiy, Vladlen Koltun.
DPT is a model that leverages the `),gt=r("a"),br=n("Vision Transformer (ViT)"),Pr=n(" as backbone for dense prediction tasks like semantic segmentation and depth estimation."),Do=c(),_t=r("p"),yr=n("The abstract from the paper is the following:"),$o=c(),vt=r("p"),Bt=r("em"),wr=n("We introduce dense vision transformers, an architecture that leverages vision transformers in place of convolutional networks as a backbone for dense prediction tasks. We assemble tokens from various stages of the vision transformer into image-like representations at various resolutions and progressively combine them into full-resolution predictions using a convolutional decoder. The transformer backbone processes representations at a constant and relatively high resolution and has a global receptive field at every stage. These properties allow the dense vision transformer to provide finer-grained and more globally coherent predictions when compared to fully-convolutional networks. Our experiments show that this architecture yields substantial improvements on dense prediction tasks, especially when a large amount of training data is available. For monocular depth estimation, we observe an improvement of up to 28% in relative performance when compared to a state-of-the-art fully-convolutional network. When applied to semantic segmentation, dense vision transformers set a new state of the art on ADE20K with 49.02% mIoU. We further show that the architecture can be fine-tuned on smaller datasets such as NYUv2, KITTI, and Pascal Context where it also sets the new state of the art."),xo=c(),se=r("img"),ko=c(),ae=r("small"),Dr=n("DPT architecture. Taken from the "),Ce=r("a"),$r=n("original paper"),xr=n("."),Eo=c(),L=r("p"),kr=n("This model was contributed by "),Ae=r("a"),Er=n("nielsr"),Ir=n(". The original code can be found "),Me=r("a"),zr=n("here"),Fr=n("."),Io=c(),V=r("h2"),ne=r("a"),Kt=r("span"),T(qe.$$.fragment),Sr=c(),Gt=r("span"),jr=n("Resources"),zo=c(),Tt=r("p"),Cr=n("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with DPT."),Fo=c(),ie=r("ul"),W=r("li"),Ar=n("Demo notebooks for "),bt=r("a"),Mr=n("DPTForDepthEstimation"),qr=n(" can be found "),Ne=r("a"),Nr=n("here"),Lr=n("."),Or=c(),Pt=r("li"),Rr=n("See also: "),yt=r("a"),Vr=n("Semantic segmentation task guide"),So=c(),wt=r("p"),Wr=n("If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),jo=c(),U=r("h2"),le=r("a"),Yt=r("span"),T(Le.$$.fragment),Ur=c(),Jt=r("span"),Hr=n("DPTConfig"),Co=c(),k=r("div"),T(Oe.$$.fragment),Br=c(),H=r("p"),Kr=n("This is the configuration class to store the configuration of a "),Dt=r("a"),Gr=n("DPTModel"),Yr=n(`. It is used to instantiate an DPT
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 DPT
`),Re=r("a"),Jr=n("Intel/dpt-large"),Xr=n(" architecture."),Qr=c(),B=r("p"),Zr=n("Configuration objects inherit from "),$t=r("a"),es=n("PretrainedConfig"),ts=n(` and can be used to control the model outputs. Read the
documentation from `),xt=r("a"),os=n("PretrainedConfig"),rs=n(" for more information."),ss=c(),T(de.$$.fragment),as=c(),ce=r("div"),T(Ve.$$.fragment),ns=c(),K=r("p"),is=n("Serializes this instance to a Python dictionary. Override the default "),kt=r("a"),ls=n("to_dict()"),ds=n(`. Returns:
`),Xt=r("code"),cs=n("Dict[str, any]"),ms=n(": Dictionary of all the attributes that make up this configuration instance,"),Ao=c(),G=r("h2"),me=r("a"),Qt=r("span"),T(We.$$.fragment),ps=c(),Zt=r("span"),hs=n("DPTFeatureExtractor"),Mo=c(),M=r("div"),T(Ue.$$.fragment),fs=c(),pe=r("div"),T(He.$$.fragment),us=c(),eo=r("p"),gs=n("Preprocess an image or a batch of images."),_s=c(),he=r("div"),T(Be.$$.fragment),vs=c(),Ke=r("p"),Ts=n("Converts the output of "),Et=r("a"),bs=n("DPTForSemanticSegmentation"),Ps=n(" into semantic segmentation maps. Only supports PyTorch."),qo=c(),Y=r("h2"),fe=r("a"),to=r("span"),T(Ge.$$.fragment),ys=c(),oo=r("span"),ws=n("DPTImageProcessor"),No=c(),z=r("div"),T(Ye.$$.fragment),Ds=c(),ro=r("p"),$s=n("Constructs a DPT image processor."),xs=c(),ue=r("div"),T(Je.$$.fragment),ks=c(),so=r("p"),Es=n("Preprocess an image or batch of images."),Is=c(),ge=r("div"),T(Xe.$$.fragment),zs=c(),Qe=r("p"),Fs=n("Converts the output of "),It=r("a"),Ss=n("DPTForSemanticSegmentation"),js=n(" into semantic segmentation maps. Only supports PyTorch."),Lo=c(),J=r("h2"),_e=r("a"),ao=r("span"),T(Ze.$$.fragment),Cs=c(),no=r("span"),As=n("DPTModel"),Oo=c(),q=r("div"),T(et.$$.fragment),Ms=c(),tt=r("p"),qs=n(`The bare DPT Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),ot=r("a"),Ns=n("torch.nn.Module"),Ls=n(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Os=c(),j=r("div"),T(rt.$$.fragment),Rs=c(),X=r("p"),Vs=n("The "),zt=r("a"),Ws=n("DPTModel"),Us=n(" forward method, overrides the "),io=r("code"),Hs=n("__call__"),Bs=n(" special method."),Ks=c(),T(ve.$$.fragment),Gs=c(),T(Te.$$.fragment),Ro=c(),Q=r("h2"),be=r("a"),lo=r("span"),T(st.$$.fragment),Ys=c(),co=r("span"),Js=n("DPTForDepthEstimation"),Vo=c(),F=r("div"),T(at.$$.fragment),Xs=c(),mo=r("p"),Qs=n("DPT Model with a depth estimation head on top (consisting of 3 convolutional layers) e.g. for KITTI, NYUv2."),Zs=c(),nt=r("p"),ea=n("This model is a PyTorch "),it=r("a"),ta=n("torch.nn.Module"),oa=n(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ra=c(),C=r("div"),T(lt.$$.fragment),sa=c(),Z=r("p"),aa=n("The "),Ft=r("a"),na=n("DPTForDepthEstimation"),ia=n(" forward method, overrides the "),po=r("code"),la=n("__call__"),da=n(" special method."),ca=c(),T(Pe.$$.fragment),ma=c(),T(ye.$$.fragment),Wo=c(),ee=r("h2"),we=r("a"),ho=r("span"),T(dt.$$.fragment),pa=c(),fo=r("span"),ha=n("DPTForSemanticSegmentation"),Uo=c(),S=r("div"),T(ct.$$.fragment),fa=c(),uo=r("p"),ua=n("DPT Model with a semantic segmentation head on top e.g. for ADE20k, CityScapes."),ga=c(),mt=r("p"),_a=n("This model is a PyTorch "),pt=r("a"),va=n("torch.nn.Module"),Ta=n(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ba=c(),A=r("div"),T(ht.$$.fragment),Pa=c(),te=r("p"),ya=n("The "),St=r("a"),wa=n("DPTForSemanticSegmentation"),Da=n(" forward method, overrides the "),go=r("code"),$a=n("__call__"),xa=n(" special method."),ka=c(),T(De.$$.fragment),Ea=c(),T($e.$$.fragment),this.h()},l(t){const p=Ln('[data-svelte="svelte-1phssyn"]',document.head);h=s(p,"META",{name:!0,content:!0}),p.forEach(o),$=m(t),_=s(t,"H1",{class:!0});var ft=a(_);u=s(ft,"A",{id:!0,class:!0,href:!0});var _o=a(u);v=s(_o,"SPAN",{});var vo=a(v);b(l.$$.fragment,vo),vo.forEach(o),_o.forEach(o),g=m(ft),E=s(ft,"SPAN",{});var To=a(E);fr=i(To,"DPT"),To.forEach(o),ft.forEach(o),yo=m(t),R=s(t,"H2",{class:!0});var ut=a(R);re=s(ut,"A",{id:!0,class:!0,href:!0});var bo=a(re);Ut=s(bo,"SPAN",{});var Po=a(Ut);b(Se.$$.fragment,Po),Po.forEach(o),bo.forEach(o),ur=m(ut),Ht=s(ut,"SPAN",{});var Sa=a(Ht);gr=i(Sa,"Overview"),Sa.forEach(o),ut.forEach(o),wo=m(t),N=s(t,"P",{});var jt=a(N);_r=i(jt,"The DPT model was proposed in "),je=s(jt,"A",{href:!0,rel:!0});var ja=a(je);vr=i(ja,"Vision Transformers for Dense Prediction"),ja.forEach(o),Tr=i(jt,` by Ren\xE9 Ranftl, Alexey Bochkovskiy, Vladlen Koltun.
DPT is a model that leverages the `),gt=s(jt,"A",{href:!0});var Ca=a(gt);br=i(Ca,"Vision Transformer (ViT)"),Ca.forEach(o),Pr=i(jt," as backbone for dense prediction tasks like semantic segmentation and depth estimation."),jt.forEach(o),Do=m(t),_t=s(t,"P",{});var Aa=a(_t);yr=i(Aa,"The abstract from the paper is the following:"),Aa.forEach(o),$o=m(t),vt=s(t,"P",{});var Ma=a(vt);Bt=s(Ma,"EM",{});var qa=a(Bt);wr=i(qa,"We introduce dense vision transformers, an architecture that leverages vision transformers in place of convolutional networks as a backbone for dense prediction tasks. We assemble tokens from various stages of the vision transformer into image-like representations at various resolutions and progressively combine them into full-resolution predictions using a convolutional decoder. The transformer backbone processes representations at a constant and relatively high resolution and has a global receptive field at every stage. These properties allow the dense vision transformer to provide finer-grained and more globally coherent predictions when compared to fully-convolutional networks. Our experiments show that this architecture yields substantial improvements on dense prediction tasks, especially when a large amount of training data is available. For monocular depth estimation, we observe an improvement of up to 28% in relative performance when compared to a state-of-the-art fully-convolutional network. When applied to semantic segmentation, dense vision transformers set a new state of the art on ADE20K with 49.02% mIoU. We further show that the architecture can be fine-tuned on smaller datasets such as NYUv2, KITTI, and Pascal Context where it also sets the new state of the art."),qa.forEach(o),Ma.forEach(o),xo=m(t),se=s(t,"IMG",{src:!0,alt:!0,width:!0}),ko=m(t),ae=s(t,"SMALL",{});var Bo=a(ae);Dr=i(Bo,"DPT architecture. Taken from the "),Ce=s(Bo,"A",{href:!0,target:!0});var Na=a(Ce);$r=i(Na,"original paper"),Na.forEach(o),xr=i(Bo,"."),Bo.forEach(o),Eo=m(t),L=s(t,"P",{});var Ct=a(L);kr=i(Ct,"This model was contributed by "),Ae=s(Ct,"A",{href:!0,rel:!0});var La=a(Ae);Er=i(La,"nielsr"),La.forEach(o),Ir=i(Ct,". The original code can be found "),Me=s(Ct,"A",{href:!0,rel:!0});var Oa=a(Me);zr=i(Oa,"here"),Oa.forEach(o),Fr=i(Ct,"."),Ct.forEach(o),Io=m(t),V=s(t,"H2",{class:!0});var Ko=a(V);ne=s(Ko,"A",{id:!0,class:!0,href:!0});var Ra=a(ne);Kt=s(Ra,"SPAN",{});var Va=a(Kt);b(qe.$$.fragment,Va),Va.forEach(o),Ra.forEach(o),Sr=m(Ko),Gt=s(Ko,"SPAN",{});var Wa=a(Gt);jr=i(Wa,"Resources"),Wa.forEach(o),Ko.forEach(o),zo=m(t),Tt=s(t,"P",{});var Ua=a(Tt);Cr=i(Ua,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with DPT."),Ua.forEach(o),Fo=m(t),ie=s(t,"UL",{});var Go=a(ie);W=s(Go,"LI",{});var At=a(W);Ar=i(At,"Demo notebooks for "),bt=s(At,"A",{href:!0});var Ha=a(bt);Mr=i(Ha,"DPTForDepthEstimation"),Ha.forEach(o),qr=i(At," can be found "),Ne=s(At,"A",{href:!0,rel:!0});var Ba=a(Ne);Nr=i(Ba,"here"),Ba.forEach(o),Lr=i(At,"."),At.forEach(o),Or=m(Go),Pt=s(Go,"LI",{});var Ia=a(Pt);Rr=i(Ia,"See also: "),yt=s(Ia,"A",{href:!0});var Ka=a(yt);Vr=i(Ka,"Semantic segmentation task guide"),Ka.forEach(o),Ia.forEach(o),Go.forEach(o),So=m(t),wt=s(t,"P",{});var Ga=a(wt);Wr=i(Ga,"If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),Ga.forEach(o),jo=m(t),U=s(t,"H2",{class:!0});var Yo=a(U);le=s(Yo,"A",{id:!0,class:!0,href:!0});var Ya=a(le);Yt=s(Ya,"SPAN",{});var Ja=a(Yt);b(Le.$$.fragment,Ja),Ja.forEach(o),Ya.forEach(o),Ur=m(Yo),Jt=s(Yo,"SPAN",{});var Xa=a(Jt);Hr=i(Xa,"DPTConfig"),Xa.forEach(o),Yo.forEach(o),Co=m(t),k=s(t,"DIV",{class:!0});var O=a(k);b(Oe.$$.fragment,O),Br=m(O),H=s(O,"P",{});var Mt=a(H);Kr=i(Mt,"This is the configuration class to store the configuration of a "),Dt=s(Mt,"A",{href:!0});var Qa=a(Dt);Gr=i(Qa,"DPTModel"),Qa.forEach(o),Yr=i(Mt,`. It is used to instantiate an DPT
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 DPT
`),Re=s(Mt,"A",{href:!0,rel:!0});var Za=a(Re);Jr=i(Za,"Intel/dpt-large"),Za.forEach(o),Xr=i(Mt," architecture."),Mt.forEach(o),Qr=m(O),B=s(O,"P",{});var qt=a(B);Zr=i(qt,"Configuration objects inherit from "),$t=s(qt,"A",{href:!0});var en=a($t);es=i(en,"PretrainedConfig"),en.forEach(o),ts=i(qt,` and can be used to control the model outputs. Read the
documentation from `),xt=s(qt,"A",{href:!0});var tn=a(xt);os=i(tn,"PretrainedConfig"),tn.forEach(o),rs=i(qt," for more information."),qt.forEach(o),ss=m(O),b(de.$$.fragment,O),as=m(O),ce=s(O,"DIV",{class:!0});var Jo=a(ce);b(Ve.$$.fragment,Jo),ns=m(Jo),K=s(Jo,"P",{});var Nt=a(K);is=i(Nt,"Serializes this instance to a Python dictionary. Override the default "),kt=s(Nt,"A",{href:!0});var on=a(kt);ls=i(on,"to_dict()"),on.forEach(o),ds=i(Nt,`. Returns:
`),Xt=s(Nt,"CODE",{});var rn=a(Xt);cs=i(rn,"Dict[str, any]"),rn.forEach(o),ms=i(Nt,": Dictionary of all the attributes that make up this configuration instance,"),Nt.forEach(o),Jo.forEach(o),O.forEach(o),Ao=m(t),G=s(t,"H2",{class:!0});var Xo=a(G);me=s(Xo,"A",{id:!0,class:!0,href:!0});var sn=a(me);Qt=s(sn,"SPAN",{});var an=a(Qt);b(We.$$.fragment,an),an.forEach(o),sn.forEach(o),ps=m(Xo),Zt=s(Xo,"SPAN",{});var nn=a(Zt);hs=i(nn,"DPTFeatureExtractor"),nn.forEach(o),Xo.forEach(o),Mo=m(t),M=s(t,"DIV",{class:!0});var Lt=a(M);b(Ue.$$.fragment,Lt),fs=m(Lt),pe=s(Lt,"DIV",{class:!0});var Qo=a(pe);b(He.$$.fragment,Qo),us=m(Qo),eo=s(Qo,"P",{});var ln=a(eo);gs=i(ln,"Preprocess an image or a batch of images."),ln.forEach(o),Qo.forEach(o),_s=m(Lt),he=s(Lt,"DIV",{class:!0});var Zo=a(he);b(Be.$$.fragment,Zo),vs=m(Zo),Ke=s(Zo,"P",{});var er=a(Ke);Ts=i(er,"Converts the output of "),Et=s(er,"A",{href:!0});var dn=a(Et);bs=i(dn,"DPTForSemanticSegmentation"),dn.forEach(o),Ps=i(er," into semantic segmentation maps. Only supports PyTorch."),er.forEach(o),Zo.forEach(o),Lt.forEach(o),qo=m(t),Y=s(t,"H2",{class:!0});var tr=a(Y);fe=s(tr,"A",{id:!0,class:!0,href:!0});var cn=a(fe);to=s(cn,"SPAN",{});var mn=a(to);b(Ge.$$.fragment,mn),mn.forEach(o),cn.forEach(o),ys=m(tr),oo=s(tr,"SPAN",{});var pn=a(oo);ws=i(pn,"DPTImageProcessor"),pn.forEach(o),tr.forEach(o),No=m(t),z=s(t,"DIV",{class:!0});var xe=a(z);b(Ye.$$.fragment,xe),Ds=m(xe),ro=s(xe,"P",{});var hn=a(ro);$s=i(hn,"Constructs a DPT image processor."),hn.forEach(o),xs=m(xe),ue=s(xe,"DIV",{class:!0});var or=a(ue);b(Je.$$.fragment,or),ks=m(or),so=s(or,"P",{});var fn=a(so);Es=i(fn,"Preprocess an image or batch of images."),fn.forEach(o),or.forEach(o),Is=m(xe),ge=s(xe,"DIV",{class:!0});var rr=a(ge);b(Xe.$$.fragment,rr),zs=m(rr),Qe=s(rr,"P",{});var sr=a(Qe);Fs=i(sr,"Converts the output of "),It=s(sr,"A",{href:!0});var un=a(It);Ss=i(un,"DPTForSemanticSegmentation"),un.forEach(o),js=i(sr," into semantic segmentation maps. Only supports PyTorch."),sr.forEach(o),rr.forEach(o),xe.forEach(o),Lo=m(t),J=s(t,"H2",{class:!0});var ar=a(J);_e=s(ar,"A",{id:!0,class:!0,href:!0});var gn=a(_e);ao=s(gn,"SPAN",{});var _n=a(ao);b(Ze.$$.fragment,_n),_n.forEach(o),gn.forEach(o),Cs=m(ar),no=s(ar,"SPAN",{});var vn=a(no);As=i(vn,"DPTModel"),vn.forEach(o),ar.forEach(o),Oo=m(t),q=s(t,"DIV",{class:!0});var Ot=a(q);b(et.$$.fragment,Ot),Ms=m(Ot),tt=s(Ot,"P",{});var nr=a(tt);qs=i(nr,`The bare DPT Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),ot=s(nr,"A",{href:!0,rel:!0});var Tn=a(ot);Ns=i(Tn,"torch.nn.Module"),Tn.forEach(o),Ls=i(nr,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),nr.forEach(o),Os=m(Ot),j=s(Ot,"DIV",{class:!0});var ke=a(j);b(rt.$$.fragment,ke),Rs=m(ke),X=s(ke,"P",{});var Rt=a(X);Vs=i(Rt,"The "),zt=s(Rt,"A",{href:!0});var bn=a(zt);Ws=i(bn,"DPTModel"),bn.forEach(o),Us=i(Rt," forward method, overrides the "),io=s(Rt,"CODE",{});var Pn=a(io);Hs=i(Pn,"__call__"),Pn.forEach(o),Bs=i(Rt," special method."),Rt.forEach(o),Ks=m(ke),b(ve.$$.fragment,ke),Gs=m(ke),b(Te.$$.fragment,ke),ke.forEach(o),Ot.forEach(o),Ro=m(t),Q=s(t,"H2",{class:!0});var ir=a(Q);be=s(ir,"A",{id:!0,class:!0,href:!0});var yn=a(be);lo=s(yn,"SPAN",{});var wn=a(lo);b(st.$$.fragment,wn),wn.forEach(o),yn.forEach(o),Ys=m(ir),co=s(ir,"SPAN",{});var Dn=a(co);Js=i(Dn,"DPTForDepthEstimation"),Dn.forEach(o),ir.forEach(o),Vo=m(t),F=s(t,"DIV",{class:!0});var Ee=a(F);b(at.$$.fragment,Ee),Xs=m(Ee),mo=s(Ee,"P",{});var $n=a(mo);Qs=i($n,"DPT Model with a depth estimation head on top (consisting of 3 convolutional layers) e.g. for KITTI, NYUv2."),$n.forEach(o),Zs=m(Ee),nt=s(Ee,"P",{});var lr=a(nt);ea=i(lr,"This model is a PyTorch "),it=s(lr,"A",{href:!0,rel:!0});var xn=a(it);ta=i(xn,"torch.nn.Module"),xn.forEach(o),oa=i(lr,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),lr.forEach(o),ra=m(Ee),C=s(Ee,"DIV",{class:!0});var Ie=a(C);b(lt.$$.fragment,Ie),sa=m(Ie),Z=s(Ie,"P",{});var Vt=a(Z);aa=i(Vt,"The "),Ft=s(Vt,"A",{href:!0});var kn=a(Ft);na=i(kn,"DPTForDepthEstimation"),kn.forEach(o),ia=i(Vt," forward method, overrides the "),po=s(Vt,"CODE",{});var En=a(po);la=i(En,"__call__"),En.forEach(o),da=i(Vt," special method."),Vt.forEach(o),ca=m(Ie),b(Pe.$$.fragment,Ie),ma=m(Ie),b(ye.$$.fragment,Ie),Ie.forEach(o),Ee.forEach(o),Wo=m(t),ee=s(t,"H2",{class:!0});var dr=a(ee);we=s(dr,"A",{id:!0,class:!0,href:!0});var In=a(we);ho=s(In,"SPAN",{});var zn=a(ho);b(dt.$$.fragment,zn),zn.forEach(o),In.forEach(o),pa=m(dr),fo=s(dr,"SPAN",{});var Fn=a(fo);ha=i(Fn,"DPTForSemanticSegmentation"),Fn.forEach(o),dr.forEach(o),Uo=m(t),S=s(t,"DIV",{class:!0});var ze=a(S);b(ct.$$.fragment,ze),fa=m(ze),uo=s(ze,"P",{});var Sn=a(uo);ua=i(Sn,"DPT Model with a semantic segmentation head on top e.g. for ADE20k, CityScapes."),Sn.forEach(o),ga=m(ze),mt=s(ze,"P",{});var cr=a(mt);_a=i(cr,"This model is a PyTorch "),pt=s(cr,"A",{href:!0,rel:!0});var jn=a(pt);va=i(jn,"torch.nn.Module"),jn.forEach(o),Ta=i(cr,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),cr.forEach(o),ba=m(ze),A=s(ze,"DIV",{class:!0});var Fe=a(A);b(ht.$$.fragment,Fe),Pa=m(Fe),te=s(Fe,"P",{});var Wt=a(te);ya=i(Wt,"The "),St=s(Wt,"A",{href:!0});var Cn=a(St);wa=i(Cn,"DPTForSemanticSegmentation"),Cn.forEach(o),Da=i(Wt," forward method, overrides the "),go=s(Wt,"CODE",{});var An=a(go);$a=i(An,"__call__"),An.forEach(o),xa=i(Wt," special method."),Wt.forEach(o),ka=m(Fe),b(De.$$.fragment,Fe),Ea=m(Fe),b($e.$$.fragment,Fe),Fe.forEach(o),ze.forEach(o),this.h()},h(){d(h,"name","hf:doc:metadata"),d(h,"content",JSON.stringify(Jn)),d(u,"id","dpt"),d(u,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(u,"href","#dpt"),d(_,"class","relative group"),d(re,"id","overview"),d(re,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(re,"href","#overview"),d(R,"class","relative group"),d(je,"href","https://arxiv.org/abs/2103.13413"),d(je,"rel","nofollow"),d(gt,"href","vit"),On(se.src,Fa="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/dpt_architecture.jpg")||d(se,"src",Fa),d(se,"alt","drawing"),d(se,"width","600"),d(Ce,"href","https://arxiv.org/abs/2103.13413"),d(Ce,"target","_blank"),d(Ae,"href","https://huggingface.co/nielsr"),d(Ae,"rel","nofollow"),d(Me,"href","https://github.com/isl-org/DPT"),d(Me,"rel","nofollow"),d(ne,"id","resources"),d(ne,"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(ne,"href","#resources"),d(V,"class","relative group"),d(bt,"href","/docs/transformers/v4.27.1/en/model_doc/dpt#transformers.DPTForDepthEstimation"),d(Ne,"href","https://github.com/NielsRogge/Transformers-Tutorials/tree/master/DPT"),d(Ne,"rel","nofollow"),d(yt,"href","./tasks/semantic_segmentation"),d(le,"id","transformers.DPTConfig"),d(le,"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(le,"href","#transformers.DPTConfig"),d(U,"class","relative group"),d(Dt,"href","/docs/transformers/v4.27.1/en/model_doc/dpt#transformers.DPTModel"),d(Re,"href","https://huggingface.co/Intel/dpt-large"),d(Re,"rel","nofollow"),d($t,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),d(xt,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),d(kt,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig.to_dict"),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(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(me,"id","transformers.DPTFeatureExtractor"),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.DPTFeatureExtractor"),d(G,"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(Et,"href","/docs/transformers/v4.27.1/en/model_doc/dpt#transformers.DPTForSemanticSegmentation"),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(M,"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.DPTImageProcessor"),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.DPTImageProcessor"),d(Y,"class","relative group"),d(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(It,"href","/docs/transformers/v4.27.1/en/model_doc/dpt#transformers.DPTForSemanticSegmentation"),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(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(_e,"id","transformers.DPTModel"),d(_e,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(_e,"href","#transformers.DPTModel"),d(J,"class","relative group"),d(ot,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(ot,"rel","nofollow"),d(zt,"href","/docs/transformers/v4.27.1/en/model_doc/dpt#transformers.DPTModel"),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(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(be,"id","transformers.DPTForDepthEstimation"),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.DPTForDepthEstimation"),d(Q,"class","relative group"),d(it,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(it,"rel","nofollow"),d(Ft,"href","/docs/transformers/v4.27.1/en/model_doc/dpt#transformers.DPTForDepthEstimation"),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(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(we,"id","transformers.DPTForSemanticSegmentation"),d(we,"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(we,"href","#transformers.DPTForSemanticSegmentation"),d(ee,"class","relative group"),d(pt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(pt,"rel","nofollow"),d(St,"href","/docs/transformers/v4.27.1/en/model_doc/dpt#transformers.DPTForSemanticSegmentation"),d(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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")},m(t,p){e(document.head,h),f(t,$,p),f(t,_,p),e(_,u),e(u,v),P(l,v,null),e(_,g),e(_,E),e(E,fr),f(t,yo,p),f(t,R,p),e(R,re),e(re,Ut),P(Se,Ut,null),e(R,ur),e(R,Ht),e(Ht,gr),f(t,wo,p),f(t,N,p),e(N,_r),e(N,je),e(je,vr),e(N,Tr),e(N,gt),e(gt,br),e(N,Pr),f(t,Do,p),f(t,_t,p),e(_t,yr),f(t,$o,p),f(t,vt,p),e(vt,Bt),e(Bt,wr),f(t,xo,p),f(t,se,p),f(t,ko,p),f(t,ae,p),e(ae,Dr),e(ae,Ce),e(Ce,$r),e(ae,xr),f(t,Eo,p),f(t,L,p),e(L,kr),e(L,Ae),e(Ae,Er),e(L,Ir),e(L,Me),e(Me,zr),e(L,Fr),f(t,Io,p),f(t,V,p),e(V,ne),e(ne,Kt),P(qe,Kt,null),e(V,Sr),e(V,Gt),e(Gt,jr),f(t,zo,p),f(t,Tt,p),e(Tt,Cr),f(t,Fo,p),f(t,ie,p),e(ie,W),e(W,Ar),e(W,bt),e(bt,Mr),e(W,qr),e(W,Ne),e(Ne,Nr),e(W,Lr),e(ie,Or),e(ie,Pt),e(Pt,Rr),e(Pt,yt),e(yt,Vr),f(t,So,p),f(t,wt,p),e(wt,Wr),f(t,jo,p),f(t,U,p),e(U,le),e(le,Yt),P(Le,Yt,null),e(U,Ur),e(U,Jt),e(Jt,Hr),f(t,Co,p),f(t,k,p),P(Oe,k,null),e(k,Br),e(k,H),e(H,Kr),e(H,Dt),e(Dt,Gr),e(H,Yr),e(H,Re),e(Re,Jr),e(H,Xr),e(k,Qr),e(k,B),e(B,Zr),e(B,$t),e($t,es),e(B,ts),e(B,xt),e(xt,os),e(B,rs),e(k,ss),P(de,k,null),e(k,as),e(k,ce),P(Ve,ce,null),e(ce,ns),e(ce,K),e(K,is),e(K,kt),e(kt,ls),e(K,ds),e(K,Xt),e(Xt,cs),e(K,ms),f(t,Ao,p),f(t,G,p),e(G,me),e(me,Qt),P(We,Qt,null),e(G,ps),e(G,Zt),e(Zt,hs),f(t,Mo,p),f(t,M,p),P(Ue,M,null),e(M,fs),e(M,pe),P(He,pe,null),e(pe,us),e(pe,eo),e(eo,gs),e(M,_s),e(M,he),P(Be,he,null),e(he,vs),e(he,Ke),e(Ke,Ts),e(Ke,Et),e(Et,bs),e(Ke,Ps),f(t,qo,p),f(t,Y,p),e(Y,fe),e(fe,to),P(Ge,to,null),e(Y,ys),e(Y,oo),e(oo,ws),f(t,No,p),f(t,z,p),P(Ye,z,null),e(z,Ds),e(z,ro),e(ro,$s),e(z,xs),e(z,ue),P(Je,ue,null),e(ue,ks),e(ue,so),e(so,Es),e(z,Is),e(z,ge),P(Xe,ge,null),e(ge,zs),e(ge,Qe),e(Qe,Fs),e(Qe,It),e(It,Ss),e(Qe,js),f(t,Lo,p),f(t,J,p),e(J,_e),e(_e,ao),P(Ze,ao,null),e(J,Cs),e(J,no),e(no,As),f(t,Oo,p),f(t,q,p),P(et,q,null),e(q,Ms),e(q,tt),e(tt,qs),e(tt,ot),e(ot,Ns),e(tt,Ls),e(q,Os),e(q,j),P(rt,j,null),e(j,Rs),e(j,X),e(X,Vs),e(X,zt),e(zt,Ws),e(X,Us),e(X,io),e(io,Hs),e(X,Bs),e(j,Ks),P(ve,j,null),e(j,Gs),P(Te,j,null),f(t,Ro,p),f(t,Q,p),e(Q,be),e(be,lo),P(st,lo,null),e(Q,Ys),e(Q,co),e(co,Js),f(t,Vo,p),f(t,F,p),P(at,F,null),e(F,Xs),e(F,mo),e(mo,Qs),e(F,Zs),e(F,nt),e(nt,ea),e(nt,it),e(it,ta),e(nt,oa),e(F,ra),e(F,C),P(lt,C,null),e(C,sa),e(C,Z),e(Z,aa),e(Z,Ft),e(Ft,na),e(Z,ia),e(Z,po),e(po,la),e(Z,da),e(C,ca),P(Pe,C,null),e(C,ma),P(ye,C,null),f(t,Wo,p),f(t,ee,p),e(ee,we),e(we,ho),P(dt,ho,null),e(ee,pa),e(ee,fo),e(fo,ha),f(t,Uo,p),f(t,S,p),P(ct,S,null),e(S,fa),e(S,uo),e(uo,ua),e(S,ga),e(S,mt),e(mt,_a),e(mt,pt),e(pt,va),e(mt,Ta),e(S,ba),e(S,A),P(ht,A,null),e(A,Pa),e(A,te),e(te,ya),e(te,St),e(St,wa),e(te,Da),e(te,go),e(go,$a),e(te,xa),e(A,ka),P(De,A,null),e(A,Ea),P($e,A,null),Ho=!0},p(t,[p]){const ft={};p&2&&(ft.$$scope={dirty:p,ctx:t}),de.$set(ft);const _o={};p&2&&(_o.$$scope={dirty:p,ctx:t}),ve.$set(_o);const vo={};p&2&&(vo.$$scope={dirty:p,ctx:t}),Te.$set(vo);const To={};p&2&&(To.$$scope={dirty:p,ctx:t}),Pe.$set(To);const ut={};p&2&&(ut.$$scope={dirty:p,ctx:t}),ye.$set(ut);const bo={};p&2&&(bo.$$scope={dirty:p,ctx:t}),De.$set(bo);const Po={};p&2&&(Po.$$scope={dirty:p,ctx:t}),$e.$set(Po)},i(t){Ho||(y(l.$$.fragment,t),y(Se.$$.fragment,t),y(qe.$$.fragment,t),y(Le.$$.fragment,t),y(Oe.$$.fragment,t),y(de.$$.fragment,t),y(Ve.$$.fragment,t),y(We.$$.fragment,t),y(Ue.$$.fragment,t),y(He.$$.fragment,t),y(Be.$$.fragment,t),y(Ge.$$.fragment,t),y(Ye.$$.fragment,t),y(Je.$$.fragment,t),y(Xe.$$.fragment,t),y(Ze.$$.fragment,t),y(et.$$.fragment,t),y(rt.$$.fragment,t),y(ve.$$.fragment,t),y(Te.$$.fragment,t),y(st.$$.fragment,t),y(at.$$.fragment,t),y(lt.$$.fragment,t),y(Pe.$$.fragment,t),y(ye.$$.fragment,t),y(dt.$$.fragment,t),y(ct.$$.fragment,t),y(ht.$$.fragment,t),y(De.$$.fragment,t),y($e.$$.fragment,t),Ho=!0)},o(t){w(l.$$.fragment,t),w(Se.$$.fragment,t),w(qe.$$.fragment,t),w(Le.$$.fragment,t),w(Oe.$$.fragment,t),w(de.$$.fragment,t),w(Ve.$$.fragment,t),w(We.$$.fragment,t),w(Ue.$$.fragment,t),w(He.$$.fragment,t),w(Be.$$.fragment,t),w(Ge.$$.fragment,t),w(Ye.$$.fragment,t),w(Je.$$.fragment,t),w(Xe.$$.fragment,t),w(Ze.$$.fragment,t),w(et.$$.fragment,t),w(rt.$$.fragment,t),w(ve.$$.fragment,t),w(Te.$$.fragment,t),w(st.$$.fragment,t),w(at.$$.fragment,t),w(lt.$$.fragment,t),w(Pe.$$.fragment,t),w(ye.$$.fragment,t),w(dt.$$.fragment,t),w(ct.$$.fragment,t),w(ht.$$.fragment,t),w(De.$$.fragment,t),w($e.$$.fragment,t),Ho=!1},d(t){o(h),t&&o($),t&&o(_),D(l),t&&o(yo),t&&o(R),D(Se),t&&o(wo),t&&o(N),t&&o(Do),t&&o(_t),t&&o($o),t&&o(vt),t&&o(xo),t&&o(se),t&&o(ko),t&&o(ae),t&&o(Eo),t&&o(L),t&&o(Io),t&&o(V),D(qe),t&&o(zo),t&&o(Tt),t&&o(Fo),t&&o(ie),t&&o(So),t&&o(wt),t&&o(jo),t&&o(U),D(Le),t&&o(Co),t&&o(k),D(Oe),D(de),D(Ve),t&&o(Ao),t&&o(G),D(We),t&&o(Mo),t&&o(M),D(Ue),D(He),D(Be),t&&o(qo),t&&o(Y),D(Ge),t&&o(No),t&&o(z),D(Ye),D(Je),D(Xe),t&&o(Lo),t&&o(J),D(Ze),t&&o(Oo),t&&o(q),D(et),D(rt),D(ve),D(Te),t&&o(Ro),t&&o(Q),D(st),t&&o(Vo),t&&o(F),D(at),D(lt),D(Pe),D(ye),t&&o(Wo),t&&o(ee),D(dt),t&&o(Uo),t&&o(S),D(ct),D(ht),D(De),D($e)}}}const Jn={local:"dpt",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{local:"transformers.DPTConfig",title:"DPTConfig"},{local:"transformers.DPTFeatureExtractor",title:"DPTFeatureExtractor"},{local:"transformers.DPTImageProcessor",title:"DPTImageProcessor"},{local:"transformers.DPTModel",title:"DPTModel"},{local:"transformers.DPTForDepthEstimation",title:"DPTForDepthEstimation"},{local:"transformers.DPTForSemanticSegmentation",title:"DPTForSemanticSegmentation"}],title:"DPT"};function Xn(x){return Rn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class si extends Mn{constructor(h){super();qn(this,h,Xn,Yn,Nn,{})}}export{si as default,Jn as metadata};
