import{S as qa,i as Aa,s as Na,e as s,k as m,w as b,t as i,M as La,c as r,d as o,m as p,a,x as P,h as l,b as d,N as Oa,G as e,g as u,y as D,q as y,o as w,B as $,v as Ra,L as Oo}from"../../chunks/vendor-hf-doc-builder.js";import{T as Or}from"../../chunks/Tip-hf-doc-builder.js";import{D as C}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ro}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as xe}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Lo}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Va(x){let c,T,_,f,v;return f=new Ro({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(){c=s("p"),T=i("Example:"),_=m(),b(f.$$.fragment)},l(n){c=r(n,"P",{});var g=a(c);T=l(g,"Example:"),g.forEach(o),_=p(n),P(f.$$.fragment,n)},m(n,g){u(n,c,g),e(c,T),u(n,_,g),D(f,n,g),v=!0},p:Oo,i(n){v||(y(f.$$.fragment,n),v=!0)},o(n){w(f.$$.fragment,n),v=!1},d(n){n&&o(c),n&&o(_),$(f,n)}}}function Wa(x){let c,T,_,f,v;return{c(){c=s("p"),T=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s("code"),f=i("Module"),v=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){c=r(n,"P",{});var g=a(c);T=l(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=r(g,"CODE",{});var I=a(_);f=l(I,"Module"),I.forEach(o),v=l(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(n,g){u(n,c,g),e(c,T),e(c,_),e(_,f),e(c,v)},d(n){n&&o(c)}}}function Ua(x){let c,T,_,f,v;return f=new Ro({props:{code:`from transformers import DPTImageProcessor, DPTModel
import torch
from datasets import load_dataset

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

feature_extractor = DPTImageProcessor.from_pretrained("Intel/dpt-large")
model = DPTModel.from_pretrained("Intel/dpt-large")

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