import{S as Ia,i as za,s as Fa,e as r,k as c,w as T,t as a,M as ja,c as s,d as o,m,a as n,x as b,h as i,b as d,N as Sa,G as t,g as f,y as P,q as y,o as w,B as D,v as Ca,L as dr}from"../../chunks/vendor-hf-doc-builder.js";import{T as Dn}from"../../chunks/Tip-hf-doc-builder.js";import{D as I}from"../../chunks/Docstring-hf-doc-builder.js";import{C as cr}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as oe}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as lr}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Aa(x){let h,$,_,u,v;return u=new cr({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"),$=a("Example:"),_=c(),T(u.$$.fragment)},l(l){h=s(l,"P",{});var g=n(h);$=i(g,"Example:"),g.forEach(o),_=m(l),b(u.$$.fragment,l)},m(l,g){f(l,h,g),t(h,$),f(l,_,g),P(u,l,g),v=!0},p:dr,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 qa(x){let h,$,_,u,v;return{c(){h=r("p"),$=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=r("code"),u=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){h=s(l,"P",{});var g=n(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=n(_);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),t(h,$),t(h,_),t(_,u),t(h,v)},d(l){l&&o(h)}}}function Ma(x){let h,$,_,u,v;return u=new cr({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"),$=a("Example:"),_=c(),T(u.$$.fragment)},l(l){h=s(l,"P",{});var g=n(h);$=i(g,"Example:"),g.forEach(o),_=m(l),b(u.$$.fragment,l)},m(l,g){f(l,h,g),t(h,$),f(l,_,g),P(u,l,g),v=!0},p:dr,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 Na(x){let h,$,_,u,v;return{c(){h=r("p"),$=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=r("code"),u=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){h=s(l,"P",{});var g=n(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=n(_);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),t(h,$),t(h,_),t(_,u),t(h,v)},d(l){l&&o(h)}}}function La(x){let h,$,_,u,v;return u=new cr({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"),$=a("Examples:"),_=c(),T(u.$$.fragment)},l(l){h=s(l,"P",{});var g=n(h);$=i(g,"Examples:"),g.forEach(o),_=m(l),b(u.$$.fragment,l)},m(l,g){f(l,h,g),t(h,$),f(l,_,g),P(u,l,g),v=!0},p:dr,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 Oa(x){let h,$,_,u,v;return{c(){h=r("p"),$=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=r("code"),u=a("Module"),v=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){h=s(l,"P",{});var g=n(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=n(_);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),t(h,$),t(h,_),t(_,u),t(h,v)},d(l){l&&o(h)}}}function Ra(x){let h,$,_,u,v;return u=new cr({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"),$=a("Examples:"),_=c(),T(u.$$.fragment)},l(l){h=s(l,"P",{});var g=n(h);$=i(g,"Examples:"),g.forEach(o),_=m(l),b(u.$$.fragment,l)},m(l,g){f(l,h,g),t(h,$),f(l,_,g),P(u,l,g),v=!0},p:dr,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 Wa(x){let h,$,_,u,v,l,g,E,mr,bo,R,re,Wt,Fe,pr,Ut,hr,Po,N,fr,je,ur,gr,ut,_r,vr,yo,gt,Tr,wo,_t,Vt,br,Do,se,$n,$o,ne,Pr,Se,yr,wr,xo,L,Dr,Ce,$r,xr,Ae,kr,Er,ko,W,ae,Ht,qe,Ir,Bt,zr,Eo,vt,Fr,Io,Tt,U,jr,bt,Sr,Cr,Me,Ar,qr,zo,Pt,Mr,Fo,V,ie,Kt,Ne,Nr,Gt,Lr,jo,k,Le,Or,H,Rr,yt,Wr,Ur,Oe,Vr,Hr,Br,B,Kr,wt,Gr,Yr,Dt,Jr,Xr,Qr,le,Zr,de,Re,es,K,ts,$t,os,rs,Yt,ss,ns,So,G,ce,Jt,We,as,Xt,is,Co,q,Ue,ls,me,Ve,ds,Qt,cs,ms,pe,He,ps,Be,hs,xt,fs,us,Ao,Y,he,Zt,Ke,gs,eo,_s,qo,z,Ge,vs,to,Ts,bs,fe,Ye,Ps,oo,ys,ws,ue,Je,Ds,Xe,$s,kt,xs,ks,Mo,J,ge,ro,Qe,Es,so,Is,No,M,Ze,zs,et,Fs,tt,js,Ss,Cs,S,ot,As,X,qs,Et,Ms,Ns,no,Ls,Os,Rs,_e,Ws,ve,Lo,Q,Te,ao,rt,Us,io,Vs,Oo,F,st,Hs,lo,Bs,Ks,nt,Gs,at,Ys,Js,Xs,C,it,Qs,Z,Zs,It,en,tn,co,on,rn,sn,be,nn,Pe,Ro,ee,ye,mo,lt,an,po,ln,Wo,j,dt,dn,ho,cn,mn,ct,pn,mt,hn,fn,un,A,pt,gn,te,_n,zt,vn,Tn,fo,bn,Pn,yn,we,wn,De,Uo;return l=new oe({}),Fe=new oe({}),qe=new oe({}),Ne=new oe({}),Le=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/main/src/transformers/models/dpt/configuration_dpt.py#L32"}}),le=new lr({props:{anchor:"transformers.DPTConfig.example",$$slots:{default:[Aa]},$$scope:{ctx:x}}}),Re=new I({props:{name:"to_dict",anchor:"transformers.DPTConfig.to_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/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/main/src/transformers/models/dpt/feature_extraction_dpt.py#L26"}}),Ve=new I({props:{name:"__call__",anchor:"transformers.DPTFeatureExtractor.__call__",parameters:[{name:"images",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/image_processing_utils.py#L448"}}),He=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/main/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/main/src/transformers/models/dpt/image_processing_dpt.py#L345",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>
`}}),Ke=new oe({}),Ge=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/main/src/transformers/models/dpt/image_processing_dpt.py#L91"}}),Ye=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[transformers.utils.generic.TensorType, str, 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/main/src/transformers/models/dpt/image_processing_dpt.py#L240"}}),Je=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/main/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/main/src/transformers/models/dpt/image_processing_dpt.py#L345",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>
`}}),Qe=new oe({}),Ze=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/dpt/modeling_dpt.py#L866"}}),ot=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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/poolformer#transformers.PoolFormerFeatureExtractor.__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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/dpt/modeling_dpt.py#L898",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/main/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>
`}}),_e=new Dn({props:{$$slots:{default:[qa]},$$scope:{ctx:x}}}),ve=new lr({props:{anchor:"transformers.DPTModel.forward.example",$$slots:{default:[Ma]},$$scope:{ctx:x}}}),rt=new oe({}),st=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/dpt/modeling_dpt.py#L1054"}}),it=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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/poolformer#transformers.PoolFormerFeatureExtractor.__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/main/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/main/src/transformers/models/dpt/modeling_dpt.py#L1069",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_outputs.DepthEstimatorOutput"
>transformers.modeling_outputs.DepthEstimatorOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),be=new Dn({props:{$$slots:{default:[Na]},$$scope:{ctx:x}}}),Pe=new lr({props:{anchor:"transformers.DPTForDepthEstimation.forward.example",$$slots:{default:[La]},$$scope:{ctx:x}}}),lt=new oe({}),dt=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/dpt/modeling_dpt.py#L1222"}}),pt=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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/poolformer#transformers.PoolFormerFeatureExtractor.__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/main/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/main/src/transformers/models/dpt/modeling_dpt.py#L1238",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_outputs.SemanticSegmenterOutput"
>transformers.modeling_outputs.SemanticSegmenterOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),we=new Dn({props:{$$slots:{default:[Oa]},$$scope:{ctx:x}}}),De=new lr({props:{anchor:"transformers.DPTForSemanticSegmentation.forward.example",$$slots:{default:[Ra]},$$scope:{ctx:x}}}),{c(){h=r("meta"),$=c(),_=r("h1"),u=r("a"),v=r("span"),T(l.$$.fragment),g=c(),E=r("span"),mr=a("DPT"),bo=c(),R=r("h2"),re=r("a"),Wt=r("span"),T(Fe.$$.fragment),pr=c(),Ut=r("span"),hr=a("Overview"),Po=c(),N=r("p"),fr=a("The DPT model was proposed in "),je=r("a"),ur=a("Vision Transformers for Dense Prediction"),gr=a(` by Ren\xE9 Ranftl, Alexey Bochkovskiy, Vladlen Koltun.
DPT is a model that leverages the `),ut=r("a"),_r=a("Vision Transformer (ViT)"),vr=a(" as backbone for dense prediction tasks like semantic segmentation and depth estimation."),yo=c(),gt=r("p"),Tr=a("The abstract from the paper is the following:"),wo=c(),_t=r("p"),Vt=r("em"),br=a("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."),Do=c(),se=r("img"),$o=c(),ne=r("small"),Pr=a("DPT architecture. Taken from the "),Se=r("a"),yr=a("original paper"),wr=a("."),xo=c(),L=r("p"),Dr=a("This model was contributed by "),Ce=r("a"),$r=a("nielsr"),xr=a(". The original code can be found "),Ae=r("a"),kr=a("here"),Er=a("."),ko=c(),W=r("h2"),ae=r("a"),Ht=r("span"),T(qe.$$.fragment),Ir=c(),Bt=r("span"),zr=a("Resources"),Eo=c(),vt=r("p"),Fr=a("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with DPT."),Io=c(),Tt=r("ul"),U=r("li"),jr=a("Demo notebooks for "),bt=r("a"),Sr=a("DPTForDepthEstimation"),Cr=a(" can be found "),Me=r("a"),Ar=a("here"),qr=a("."),zo=c(),Pt=r("p"),Mr=a("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."),Fo=c(),V=r("h2"),ie=r("a"),Kt=r("span"),T(Ne.$$.fragment),Nr=c(),Gt=r("span"),Lr=a("DPTConfig"),jo=c(),k=r("div"),T(Le.$$.fragment),Or=c(),H=r("p"),Rr=a("This is the configuration class to store the configuration of a "),yt=r("a"),Wr=a("DPTModel"),Ur=a(`. 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
`),Oe=r("a"),Vr=a("Intel/dpt-large"),Hr=a(" architecture."),Br=c(),B=r("p"),Kr=a("Configuration objects inherit from "),wt=r("a"),Gr=a("PretrainedConfig"),Yr=a(` and can be used to control the model outputs. Read the
documentation from `),Dt=r("a"),Jr=a("PretrainedConfig"),Xr=a(" for more information."),Qr=c(),T(le.$$.fragment),Zr=c(),de=r("div"),T(Re.$$.fragment),es=c(),K=r("p"),ts=a("Serializes this instance to a Python dictionary. Override the default "),$t=r("a"),os=a("to_dict()"),rs=a(`. Returns:
`),Yt=r("code"),ss=a("Dict[str, any]"),ns=a(": Dictionary of all the attributes that make up this configuration instance,"),So=c(),G=r("h2"),ce=r("a"),Jt=r("span"),T(We.$$.fragment),as=c(),Xt=r("span"),is=a("DPTFeatureExtractor"),Co=c(),q=r("div"),T(Ue.$$.fragment),ls=c(),me=r("div"),T(Ve.$$.fragment),ds=c(),Qt=r("p"),cs=a("Preprocess an image or a batch of images."),ms=c(),pe=r("div"),T(He.$$.fragment),ps=c(),Be=r("p"),hs=a("Converts the output of "),xt=r("a"),fs=a("DPTForSemanticSegmentation"),us=a(" into semantic segmentation maps. Only supports PyTorch."),Ao=c(),Y=r("h2"),he=r("a"),Zt=r("span"),T(Ke.$$.fragment),gs=c(),eo=r("span"),_s=a("DPTImageProcessor"),qo=c(),z=r("div"),T(Ge.$$.fragment),vs=c(),to=r("p"),Ts=a("Constructs a DPT image processor."),bs=c(),fe=r("div"),T(Ye.$$.fragment),Ps=c(),oo=r("p"),ys=a("Preprocess an image or batch of images."),ws=c(),ue=r("div"),T(Je.$$.fragment),Ds=c(),Xe=r("p"),$s=a("Converts the output of "),kt=r("a"),xs=a("DPTForSemanticSegmentation"),ks=a(" into semantic segmentation maps. Only supports PyTorch."),Mo=c(),J=r("h2"),ge=r("a"),ro=r("span"),T(Qe.$$.fragment),Es=c(),so=r("span"),Is=a("DPTModel"),No=c(),M=r("div"),T(Ze.$$.fragment),zs=c(),et=r("p"),Fs=a(`The bare DPT Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),tt=r("a"),js=a("torch.nn.Module"),Ss=a(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Cs=c(),S=r("div"),T(ot.$$.fragment),As=c(),X=r("p"),qs=a("The "),Et=r("a"),Ms=a("DPTModel"),Ns=a(" forward method, overrides the "),no=r("code"),Ls=a("__call__"),Os=a(" special method."),Rs=c(),T(_e.$$.fragment),Ws=c(),T(ve.$$.fragment),Lo=c(),Q=r("h2"),Te=r("a"),ao=r("span"),T(rt.$$.fragment),Us=c(),io=r("span"),Vs=a("DPTForDepthEstimation"),Oo=c(),F=r("div"),T(st.$$.fragment),Hs=c(),lo=r("p"),Bs=a("DPT Model with a depth estimation head on top (consisting of 3 convolutional layers) e.g. for KITTI, NYUv2."),Ks=c(),nt=r("p"),Gs=a("This model is a PyTorch "),at=r("a"),Ys=a("torch.nn.Module"),Js=a(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Xs=c(),C=r("div"),T(it.$$.fragment),Qs=c(),Z=r("p"),Zs=a("The "),It=r("a"),en=a("DPTForDepthEstimation"),tn=a(" forward method, overrides the "),co=r("code"),on=a("__call__"),rn=a(" special method."),sn=c(),T(be.$$.fragment),nn=c(),T(Pe.$$.fragment),Ro=c(),ee=r("h2"),ye=r("a"),mo=r("span"),T(lt.$$.fragment),an=c(),po=r("span"),ln=a("DPTForSemanticSegmentation"),Wo=c(),j=r("div"),T(dt.$$.fragment),dn=c(),ho=r("p"),cn=a("DPT Model with a semantic segmentation head on top e.g. for ADE20k, CityScapes."),mn=c(),ct=r("p"),pn=a("This model is a PyTorch "),mt=r("a"),hn=a("torch.nn.Module"),fn=a(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),un=c(),A=r("div"),T(pt.$$.fragment),gn=c(),te=r("p"),_n=a("The "),zt=r("a"),vn=a("DPTForSemanticSegmentation"),Tn=a(" forward method, overrides the "),fo=r("code"),bn=a("__call__"),Pn=a(" special method."),yn=c(),T(we.$$.fragment),wn=c(),T(De.$$.fragment),this.h()},l(e){const p=ja('[data-svelte="svelte-1phssyn"]',document.head);h=s(p,"META",{name:!0,content:!0}),p.forEach(o),$=m(e),_=s(e,"H1",{class:!0});var ht=n(_);u=s(ht,"A",{id:!0,class:!0,href:!0});var uo=n(u);v=s(uo,"SPAN",{});var go=n(v);b(l.$$.fragment,go),go.forEach(o),uo.forEach(o),g=m(ht),E=s(ht,"SPAN",{});var _o=n(E);mr=i(_o,"DPT"),_o.forEach(o),ht.forEach(o),bo=m(e),R=s(e,"H2",{class:!0});var ft=n(R);re=s(ft,"A",{id:!0,class:!0,href:!0});var vo=n(re);Wt=s(vo,"SPAN",{});var To=n(Wt);b(Fe.$$.fragment,To),To.forEach(o),vo.forEach(o),pr=m(ft),Ut=s(ft,"SPAN",{});var xn=n(Ut);hr=i(xn,"Overview"),xn.forEach(o),ft.forEach(o),Po=m(e),N=s(e,"P",{});var Ft=n(N);fr=i(Ft,"The DPT model was proposed in "),je=s(Ft,"A",{href:!0,rel:!0});var kn=n(je);ur=i(kn,"Vision Transformers for Dense Prediction"),kn.forEach(o),gr=i(Ft,` by Ren\xE9 Ranftl, Alexey Bochkovskiy, Vladlen Koltun.
DPT is a model that leverages the `),ut=s(Ft,"A",{href:!0});var En=n(ut);_r=i(En,"Vision Transformer (ViT)"),En.forEach(o),vr=i(Ft," as backbone for dense prediction tasks like semantic segmentation and depth estimation."),Ft.forEach(o),yo=m(e),gt=s(e,"P",{});var In=n(gt);Tr=i(In,"The abstract from the paper is the following:"),In.forEach(o),wo=m(e),_t=s(e,"P",{});var zn=n(_t);Vt=s(zn,"EM",{});var Fn=n(Vt);br=i(Fn,"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."),Fn.forEach(o),zn.forEach(o),Do=m(e),se=s(e,"IMG",{src:!0,alt:!0,width:!0}),$o=m(e),ne=s(e,"SMALL",{});var Vo=n(ne);Pr=i(Vo,"DPT architecture. Taken from the "),Se=s(Vo,"A",{href:!0,target:!0});var jn=n(Se);yr=i(jn,"original paper"),jn.forEach(o),wr=i(Vo,"."),Vo.forEach(o),xo=m(e),L=s(e,"P",{});var jt=n(L);Dr=i(jt,"This model was contributed by "),Ce=s(jt,"A",{href:!0,rel:!0});var Sn=n(Ce);$r=i(Sn,"nielsr"),Sn.forEach(o),xr=i(jt,". The original code can be found "),Ae=s(jt,"A",{href:!0,rel:!0});var Cn=n(Ae);kr=i(Cn,"here"),Cn.forEach(o),Er=i(jt,"."),jt.forEach(o),ko=m(e),W=s(e,"H2",{class:!0});var Ho=n(W);ae=s(Ho,"A",{id:!0,class:!0,href:!0});var An=n(ae);Ht=s(An,"SPAN",{});var qn=n(Ht);b(qe.$$.fragment,qn),qn.forEach(o),An.forEach(o),Ir=m(Ho),Bt=s(Ho,"SPAN",{});var Mn=n(Bt);zr=i(Mn,"Resources"),Mn.forEach(o),Ho.forEach(o),Eo=m(e),vt=s(e,"P",{});var Nn=n(vt);Fr=i(Nn,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with DPT."),Nn.forEach(o),Io=m(e),Tt=s(e,"UL",{});var Ln=n(Tt);U=s(Ln,"LI",{});var St=n(U);jr=i(St,"Demo notebooks for "),bt=s(St,"A",{href:!0});var On=n(bt);Sr=i(On,"DPTForDepthEstimation"),On.forEach(o),Cr=i(St," can be found "),Me=s(St,"A",{href:!0,rel:!0});var Rn=n(Me);Ar=i(Rn,"here"),Rn.forEach(o),qr=i(St,"."),St.forEach(o),Ln.forEach(o),zo=m(e),Pt=s(e,"P",{});var Wn=n(Pt);Mr=i(Wn,"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."),Wn.forEach(o),Fo=m(e),V=s(e,"H2",{class:!0});var Bo=n(V);ie=s(Bo,"A",{id:!0,class:!0,href:!0});var Un=n(ie);Kt=s(Un,"SPAN",{});var Vn=n(Kt);b(Ne.$$.fragment,Vn),Vn.forEach(o),Un.forEach(o),Nr=m(Bo),Gt=s(Bo,"SPAN",{});var Hn=n(Gt);Lr=i(Hn,"DPTConfig"),Hn.forEach(o),Bo.forEach(o),jo=m(e),k=s(e,"DIV",{class:!0});var O=n(k);b(Le.$$.fragment,O),Or=m(O),H=s(O,"P",{});var Ct=n(H);Rr=i(Ct,"This is the configuration class to store the configuration of a "),yt=s(Ct,"A",{href:!0});var Bn=n(yt);Wr=i(Bn,"DPTModel"),Bn.forEach(o),Ur=i(Ct,`. 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
`),Oe=s(Ct,"A",{href:!0,rel:!0});var Kn=n(Oe);Vr=i(Kn,"Intel/dpt-large"),Kn.forEach(o),Hr=i(Ct," architecture."),Ct.forEach(o),Br=m(O),B=s(O,"P",{});var At=n(B);Kr=i(At,"Configuration objects inherit from "),wt=s(At,"A",{href:!0});var Gn=n(wt);Gr=i(Gn,"PretrainedConfig"),Gn.forEach(o),Yr=i(At,` and can be used to control the model outputs. Read the
documentation from `),Dt=s(At,"A",{href:!0});var Yn=n(Dt);Jr=i(Yn,"PretrainedConfig"),Yn.forEach(o),Xr=i(At," for more information."),At.forEach(o),Qr=m(O),b(le.$$.fragment,O),Zr=m(O),de=s(O,"DIV",{class:!0});var Ko=n(de);b(Re.$$.fragment,Ko),es=m(Ko),K=s(Ko,"P",{});var qt=n(K);ts=i(qt,"Serializes this instance to a Python dictionary. Override the default "),$t=s(qt,"A",{href:!0});var Jn=n($t);os=i(Jn,"to_dict()"),Jn.forEach(o),rs=i(qt,`. Returns:
`),Yt=s(qt,"CODE",{});var Xn=n(Yt);ss=i(Xn,"Dict[str, any]"),Xn.forEach(o),ns=i(qt,": Dictionary of all the attributes that make up this configuration instance,"),qt.forEach(o),Ko.forEach(o),O.forEach(o),So=m(e),G=s(e,"H2",{class:!0});var Go=n(G);ce=s(Go,"A",{id:!0,class:!0,href:!0});var Qn=n(ce);Jt=s(Qn,"SPAN",{});var Zn=n(Jt);b(We.$$.fragment,Zn),Zn.forEach(o),Qn.forEach(o),as=m(Go),Xt=s(Go,"SPAN",{});var ea=n(Xt);is=i(ea,"DPTFeatureExtractor"),ea.forEach(o),Go.forEach(o),Co=m(e),q=s(e,"DIV",{class:!0});var Mt=n(q);b(Ue.$$.fragment,Mt),ls=m(Mt),me=s(Mt,"DIV",{class:!0});var Yo=n(me);b(Ve.$$.fragment,Yo),ds=m(Yo),Qt=s(Yo,"P",{});var ta=n(Qt);cs=i(ta,"Preprocess an image or a batch of images."),ta.forEach(o),Yo.forEach(o),ms=m(Mt),pe=s(Mt,"DIV",{class:!0});var Jo=n(pe);b(He.$$.fragment,Jo),ps=m(Jo),Be=s(Jo,"P",{});var Xo=n(Be);hs=i(Xo,"Converts the output of "),xt=s(Xo,"A",{href:!0});var oa=n(xt);fs=i(oa,"DPTForSemanticSegmentation"),oa.forEach(o),us=i(Xo," into semantic segmentation maps. Only supports PyTorch."),Xo.forEach(o),Jo.forEach(o),Mt.forEach(o),Ao=m(e),Y=s(e,"H2",{class:!0});var Qo=n(Y);he=s(Qo,"A",{id:!0,class:!0,href:!0});var ra=n(he);Zt=s(ra,"SPAN",{});var sa=n(Zt);b(Ke.$$.fragment,sa),sa.forEach(o),ra.forEach(o),gs=m(Qo),eo=s(Qo,"SPAN",{});var na=n(eo);_s=i(na,"DPTImageProcessor"),na.forEach(o),Qo.forEach(o),qo=m(e),z=s(e,"DIV",{class:!0});var $e=n(z);b(Ge.$$.fragment,$e),vs=m($e),to=s($e,"P",{});var aa=n(to);Ts=i(aa,"Constructs a DPT image processor."),aa.forEach(o),bs=m($e),fe=s($e,"DIV",{class:!0});var Zo=n(fe);b(Ye.$$.fragment,Zo),Ps=m(Zo),oo=s(Zo,"P",{});var ia=n(oo);ys=i(ia,"Preprocess an image or batch of images."),ia.forEach(o),Zo.forEach(o),ws=m($e),ue=s($e,"DIV",{class:!0});var er=n(ue);b(Je.$$.fragment,er),Ds=m(er),Xe=s(er,"P",{});var tr=n(Xe);$s=i(tr,"Converts the output of "),kt=s(tr,"A",{href:!0});var la=n(kt);xs=i(la,"DPTForSemanticSegmentation"),la.forEach(o),ks=i(tr," into semantic segmentation maps. Only supports PyTorch."),tr.forEach(o),er.forEach(o),$e.forEach(o),Mo=m(e),J=s(e,"H2",{class:!0});var or=n(J);ge=s(or,"A",{id:!0,class:!0,href:!0});var da=n(ge);ro=s(da,"SPAN",{});var ca=n(ro);b(Qe.$$.fragment,ca),ca.forEach(o),da.forEach(o),Es=m(or),so=s(or,"SPAN",{});var ma=n(so);Is=i(ma,"DPTModel"),ma.forEach(o),or.forEach(o),No=m(e),M=s(e,"DIV",{class:!0});var Nt=n(M);b(Ze.$$.fragment,Nt),zs=m(Nt),et=s(Nt,"P",{});var rr=n(et);Fs=i(rr,`The bare DPT Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),tt=s(rr,"A",{href:!0,rel:!0});var pa=n(tt);js=i(pa,"torch.nn.Module"),pa.forEach(o),Ss=i(rr,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),rr.forEach(o),Cs=m(Nt),S=s(Nt,"DIV",{class:!0});var xe=n(S);b(ot.$$.fragment,xe),As=m(xe),X=s(xe,"P",{});var Lt=n(X);qs=i(Lt,"The "),Et=s(Lt,"A",{href:!0});var ha=n(Et);Ms=i(ha,"DPTModel"),ha.forEach(o),Ns=i(Lt," forward method, overrides the "),no=s(Lt,"CODE",{});var fa=n(no);Ls=i(fa,"__call__"),fa.forEach(o),Os=i(Lt," special method."),Lt.forEach(o),Rs=m(xe),b(_e.$$.fragment,xe),Ws=m(xe),b(ve.$$.fragment,xe),xe.forEach(o),Nt.forEach(o),Lo=m(e),Q=s(e,"H2",{class:!0});var sr=n(Q);Te=s(sr,"A",{id:!0,class:!0,href:!0});var ua=n(Te);ao=s(ua,"SPAN",{});var ga=n(ao);b(rt.$$.fragment,ga),ga.forEach(o),ua.forEach(o),Us=m(sr),io=s(sr,"SPAN",{});var _a=n(io);Vs=i(_a,"DPTForDepthEstimation"),_a.forEach(o),sr.forEach(o),Oo=m(e),F=s(e,"DIV",{class:!0});var ke=n(F);b(st.$$.fragment,ke),Hs=m(ke),lo=s(ke,"P",{});var va=n(lo);Bs=i(va,"DPT Model with a depth estimation head on top (consisting of 3 convolutional layers) e.g. for KITTI, NYUv2."),va.forEach(o),Ks=m(ke),nt=s(ke,"P",{});var nr=n(nt);Gs=i(nr,"This model is a PyTorch "),at=s(nr,"A",{href:!0,rel:!0});var Ta=n(at);Ys=i(Ta,"torch.nn.Module"),Ta.forEach(o),Js=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),Xs=m(ke),C=s(ke,"DIV",{class:!0});var Ee=n(C);b(it.$$.fragment,Ee),Qs=m(Ee),Z=s(Ee,"P",{});var Ot=n(Z);Zs=i(Ot,"The "),It=s(Ot,"A",{href:!0});var ba=n(It);en=i(ba,"DPTForDepthEstimation"),ba.forEach(o),tn=i(Ot," forward method, overrides the "),co=s(Ot,"CODE",{});var Pa=n(co);on=i(Pa,"__call__"),Pa.forEach(o),rn=i(Ot," special method."),Ot.forEach(o),sn=m(Ee),b(be.$$.fragment,Ee),nn=m(Ee),b(Pe.$$.fragment,Ee),Ee.forEach(o),ke.forEach(o),Ro=m(e),ee=s(e,"H2",{class:!0});var ar=n(ee);ye=s(ar,"A",{id:!0,class:!0,href:!0});var ya=n(ye);mo=s(ya,"SPAN",{});var wa=n(mo);b(lt.$$.fragment,wa),wa.forEach(o),ya.forEach(o),an=m(ar),po=s(ar,"SPAN",{});var Da=n(po);ln=i(Da,"DPTForSemanticSegmentation"),Da.forEach(o),ar.forEach(o),Wo=m(e),j=s(e,"DIV",{class:!0});var Ie=n(j);b(dt.$$.fragment,Ie),dn=m(Ie),ho=s(Ie,"P",{});var $a=n(ho);cn=i($a,"DPT Model with a semantic segmentation head on top e.g. for ADE20k, CityScapes."),$a.forEach(o),mn=m(Ie),ct=s(Ie,"P",{});var ir=n(ct);pn=i(ir,"This model is a PyTorch "),mt=s(ir,"A",{href:!0,rel:!0});var xa=n(mt);hn=i(xa,"torch.nn.Module"),xa.forEach(o),fn=i(ir,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ir.forEach(o),un=m(Ie),A=s(Ie,"DIV",{class:!0});var ze=n(A);b(pt.$$.fragment,ze),gn=m(ze),te=s(ze,"P",{});var Rt=n(te);_n=i(Rt,"The "),zt=s(Rt,"A",{href:!0});var ka=n(zt);vn=i(ka,"DPTForSemanticSegmentation"),ka.forEach(o),Tn=i(Rt," forward method, overrides the "),fo=s(Rt,"CODE",{});var Ea=n(fo);bn=i(Ea,"__call__"),Ea.forEach(o),Pn=i(Rt," special method."),Rt.forEach(o),yn=m(ze),b(we.$$.fragment,ze),wn=m(ze),b(De.$$.fragment,ze),ze.forEach(o),Ie.forEach(o),this.h()},h(){d(h,"name","hf:doc:metadata"),d(h,"content",JSON.stringify(Ua)),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(ut,"href","vit"),Sa(se.src,$n="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/dpt_architecture.jpg")||d(se,"src",$n),d(se,"alt","drawing"),d(se,"width","600"),d(Se,"href","https://arxiv.org/abs/2103.13413"),d(Se,"target","_blank"),d(Ce,"href","https://huggingface.co/nielsr"),d(Ce,"rel","nofollow"),d(Ae,"href","https://github.com/isl-org/DPT"),d(Ae,"rel","nofollow"),d(ae,"id","resources"),d(ae,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(ae,"href","#resources"),d(W,"class","relative group"),d(bt,"href","/docs/transformers/main/en/model_doc/dpt#transformers.DPTForDepthEstimation"),d(Me,"href","https://github.com/NielsRogge/Transformers-Tutorials/tree/master/DPT"),d(Me,"rel","nofollow"),d(ie,"id","transformers.DPTConfig"),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.DPTConfig"),d(V,"class","relative group"),d(yt,"href","/docs/transformers/main/en/model_doc/dpt#transformers.DPTModel"),d(Oe,"href","https://huggingface.co/Intel/dpt-large"),d(Oe,"rel","nofollow"),d(wt,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d(Dt,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d($t,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig.to_dict"),d(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(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(ce,"id","transformers.DPTFeatureExtractor"),d(ce,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(ce,"href","#transformers.DPTFeatureExtractor"),d(G,"class","relative group"),d(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(xt,"href","/docs/transformers/main/en/model_doc/dpt#transformers.DPTForSemanticSegmentation"),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(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(he,"id","transformers.DPTImageProcessor"),d(he,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(he,"href","#transformers.DPTImageProcessor"),d(Y,"class","relative group"),d(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(kt,"href","/docs/transformers/main/en/model_doc/dpt#transformers.DPTForSemanticSegmentation"),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(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(ge,"id","transformers.DPTModel"),d(ge,"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(ge,"href","#transformers.DPTModel"),d(J,"class","relative group"),d(tt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(tt,"rel","nofollow"),d(Et,"href","/docs/transformers/main/en/model_doc/dpt#transformers.DPTModel"),d(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(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(Te,"id","transformers.DPTForDepthEstimation"),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.DPTForDepthEstimation"),d(Q,"class","relative group"),d(at,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(at,"rel","nofollow"),d(It,"href","/docs/transformers/main/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(ye,"id","transformers.DPTForSemanticSegmentation"),d(ye,"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(ye,"href","#transformers.DPTForSemanticSegmentation"),d(ee,"class","relative group"),d(mt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(mt,"rel","nofollow"),d(zt,"href","/docs/transformers/main/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(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(e,p){t(document.head,h),f(e,$,p),f(e,_,p),t(_,u),t(u,v),P(l,v,null),t(_,g),t(_,E),t(E,mr),f(e,bo,p),f(e,R,p),t(R,re),t(re,Wt),P(Fe,Wt,null),t(R,pr),t(R,Ut),t(Ut,hr),f(e,Po,p),f(e,N,p),t(N,fr),t(N,je),t(je,ur),t(N,gr),t(N,ut),t(ut,_r),t(N,vr),f(e,yo,p),f(e,gt,p),t(gt,Tr),f(e,wo,p),f(e,_t,p),t(_t,Vt),t(Vt,br),f(e,Do,p),f(e,se,p),f(e,$o,p),f(e,ne,p),t(ne,Pr),t(ne,Se),t(Se,yr),t(ne,wr),f(e,xo,p),f(e,L,p),t(L,Dr),t(L,Ce),t(Ce,$r),t(L,xr),t(L,Ae),t(Ae,kr),t(L,Er),f(e,ko,p),f(e,W,p),t(W,ae),t(ae,Ht),P(qe,Ht,null),t(W,Ir),t(W,Bt),t(Bt,zr),f(e,Eo,p),f(e,vt,p),t(vt,Fr),f(e,Io,p),f(e,Tt,p),t(Tt,U),t(U,jr),t(U,bt),t(bt,Sr),t(U,Cr),t(U,Me),t(Me,Ar),t(U,qr),f(e,zo,p),f(e,Pt,p),t(Pt,Mr),f(e,Fo,p),f(e,V,p),t(V,ie),t(ie,Kt),P(Ne,Kt,null),t(V,Nr),t(V,Gt),t(Gt,Lr),f(e,jo,p),f(e,k,p),P(Le,k,null),t(k,Or),t(k,H),t(H,Rr),t(H,yt),t(yt,Wr),t(H,Ur),t(H,Oe),t(Oe,Vr),t(H,Hr),t(k,Br),t(k,B),t(B,Kr),t(B,wt),t(wt,Gr),t(B,Yr),t(B,Dt),t(Dt,Jr),t(B,Xr),t(k,Qr),P(le,k,null),t(k,Zr),t(k,de),P(Re,de,null),t(de,es),t(de,K),t(K,ts),t(K,$t),t($t,os),t(K,rs),t(K,Yt),t(Yt,ss),t(K,ns),f(e,So,p),f(e,G,p),t(G,ce),t(ce,Jt),P(We,Jt,null),t(G,as),t(G,Xt),t(Xt,is),f(e,Co,p),f(e,q,p),P(Ue,q,null),t(q,ls),t(q,me),P(Ve,me,null),t(me,ds),t(me,Qt),t(Qt,cs),t(q,ms),t(q,pe),P(He,pe,null),t(pe,ps),t(pe,Be),t(Be,hs),t(Be,xt),t(xt,fs),t(Be,us),f(e,Ao,p),f(e,Y,p),t(Y,he),t(he,Zt),P(Ke,Zt,null),t(Y,gs),t(Y,eo),t(eo,_s),f(e,qo,p),f(e,z,p),P(Ge,z,null),t(z,vs),t(z,to),t(to,Ts),t(z,bs),t(z,fe),P(Ye,fe,null),t(fe,Ps),t(fe,oo),t(oo,ys),t(z,ws),t(z,ue),P(Je,ue,null),t(ue,Ds),t(ue,Xe),t(Xe,$s),t(Xe,kt),t(kt,xs),t(Xe,ks),f(e,Mo,p),f(e,J,p),t(J,ge),t(ge,ro),P(Qe,ro,null),t(J,Es),t(J,so),t(so,Is),f(e,No,p),f(e,M,p),P(Ze,M,null),t(M,zs),t(M,et),t(et,Fs),t(et,tt),t(tt,js),t(et,Ss),t(M,Cs),t(M,S),P(ot,S,null),t(S,As),t(S,X),t(X,qs),t(X,Et),t(Et,Ms),t(X,Ns),t(X,no),t(no,Ls),t(X,Os),t(S,Rs),P(_e,S,null),t(S,Ws),P(ve,S,null),f(e,Lo,p),f(e,Q,p),t(Q,Te),t(Te,ao),P(rt,ao,null),t(Q,Us),t(Q,io),t(io,Vs),f(e,Oo,p),f(e,F,p),P(st,F,null),t(F,Hs),t(F,lo),t(lo,Bs),t(F,Ks),t(F,nt),t(nt,Gs),t(nt,at),t(at,Ys),t(nt,Js),t(F,Xs),t(F,C),P(it,C,null),t(C,Qs),t(C,Z),t(Z,Zs),t(Z,It),t(It,en),t(Z,tn),t(Z,co),t(co,on),t(Z,rn),t(C,sn),P(be,C,null),t(C,nn),P(Pe,C,null),f(e,Ro,p),f(e,ee,p),t(ee,ye),t(ye,mo),P(lt,mo,null),t(ee,an),t(ee,po),t(po,ln),f(e,Wo,p),f(e,j,p),P(dt,j,null),t(j,dn),t(j,ho),t(ho,cn),t(j,mn),t(j,ct),t(ct,pn),t(ct,mt),t(mt,hn),t(ct,fn),t(j,un),t(j,A),P(pt,A,null),t(A,gn),t(A,te),t(te,_n),t(te,zt),t(zt,vn),t(te,Tn),t(te,fo),t(fo,bn),t(te,Pn),t(A,yn),P(we,A,null),t(A,wn),P(De,A,null),Uo=!0},p(e,[p]){const ht={};p&2&&(ht.$$scope={dirty:p,ctx:e}),le.$set(ht);const uo={};p&2&&(uo.$$scope={dirty:p,ctx:e}),_e.$set(uo);const go={};p&2&&(go.$$scope={dirty:p,ctx:e}),ve.$set(go);const _o={};p&2&&(_o.$$scope={dirty:p,ctx:e}),be.$set(_o);const ft={};p&2&&(ft.$$scope={dirty:p,ctx:e}),Pe.$set(ft);const vo={};p&2&&(vo.$$scope={dirty:p,ctx:e}),we.$set(vo);const To={};p&2&&(To.$$scope={dirty:p,ctx:e}),De.$set(To)},i(e){Uo||(y(l.$$.fragment,e),y(Fe.$$.fragment,e),y(qe.$$.fragment,e),y(Ne.$$.fragment,e),y(Le.$$.fragment,e),y(le.$$.fragment,e),y(Re.$$.fragment,e),y(We.$$.fragment,e),y(Ue.$$.fragment,e),y(Ve.$$.fragment,e),y(He.$$.fragment,e),y(Ke.$$.fragment,e),y(Ge.$$.fragment,e),y(Ye.$$.fragment,e),y(Je.$$.fragment,e),y(Qe.$$.fragment,e),y(Ze.$$.fragment,e),y(ot.$$.fragment,e),y(_e.$$.fragment,e),y(ve.$$.fragment,e),y(rt.$$.fragment,e),y(st.$$.fragment,e),y(it.$$.fragment,e),y(be.$$.fragment,e),y(Pe.$$.fragment,e),y(lt.$$.fragment,e),y(dt.$$.fragment,e),y(pt.$$.fragment,e),y(we.$$.fragment,e),y(De.$$.fragment,e),Uo=!0)},o(e){w(l.$$.fragment,e),w(Fe.$$.fragment,e),w(qe.$$.fragment,e),w(Ne.$$.fragment,e),w(Le.$$.fragment,e),w(le.$$.fragment,e),w(Re.$$.fragment,e),w(We.$$.fragment,e),w(Ue.$$.fragment,e),w(Ve.$$.fragment,e),w(He.$$.fragment,e),w(Ke.$$.fragment,e),w(Ge.$$.fragment,e),w(Ye.$$.fragment,e),w(Je.$$.fragment,e),w(Qe.$$.fragment,e),w(Ze.$$.fragment,e),w(ot.$$.fragment,e),w(_e.$$.fragment,e),w(ve.$$.fragment,e),w(rt.$$.fragment,e),w(st.$$.fragment,e),w(it.$$.fragment,e),w(be.$$.fragment,e),w(Pe.$$.fragment,e),w(lt.$$.fragment,e),w(dt.$$.fragment,e),w(pt.$$.fragment,e),w(we.$$.fragment,e),w(De.$$.fragment,e),Uo=!1},d(e){o(h),e&&o($),e&&o(_),D(l),e&&o(bo),e&&o(R),D(Fe),e&&o(Po),e&&o(N),e&&o(yo),e&&o(gt),e&&o(wo),e&&o(_t),e&&o(Do),e&&o(se),e&&o($o),e&&o(ne),e&&o(xo),e&&o(L),e&&o(ko),e&&o(W),D(qe),e&&o(Eo),e&&o(vt),e&&o(Io),e&&o(Tt),e&&o(zo),e&&o(Pt),e&&o(Fo),e&&o(V),D(Ne),e&&o(jo),e&&o(k),D(Le),D(le),D(Re),e&&o(So),e&&o(G),D(We),e&&o(Co),e&&o(q),D(Ue),D(Ve),D(He),e&&o(Ao),e&&o(Y),D(Ke),e&&o(qo),e&&o(z),D(Ge),D(Ye),D(Je),e&&o(Mo),e&&o(J),D(Qe),e&&o(No),e&&o(M),D(Ze),D(ot),D(_e),D(ve),e&&o(Lo),e&&o(Q),D(rt),e&&o(Oo),e&&o(F),D(st),D(it),D(be),D(Pe),e&&o(Ro),e&&o(ee),D(lt),e&&o(Wo),e&&o(j),D(dt),D(pt),D(we),D(De)}}}const Ua={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 Va(x){return Ca(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Xa extends Ia{constructor(h){super();za(this,h,Va,Wa,Fa,{})}}export{Xa as default,Ua as metadata};
