Buckets:
| import{s as Bo,f as Vo,o as Ho,n as Ne}from"../chunks/scheduler.25b97de1.js";import{S as Go,i as Lo,g as d,s,r as h,A as qo,h as c,f as o,c as a,j as P,u as g,x as T,k as M,y as l,a as i,v as f,d as u,t as _,w as b}from"../chunks/index.d9030fc9.js";import{T as fo}from"../chunks/Tip.baa67368.js";import{D as x}from"../chunks/Docstring.ffac8efa.js";import{C as rt}from"../chunks/CodeBlock.e6cd0d95.js";import{E as Rt}from"../chunks/ExampleCodeBlock.22dfe688.js";import{H as E,E as Yo}from"../chunks/EditOnGithub.91d95064.js";function Xo($){let n,v="Example:",m,p,y;return p=new rt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERQVE1vZGVsJTJDJTIwRFBUQ29uZmlnJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMERQVCUyMGRwdC1sYXJnZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBEUFRDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMGZyb20lMjB0aGUlMjBkcHQtbGFyZ2UlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMERQVE1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DPTModel, DPTConfig | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Initializing a DPT dpt-large style configuration</span> | |
| <span class="hljs-meta">>>> </span>configuration = DPTConfig() | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Initializing a model from the dpt-large style configuration</span> | |
| <span class="hljs-meta">>>> </span>model = DPTModel(configuration) | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Accessing the model configuration</span> | |
| <span class="hljs-meta">>>> </span>configuration = model.config`,wrap:!1}}),{c(){n=d("p"),n.textContent=v,m=s(),h(p.$$.fragment)},l(r){n=c(r,"P",{"data-svelte-h":!0}),T(n)!=="svelte-11lpom8"&&(n.textContent=v),m=a(r),g(p.$$.fragment,r)},m(r,w){i(r,n,w),i(r,m,w),f(p,r,w),y=!0},p:Ne,i(r){y||(u(p.$$.fragment,r),y=!0)},o(r){_(p.$$.fragment,r),y=!1},d(r){r&&(o(n),o(m)),b(p,r)}}}function Qo($){let n,v=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code> | |
| instance afterwards instead of this since the former takes care of running the pre and post processing steps while | |
| the latter silently ignores them.`;return{c(){n=d("p"),n.innerHTML=v},l(m){n=c(m,"P",{"data-svelte-h":!0}),T(n)!=="svelte-fincs2"&&(n.innerHTML=v)},m(m,p){i(m,n,p)},p:Ne,d(m){m&&o(n)}}}function Ao($){let n,v="Example:",m,p,y;return p=new rt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMERQVE1vZGVsJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmh1Z2dpbmdmYWNlJTJGY2F0cy1pbWFnZSUyMiUyQyUyMHRydXN0X3JlbW90ZV9jb2RlJTNEVHJ1ZSklMEFpbWFnZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0ZXN0JTIyJTVEJTVCJTIyaW1hZ2UlMjIlNUQlNUIwJTVEJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJJbnRlbCUyRmRwdC1sYXJnZSUyMiklMEFtb2RlbCUyMCUzRCUyMERQVE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJJbnRlbCUyRmRwdC1sYXJnZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQWxpc3QobGFzdF9oaWRkZW5fc3RhdGVzLnNoYXBlKQ==",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, DPTModel | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset | |
| <span class="hljs-meta">>>> </span>dataset = load_dataset(<span class="hljs-string">"huggingface/cats-image"</span>, trust_remote_code=<span class="hljs-literal">True</span>) | |
| <span class="hljs-meta">>>> </span>image = dataset[<span class="hljs-string">"test"</span>][<span class="hljs-string">"image"</span>][<span class="hljs-number">0</span>] | |
| <span class="hljs-meta">>>> </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">"Intel/dpt-large"</span>) | |
| <span class="hljs-meta">>>> </span>model = DPTModel.from_pretrained(<span class="hljs-string">"Intel/dpt-large"</span>) | |
| <span class="hljs-meta">>>> </span>inputs = image_processor(image, return_tensors=<span class="hljs-string">"pt"</span>) | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">with</span> torch.no_grad(): | |
| <span class="hljs-meta">... </span> outputs = model(**inputs) | |
| <span class="hljs-meta">>>> </span>last_hidden_states = outputs.last_hidden_state | |
| <span class="hljs-meta">>>> </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>]`,wrap:!1}}),{c(){n=d("p"),n.textContent=v,m=s(),h(p.$$.fragment)},l(r){n=c(r,"P",{"data-svelte-h":!0}),T(n)!=="svelte-11lpom8"&&(n.textContent=v),m=a(r),g(p.$$.fragment,r)},m(r,w){i(r,n,w),i(r,m,w),f(p,r,w),y=!0},p:Ne,i(r){y||(u(p.$$.fragment,r),y=!0)},o(r){_(p.$$.fragment,r),y=!1},d(r){r&&(o(n),o(m)),b(p,r)}}}function Oo($){let n,v=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code> | |
| instance afterwards instead of this since the former takes care of running the pre and post processing steps while | |
| the latter silently ignores them.`;return{c(){n=d("p"),n.innerHTML=v},l(m){n=c(m,"P",{"data-svelte-h":!0}),T(n)!=="svelte-fincs2"&&(n.innerHTML=v)},m(m,p){i(m,n,p)},p:Ne,d(m){m&&o(n)}}}function Ko($){let n,v="Examples:",m,p,y;return p=new rt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMERQVEZvckRlcHRoRXN0aW1hdGlvbiUwQWltcG9ydCUyMHRvcmNoJTBBaW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJJbnRlbCUyRmRwdC1sYXJnZSUyMiklMEFtb2RlbCUyMCUzRCUyMERQVEZvckRlcHRoRXN0aW1hdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIySW50ZWwlMkZkcHQtbGFyZ2UlMjIpJTBBJTBBJTIzJTIwcHJlcGFyZSUyMGltYWdlJTIwZm9yJTIwdGhlJTIwbW9kZWwlMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBJTIzJTIwaW50ZXJwb2xhdGUlMjB0byUyMG9yaWdpbmFsJTIwc2l6ZSUwQXBvc3RfcHJvY2Vzc2VkX291dHB1dCUyMCUzRCUyMGltYWdlX3Byb2Nlc3Nvci5wb3N0X3Byb2Nlc3NfZGVwdGhfZXN0aW1hdGlvbiglMEElMjAlMjAlMjAlMjBvdXRwdXRzJTJDJTBBJTIwJTIwJTIwJTIwdGFyZ2V0X3NpemVzJTNEJTVCKGltYWdlLmhlaWdodCUyQyUyMGltYWdlLndpZHRoKSU1RCUyQyUwQSklMEElMEElMjMlMjB2aXN1YWxpemUlMjB0aGUlMjBwcmVkaWN0aW9uJTBBcHJlZGljdGVkX2RlcHRoJTIwJTNEJTIwcG9zdF9wcm9jZXNzZWRfb3V0cHV0JTVCMCU1RCU1QiUyMnByZWRpY3RlZF9kZXB0aCUyMiU1RCUwQWRlcHRoJTIwJTNEJTIwcHJlZGljdGVkX2RlcHRoJTIwKiUyMDI1NSUyMCUyRiUyMHByZWRpY3RlZF9kZXB0aC5tYXgoKSUwQWRlcHRoJTIwJTNEJTIwZGVwdGguZGV0YWNoKCkuY3B1KCkubnVtcHkoKSUwQWRlcHRoJTIwJTNEJTIwSW1hZ2UuZnJvbWFycmF5KGRlcHRoLmFzdHlwZSglMjJ1aW50OCUyMikp",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, DPTForDepthEstimation | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> requests | |
| <span class="hljs-meta">>>> </span>url = <span class="hljs-string">"http://images.cocodataset.org/val2017/000000039769.jpg"</span> | |
| <span class="hljs-meta">>>> </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">>>> </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">"Intel/dpt-large"</span>) | |
| <span class="hljs-meta">>>> </span>model = DPTForDepthEstimation.from_pretrained(<span class="hljs-string">"Intel/dpt-large"</span>) | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># prepare image for the model</span> | |
| <span class="hljs-meta">>>> </span>inputs = image_processor(images=image, return_tensors=<span class="hljs-string">"pt"</span>) | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">with</span> torch.no_grad(): | |
| <span class="hljs-meta">... </span> outputs = model(**inputs) | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># interpolate to original size</span> | |
| <span class="hljs-meta">>>> </span>post_processed_output = image_processor.post_process_depth_estimation( | |
| <span class="hljs-meta">... </span> outputs, | |
| <span class="hljs-meta">... </span> target_sizes=[(image.height, image.width)], | |
| <span class="hljs-meta">... </span>) | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># visualize the prediction</span> | |
| <span class="hljs-meta">>>> </span>predicted_depth = post_processed_output[<span class="hljs-number">0</span>][<span class="hljs-string">"predicted_depth"</span>] | |
| <span class="hljs-meta">>>> </span>depth = predicted_depth * <span class="hljs-number">255</span> / predicted_depth.<span class="hljs-built_in">max</span>() | |
| <span class="hljs-meta">>>> </span>depth = depth.detach().cpu().numpy() | |
| <span class="hljs-meta">>>> </span>depth = Image.fromarray(depth.astype(<span class="hljs-string">"uint8"</span>))`,wrap:!1}}),{c(){n=d("p"),n.textContent=v,m=s(),h(p.$$.fragment)},l(r){n=c(r,"P",{"data-svelte-h":!0}),T(n)!=="svelte-kvfsh7"&&(n.textContent=v),m=a(r),g(p.$$.fragment,r)},m(r,w){i(r,n,w),i(r,m,w),f(p,r,w),y=!0},p:Ne,i(r){y||(u(p.$$.fragment,r),y=!0)},o(r){_(p.$$.fragment,r),y=!1},d(r){r&&(o(n),o(m)),b(p,r)}}}function en($){let n,v=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code> | |
| instance afterwards instead of this since the former takes care of running the pre and post processing steps while | |
| the latter silently ignores them.`;return{c(){n=d("p"),n.innerHTML=v},l(m){n=c(m,"P",{"data-svelte-h":!0}),T(n)!=="svelte-fincs2"&&(n.innerHTML=v)},m(m,p){i(m,n,p)},p:Ne,d(m){m&&o(n)}}}function tn($){let n,v="Examples:",m,p,y;return p=new rt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMERQVEZvclNlbWFudGljU2VnbWVudGF0aW9uJTBBZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJJbnRlbCUyRmRwdC1sYXJnZS1hZGUlMjIpJTBBbW9kZWwlMjAlM0QlMjBEUFRGb3JTZW1hbnRpY1NlZ21lbnRhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIySW50ZWwlMkZkcHQtbGFyZ2UtYWRlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZXMlM0RpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, DPTForSemanticSegmentation | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> requests | |
| <span class="hljs-meta">>>> </span>url = <span class="hljs-string">"http://images.cocodataset.org/val2017/000000039769.jpg"</span> | |
| <span class="hljs-meta">>>> </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">>>> </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">"Intel/dpt-large-ade"</span>) | |
| <span class="hljs-meta">>>> </span>model = DPTForSemanticSegmentation.from_pretrained(<span class="hljs-string">"Intel/dpt-large-ade"</span>) | |
| <span class="hljs-meta">>>> </span>inputs = image_processor(images=image, return_tensors=<span class="hljs-string">"pt"</span>) | |
| <span class="hljs-meta">>>> </span>outputs = model(**inputs) | |
| <span class="hljs-meta">>>> </span>logits = outputs.logits`,wrap:!1}}),{c(){n=d("p"),n.textContent=v,m=s(),h(p.$$.fragment)},l(r){n=c(r,"P",{"data-svelte-h":!0}),T(n)!=="svelte-kvfsh7"&&(n.textContent=v),m=a(r),g(p.$$.fragment,r)},m(r,w){i(r,n,w),i(r,m,w),f(p,r,w),y=!0},p:Ne,i(r){y||(u(p.$$.fragment,r),y=!0)},o(r){_(p.$$.fragment,r),y=!1},d(r){r&&(o(n),o(m)),b(p,r)}}}function on($){let n,v,m,p,y,r,w,it,se,uo=`The DPT model was proposed in <a href="https://arxiv.org/abs/2103.13413" rel="nofollow">Vision Transformers for Dense Prediction</a> by René Ranftl, Alexey Bochkovskiy, Vladlen Koltun. | |
| DPT is a model that leverages the <a href="vit">Vision Transformer (ViT)</a> as backbone for dense prediction tasks like semantic segmentation and depth estimation.`,lt,ae,_o="The abstract from the paper is the following:",dt,re,bo="<em>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.</em>",ct,S,To,mt,ie,yo='DPT architecture. Taken from the <a href="https://arxiv.org/abs/2103.13413" target="_blank">original paper</a>.',pt,le,vo='This model was contributed by <a href="https://huggingface.co/nielsr" rel="nofollow">nielsr</a>. The original code can be found <a href="https://github.com/isl-org/DPT" rel="nofollow">here</a>.',ht,de,gt,ce,wo='DPT is compatible with the <a href="/docs/transformers/pr_35674/en/main_classes/backbones#transformers.AutoBackbone">AutoBackbone</a> class. This allows to use the DPT framework with various computer vision backbones available in the library, such as <code>VitDetBackbone</code> or <code>Dinov2Backbone</code>. One can create it as follows:',ft,me,ut,pe,_t,he,Mo="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with DPT.",bt,ge,$o='<li><p>Demo notebooks for <a href="/docs/transformers/pr_35674/en/model_doc/dpt#transformers.DPTForDepthEstimation">DPTForDepthEstimation</a> can be found <a href="https://github.com/NielsRogge/Transformers-Tutorials/tree/master/DPT" rel="nofollow">here</a>.</p></li> <li><p><a href="../tasks/semantic_segmentation">Semantic segmentation task guide</a></p></li> <li><p><a href="../tasks/monocular_depth_estimation">Monocular depth estimation task guide</a></p></li>',Tt,fe,Po="If you’re interested in submitting a resource to be included here, please feel free to open a Pull Request and we’ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.",yt,ue,vt,D,_e,Wt,Be,Do=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_35674/en/model_doc/dpt#transformers.DPTModel">DPTModel</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 | |
| <a href="https://huggingface.co/Intel/dpt-large" rel="nofollow">Intel/dpt-large</a> architecture.`,Et,Ve,xo=`Configuration objects inherit from <a href="/docs/transformers/pr_35674/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the | |
| documentation from <a href="/docs/transformers/pr_35674/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Zt,N,St,B,be,Nt,He,ko=`Serializes this instance to a Python dictionary. Override the default <a href="/docs/transformers/pr_35674/en/main_classes/configuration#transformers.PretrainedConfig.to_dict">to_dict()</a>. Returns: | |
| <code>Dict[str, any]</code>: Dictionary of all the attributes that make up this configuration instance,`,wt,Te,Mt,F,ye,Bt,V,ve,Vt,Ge,Co="Preprocess an image or a batch of images.",Ht,H,we,Gt,Le,jo='Converts the output of <a href="/docs/transformers/pr_35674/en/model_doc/dpt#transformers.DPTForSemanticSegmentation">DPTForSemanticSegmentation</a> into semantic segmentation maps. Only supports PyTorch.',$t,Me,Pt,k,$e,Lt,qe,zo="Constructs a DPT image processor.",qt,G,Pe,Yt,Ye,Io="Preprocess an image or batch of images.",Xt,L,De,Qt,Xe,Uo='Converts the output of <a href="/docs/transformers/pr_35674/en/model_doc/dpt#transformers.DPTForSemanticSegmentation">DPTForSemanticSegmentation</a> into semantic segmentation maps. Only supports PyTorch.',Dt,xe,xt,R,ke,At,Qe,Jo=`The bare DPT Model transformer outputting raw hidden-states without any specific head on top. | |
| This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass. Use it | |
| as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and | |
| behavior.`,Ot,I,Ce,Kt,Ae,Fo='The <a href="/docs/transformers/pr_35674/en/model_doc/dpt#transformers.DPTModel">DPTModel</a> forward method, overrides the <code>__call__</code> special method.',eo,q,to,Y,kt,je,Ct,C,ze,oo,Oe,Ro="DPT Model with a depth estimation head on top (consisting of 3 convolutional layers) e.g. for KITTI, NYUv2.",no,Ke,Wo=`This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass. Use it | |
| as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and | |
| behavior.`,so,U,Ie,ao,et,Eo='The <a href="/docs/transformers/pr_35674/en/model_doc/dpt#transformers.DPTForDepthEstimation">DPTForDepthEstimation</a> forward method, overrides the <code>__call__</code> special method.',ro,X,io,Q,jt,Ue,zt,j,Je,lo,tt,Zo="DPT Model with a semantic segmentation head on top e.g. for ADE20k, CityScapes.",co,ot,So=`This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass. Use it | |
| as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and | |
| behavior.`,mo,J,Fe,po,nt,No='The <a href="/docs/transformers/pr_35674/en/model_doc/dpt#transformers.DPTForSemanticSegmentation">DPTForSemanticSegmentation</a> forward method, overrides the <code>__call__</code> special method.',ho,A,go,O,It,Re,Ut,at,Jt;return y=new E({props:{title:"DPT",local:"dpt",headingTag:"h1"}}),w=new E({props:{title:"Overview",local:"overview",headingTag:"h2"}}),de=new E({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),me=new rt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERpbm92MkNvbmZpZyUyQyUyMERQVENvbmZpZyUyQyUyMERQVEZvckRlcHRoRXN0aW1hdGlvbiUwQSUwQSUyMyUyMGluaXRpYWxpemUlMjB3aXRoJTIwYSUyMFRyYW5zZm9ybWVyLWJhc2VkJTIwYmFja2JvbmUlMjBzdWNoJTIwYXMlMjBESU5PdjIlMEElMjMlMjBpbiUyMHRoYXQlMjBjYXNlJTJDJTIwd2UlMjBhbHNvJTIwc3BlY2lmeSUyMCU2MHJlc2hhcGVfaGlkZGVuX3N0YXRlcyUzREZhbHNlJTYwJTIwdG8lMjBnZXQlMjBmZWF0dXJlJTIwbWFwcyUyMG9mJTIwc2hhcGUlMjAoYmF0Y2hfc2l6ZSUyQyUyMG51bV9jaGFubmVscyUyQyUyMGhlaWdodCUyQyUyMHdpZHRoKSUwQWJhY2tib25lX2NvbmZpZyUyMCUzRCUyMERpbm92MkNvbmZpZy5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZkaW5vdjItYmFzZSUyMiUyQyUyMG91dF9mZWF0dXJlcyUzRCU1QiUyMnN0YWdlMSUyMiUyQyUyMCUyMnN0YWdlMiUyMiUyQyUyMCUyMnN0YWdlMyUyMiUyQyUyMCUyMnN0YWdlNCUyMiU1RCUyQyUyMHJlc2hhcGVfaGlkZGVuX3N0YXRlcyUzREZhbHNlKSUwQSUwQWNvbmZpZyUyMCUzRCUyMERQVENvbmZpZyhiYWNrYm9uZV9jb25maWclM0RiYWNrYm9uZV9jb25maWcpJTBBbW9kZWwlMjAlM0QlMjBEUFRGb3JEZXB0aEVzdGltYXRpb24oY29uZmlnJTNEY29uZmlnKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Dinov2Config, DPTConfig, DPTForDepthEstimation | |
| <span class="hljs-comment"># initialize with a Transformer-based backbone such as DINOv2</span> | |
| <span class="hljs-comment"># in that case, we also specify \`reshape_hidden_states=False\` to get feature maps of shape (batch_size, num_channels, height, width)</span> | |
| backbone_config = Dinov2Config.from_pretrained(<span class="hljs-string">"facebook/dinov2-base"</span>, out_features=[<span class="hljs-string">"stage1"</span>, <span class="hljs-string">"stage2"</span>, <span class="hljs-string">"stage3"</span>, <span class="hljs-string">"stage4"</span>], reshape_hidden_states=<span class="hljs-literal">False</span>) | |
| config = DPTConfig(backbone_config=backbone_config) | |
| model = DPTForDepthEstimation(config=config)`,wrap:!1}}),pe=new E({props:{title:"Resources",local:"resources",headingTag:"h2"}}),ue=new E({props:{title:"DPTConfig",local:"transformers.DPTConfig",headingTag:"h2"}}),_e=new x({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_bias_in_fusion_residual",val:" = None"},{name:"add_projection",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:"backbone",val:" = None"},{name:"use_pretrained_backbone",val:" = False"},{name:"use_timm_backbone",val:" = False"},{name:"backbone_kwargs",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) — | |
| 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) — | |
| 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) — | |
| 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) — | |
| Dimensionality of the “intermediate” (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>"gelu"</code>) — | |
| The non-linear activation function (function or string) in the encoder and pooler. If string, <code>"gelu"</code>, | |
| <code>"relu"</code>, <code>"selu"</code> and <code>"gelu_new"</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.0) — | |
| The dropout probability 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.0) — | |
| 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) — | |
| 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) — | |
| 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) — | |
| 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) — | |
| 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) — | |
| The number of input channels.`,name:"num_channels"},{anchor:"transformers.DPTConfig.is_hybrid",description:`<strong>is_hybrid</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — | |
| Whether to use a hybrid backbone. Useful in the context of loading DPT-Hybrid models.`,name:"is_hybrid"},{anchor:"transformers.DPTConfig.qkv_bias",description:`<strong>qkv_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| 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>) — | |
| 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>"project"</code>) — | |
| 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>"ignore"</code>, <code>"add"</code>, <code>"project"</code>].</p> | |
| <ul> | |
| <li>“ignore” simply ignores the CLS token.</li> | |
| <li>“add” passes the information from the CLS token to all other tokens by adding the representations.</li> | |
| <li>“project” 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>) — | |
| 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 <code>[96, 192, 384, 768]</code>) — | |
| 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) — | |
| 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) — | |
| 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>) — | |
| 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_bias_in_fusion_residual",description:`<strong>use_bias_in_fusion_residual</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether to use bias in the pre-activate residual units of the fusion blocks.`,name:"use_bias_in_fusion_residual"},{anchor:"transformers.DPTConfig.add_projection",description:`<strong>add_projection</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — | |
| Whether to add a projection layer before the depth estimation head.`,name:"add_projection"},{anchor:"transformers.DPTConfig.use_auxiliary_head",description:`<strong>use_auxiliary_head</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| 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) — | |
| 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) — | |
| 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) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| The configuration of the backbone model. Only used in case <code>is_hybrid</code> is <code>True</code> or in case you want to | |
| leverage the <a href="/docs/transformers/pr_35674/en/main_classes/backbones#transformers.AutoBackbone">AutoBackbone</a> API.`,name:"backbone_config"},{anchor:"transformers.DPTConfig.backbone",description:`<strong>backbone</strong> (<code>str</code>, <em>optional</em>) — | |
| Name of backbone to use when <code>backbone_config</code> is <code>None</code>. If <code>use_pretrained_backbone</code> is <code>True</code>, this | |
| will load the corresponding pretrained weights from the timm or transformers library. If <code>use_pretrained_backbone</code> | |
| is <code>False</code>, this loads the backbone’s config and uses that to initialize the backbone with random weights.`,name:"backbone"},{anchor:"transformers.DPTConfig.use_pretrained_backbone",description:`<strong>use_pretrained_backbone</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — | |
| Whether to use pretrained weights for the backbone.`,name:"use_pretrained_backbone"},{anchor:"transformers.DPTConfig.use_timm_backbone",description:`<strong>use_timm_backbone</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — | |
| Whether to load <code>backbone</code> from the timm library. If <code>False</code>, the backbone is loaded from the transformers | |
| library.`,name:"use_timm_backbone"},{anchor:"transformers.DPTConfig.backbone_kwargs",description:`<strong>backbone_kwargs</strong> (<code>dict</code>, <em>optional</em>) — | |
| Keyword arguments to be passed to AutoBackbone when loading from a checkpoint | |
| e.g. <code>{'out_indices': (0, 1, 2, 3)}</code>. Cannot be specified if <code>backbone_config</code> is set.`,name:"backbone_kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_35674/src/transformers/models/dpt/configuration_dpt.py#L29"}}),N=new Rt({props:{anchor:"transformers.DPTConfig.example",$$slots:{default:[Xo]},$$scope:{ctx:$}}}),be=new x({props:{name:"to_dict",anchor:"transformers.DPTConfig.to_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_35674/src/transformers/models/dpt/configuration_dpt.py#L272"}}),Te=new E({props:{title:"DPTFeatureExtractor",local:"transformers.DPTFeatureExtractor",headingTag:"h2"}}),ye=new x({props:{name:"class transformers.DPTFeatureExtractor",anchor:"transformers.DPTFeatureExtractor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_35674/src/transformers/models/dpt/feature_extraction_dpt.py#L26"}}),ve=new x({props:{name:"__call__",anchor:"transformers.DPTFeatureExtractor.__call__",parameters:[{name:"images",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_35674/src/transformers/image_processing_utils.py#L39"}}),we=new x({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/pr_35674/en/model_doc/dpt#transformers.DPTForSemanticSegmentation">DPTForSemanticSegmentation</a>) — | |
| 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>) — | |
| 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/vr_35674/src/transformers/models/dpt/image_processing_dpt.py#L432",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <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:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>semantic_segmentation</p> | |
| `}}),Me=new E({props:{title:"DPTImageProcessor",local:"transformers.DPTImageProcessor",headingTag:"h2"}}),$e=new x({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.BICUBIC: 3>"},{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:"do_pad",val:": bool = False"},{name:"size_divisor",val:": int = 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>) — | |
| Whether to resize the image’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>{"height" -- 384, "width": 384}</code>): | |
| Size of the image after resizing. Can be overidden by <code>size</code> in <code>preprocess</code>.`,name:"size"},{anchor:"transformers.DPTImageProcessor.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>Resampling.BICUBIC</code>) — | |
| 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.keep_aspect_ratio",description:`<strong>keep_aspect_ratio</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — | |
| 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 1) — | |
| 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.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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"},{anchor:"transformers.DPTImageProcessor.do_pad",description:`<strong>do_pad</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — | |
| Whether to apply center padding. This was introduced in the DINOv2 paper, which uses the model in | |
| combination with DPT.`,name:"do_pad"},{anchor:"transformers.DPTImageProcessor.size_divisor",description:`<strong>size_divisor</strong> (<code>int</code>, <em>optional</em>) — | |
| If <code>do_pad</code> is <code>True</code>, pads the image dimensions to be divisible by this value. This was introduced in the | |
| DINOv2 paper, which uses the model in combination with DPT.`,name:"size_divisor"}],source:"https://github.com/huggingface/transformers/blob/vr_35674/src/transformers/models/dpt/image_processing_dpt.py#L105"}}),Pe=new x({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:"do_pad",val:": bool = None"},{name:"size_divisor",val:": int = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"data_format",val:": ChannelDimension = <ChannelDimension.FIRST: 'channels_first'>"},{name:"input_data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension, NoneType] = None"}],parametersDescription:[{anchor:"transformers.DPTImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) — | |
| Image to preprocess. Expects a single or batch of images with pixel values ranging from 0 to 255. If | |
| passing in images with pixel values between 0 and 1, set <code>do_rescale=False</code>.`,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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>'tf'</code>: Return a batch of type <code>tf.Tensor</code>.</li> | |
| <li><code>TensorType.PYTORCH</code> or <code>'pt'</code>: Return a batch of type <code>torch.Tensor</code>.</li> | |
| <li><code>TensorType.NUMPY</code> or <code>'np'</code>: Return a batch of type <code>np.ndarray</code>.</li> | |
| <li><code>TensorType.JAX</code> or <code>'jax'</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>) — | |
| 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"},{anchor:"transformers.DPTImageProcessor.preprocess.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>) — | |
| The channel dimension format for the input image. If unset, the channel dimension format is inferred | |
| from the input image. Can be one of:<ul> | |
| <li><code>"channels_first"</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li> | |
| <li><code>"channels_last"</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li> | |
| <li><code>"none"</code> or <code>ChannelDimension.NONE</code>: image in (height, width) format.</li> | |
| </ul>`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/vr_35674/src/transformers/models/dpt/image_processing_dpt.py#L278"}}),De=new x({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/pr_35674/en/model_doc/dpt#transformers.DPTForSemanticSegmentation">DPTForSemanticSegmentation</a>) — | |
| 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>) — | |
| 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/vr_35674/src/transformers/models/dpt/image_processing_dpt.py#L432",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <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:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>semantic_segmentation</p> | |
| `}}),xe=new E({props:{title:"DPTModel",local:"transformers.DPTModel",headingTag:"h2"}}),ke=new x({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/pr_35674/en/model_doc/vit#transformers.ViTConfig">ViTConfig</a>) — Model configuration class with all the parameters of the model. | |
| Initializing with a config file does not load the weights associated with the model, only the | |
| configuration. Check out the <a href="/docs/transformers/pr_35674/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_35674/src/transformers/models/dpt/modeling_dpt.py#L860"}}),Ce=new x({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>) — | |
| Pixel values. Pixel values can be obtained using <a href="/docs/transformers/pr_35674/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/pr_35674/en/model_doc/imagegpt#transformers.ImageGPTFeatureExtractor.__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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| Whether or not to return a <a href="/docs/transformers/pr_35674/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_35674/src/transformers/models/dpt/modeling_dpt.py#L896",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <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/pr_35674/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>) — 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>) — 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>) — 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>) — 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>) — Intermediate activations that can be used to compute hidden states of the model at various layers.</p> | |
| </li> | |
| </ul> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><code>transformers.models.dpt.modeling_dpt.BaseModelOutputWithPoolingAndIntermediateActivations</code> or <code>tuple(torch.FloatTensor)</code></p> | |
| `}}),q=new fo({props:{$$slots:{default:[Qo]},$$scope:{ctx:$}}}),Y=new Rt({props:{anchor:"transformers.DPTModel.forward.example",$$slots:{default:[Ao]},$$scope:{ctx:$}}}),je=new E({props:{title:"DPTForDepthEstimation",local:"transformers.DPTForDepthEstimation",headingTag:"h2"}}),ze=new x({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/pr_35674/en/model_doc/vit#transformers.ViTConfig">ViTConfig</a>) — Model configuration class with all the parameters of the model. | |
| Initializing with a config file does not load the weights associated with the model, only the | |
| configuration. Check out the <a href="/docs/transformers/pr_35674/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_35674/src/transformers/models/dpt/modeling_dpt.py#L1064"}}),Ie=new x({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>) — | |
| Pixel values. Pixel values can be obtained using <a href="/docs/transformers/pr_35674/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/pr_35674/en/model_doc/imagegpt#transformers.ImageGPTFeatureExtractor.__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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| Whether or not to return a <a href="/docs/transformers/pr_35674/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>) — | |
| Ground truth depth estimation maps for computing the loss.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/vr_35674/src/transformers/models/dpt/modeling_dpt.py#L1089",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>A <a | |
| href="/docs/transformers/pr_35674/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/pr_35674/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) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><a | |
| href="/docs/transformers/pr_35674/en/main_classes/output#transformers.modeling_outputs.DepthEstimatorOutput" | |
| >transformers.modeling_outputs.DepthEstimatorOutput</a> or <code>tuple(torch.FloatTensor)</code></p> | |
| `}}),X=new fo({props:{$$slots:{default:[Oo]},$$scope:{ctx:$}}}),Q=new Rt({props:{anchor:"transformers.DPTForDepthEstimation.forward.example",$$slots:{default:[Ko]},$$scope:{ctx:$}}}),Ue=new E({props:{title:"DPTForSemanticSegmentation",local:"transformers.DPTForSemanticSegmentation",headingTag:"h2"}}),Je=new x({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/pr_35674/en/model_doc/vit#transformers.ViTConfig">ViTConfig</a>) — Model configuration class with all the parameters of the model. | |
| Initializing with a config file does not load the weights associated with the model, only the | |
| configuration. Check out the <a href="/docs/transformers/pr_35674/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_35674/src/transformers/models/dpt/modeling_dpt.py#L1248"}}),Fe=new x({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>) — | |
| Pixel values. Pixel values can be obtained using <a href="/docs/transformers/pr_35674/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/pr_35674/en/model_doc/imagegpt#transformers.ImageGPTFeatureExtractor.__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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| Whether or not to return a <a href="/docs/transformers/pr_35674/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>) — | |
| 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 > 1</code>, a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/vr_35674/src/transformers/models/dpt/modeling_dpt.py#L1270",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>A <a | |
| href="/docs/transformers/pr_35674/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/pr_35674/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) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><a | |
| href="/docs/transformers/pr_35674/en/main_classes/output#transformers.modeling_outputs.SemanticSegmenterOutput" | |
| >transformers.modeling_outputs.SemanticSegmenterOutput</a> or <code>tuple(torch.FloatTensor)</code></p> | |
| `}}),A=new fo({props:{$$slots:{default:[en]},$$scope:{ctx:$}}}),O=new Rt({props:{anchor:"transformers.DPTForSemanticSegmentation.forward.example",$$slots:{default:[tn]},$$scope:{ctx:$}}}),Re=new Yo({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/dpt.md"}}),{c(){n=d("meta"),v=s(),m=d("p"),p=s(),h(y.$$.fragment),r=s(),h(w.$$.fragment),it=s(),se=d("p"),se.innerHTML=uo,lt=s(),ae=d("p"),ae.textContent=_o,dt=s(),re=d("p"),re.innerHTML=bo,ct=s(),S=d("img"),mt=s(),ie=d("small"),ie.innerHTML=yo,pt=s(),le=d("p"),le.innerHTML=vo,ht=s(),h(de.$$.fragment),gt=s(),ce=d("p"),ce.innerHTML=wo,ft=s(),h(me.$$.fragment),ut=s(),h(pe.$$.fragment),_t=s(),he=d("p"),he.textContent=Mo,bt=s(),ge=d("ul"),ge.innerHTML=$o,Tt=s(),fe=d("p"),fe.textContent=Po,yt=s(),h(ue.$$.fragment),vt=s(),D=d("div"),h(_e.$$.fragment),Wt=s(),Be=d("p"),Be.innerHTML=Do,Et=s(),Ve=d("p"),Ve.innerHTML=xo,Zt=s(),h(N.$$.fragment),St=s(),B=d("div"),h(be.$$.fragment),Nt=s(),He=d("p"),He.innerHTML=ko,wt=s(),h(Te.$$.fragment),Mt=s(),F=d("div"),h(ye.$$.fragment),Bt=s(),V=d("div"),h(ve.$$.fragment),Vt=s(),Ge=d("p"),Ge.textContent=Co,Ht=s(),H=d("div"),h(we.$$.fragment),Gt=s(),Le=d("p"),Le.innerHTML=jo,$t=s(),h(Me.$$.fragment),Pt=s(),k=d("div"),h($e.$$.fragment),Lt=s(),qe=d("p"),qe.textContent=zo,qt=s(),G=d("div"),h(Pe.$$.fragment),Yt=s(),Ye=d("p"),Ye.textContent=Io,Xt=s(),L=d("div"),h(De.$$.fragment),Qt=s(),Xe=d("p"),Xe.innerHTML=Uo,Dt=s(),h(xe.$$.fragment),xt=s(),R=d("div"),h(ke.$$.fragment),At=s(),Qe=d("p"),Qe.innerHTML=Jo,Ot=s(),I=d("div"),h(Ce.$$.fragment),Kt=s(),Ae=d("p"),Ae.innerHTML=Fo,eo=s(),h(q.$$.fragment),to=s(),h(Y.$$.fragment),kt=s(),h(je.$$.fragment),Ct=s(),C=d("div"),h(ze.$$.fragment),oo=s(),Oe=d("p"),Oe.textContent=Ro,no=s(),Ke=d("p"),Ke.innerHTML=Wo,so=s(),U=d("div"),h(Ie.$$.fragment),ao=s(),et=d("p"),et.innerHTML=Eo,ro=s(),h(X.$$.fragment),io=s(),h(Q.$$.fragment),jt=s(),h(Ue.$$.fragment),zt=s(),j=d("div"),h(Je.$$.fragment),lo=s(),tt=d("p"),tt.textContent=Zo,co=s(),ot=d("p"),ot.innerHTML=So,mo=s(),J=d("div"),h(Fe.$$.fragment),po=s(),nt=d("p"),nt.innerHTML=No,ho=s(),h(A.$$.fragment),go=s(),h(O.$$.fragment),It=s(),h(Re.$$.fragment),Ut=s(),at=d("p"),this.h()},l(e){const t=qo("svelte-u9bgzb",document.head);n=c(t,"META",{name:!0,content:!0}),t.forEach(o),v=a(e),m=c(e,"P",{}),P(m).forEach(o),p=a(e),g(y.$$.fragment,e),r=a(e),g(w.$$.fragment,e),it=a(e),se=c(e,"P",{"data-svelte-h":!0}),T(se)!=="svelte-19gxegr"&&(se.innerHTML=uo),lt=a(e),ae=c(e,"P",{"data-svelte-h":!0}),T(ae)!=="svelte-vfdo9a"&&(ae.textContent=_o),dt=a(e),re=c(e,"P",{"data-svelte-h":!0}),T(re)!=="svelte-17tgro5"&&(re.innerHTML=bo),ct=a(e),S=c(e,"IMG",{src:!0,alt:!0,width:!0}),mt=a(e),ie=c(e,"SMALL",{"data-svelte-h":!0}),T(ie)!=="svelte-6ly4vl"&&(ie.innerHTML=yo),pt=a(e),le=c(e,"P",{"data-svelte-h":!0}),T(le)!=="svelte-d1d7zy"&&(le.innerHTML=vo),ht=a(e),g(de.$$.fragment,e),gt=a(e),ce=c(e,"P",{"data-svelte-h":!0}),T(ce)!=="svelte-2r70sz"&&(ce.innerHTML=wo),ft=a(e),g(me.$$.fragment,e),ut=a(e),g(pe.$$.fragment,e),_t=a(e),he=c(e,"P",{"data-svelte-h":!0}),T(he)!=="svelte-1b0rfkj"&&(he.textContent=Mo),bt=a(e),ge=c(e,"UL",{"data-svelte-h":!0}),T(ge)!=="svelte-1m08dhi"&&(ge.innerHTML=$o),Tt=a(e),fe=c(e,"P",{"data-svelte-h":!0}),T(fe)!=="svelte-1xesile"&&(fe.textContent=Po),yt=a(e),g(ue.$$.fragment,e),vt=a(e),D=c(e,"DIV",{class:!0});var z=P(D);g(_e.$$.fragment,z),Wt=a(z),Be=c(z,"P",{"data-svelte-h":!0}),T(Be)!=="svelte-ch0372"&&(Be.innerHTML=Do),Et=a(z),Ve=c(z,"P",{"data-svelte-h":!0}),T(Ve)!=="svelte-f39fgb"&&(Ve.innerHTML=xo),Zt=a(z),g(N.$$.fragment,z),St=a(z),B=c(z,"DIV",{class:!0});var We=P(B);g(be.$$.fragment,We),Nt=a(We),He=c(We,"P",{"data-svelte-h":!0}),T(He)!=="svelte-yfr65f"&&(He.innerHTML=ko),We.forEach(o),z.forEach(o),wt=a(e),g(Te.$$.fragment,e),Mt=a(e),F=c(e,"DIV",{class:!0});var Z=P(F);g(ye.$$.fragment,Z),Bt=a(Z),V=c(Z,"DIV",{class:!0});var Ee=P(V);g(ve.$$.fragment,Ee),Vt=a(Ee),Ge=c(Ee,"P",{"data-svelte-h":!0}),T(Ge)!=="svelte-khengj"&&(Ge.textContent=Co),Ee.forEach(o),Ht=a(Z),H=c(Z,"DIV",{class:!0});var Ze=P(H);g(we.$$.fragment,Ze),Gt=a(Ze),Le=c(Ze,"P",{"data-svelte-h":!0}),T(Le)!=="svelte-1kdvlun"&&(Le.innerHTML=jo),Ze.forEach(o),Z.forEach(o),$t=a(e),g(Me.$$.fragment,e),Pt=a(e),k=c(e,"DIV",{class:!0});var W=P(k);g($e.$$.fragment,W),Lt=a(W),qe=c(W,"P",{"data-svelte-h":!0}),T(qe)!=="svelte-oc8yhy"&&(qe.textContent=zo),qt=a(W),G=c(W,"DIV",{class:!0});var Se=P(G);g(Pe.$$.fragment,Se),Yt=a(Se),Ye=c(Se,"P",{"data-svelte-h":!0}),T(Ye)!=="svelte-1x3yxsa"&&(Ye.textContent=Io),Se.forEach(o),Xt=a(W),L=c(W,"DIV",{class:!0});var Ft=P(L);g(De.$$.fragment,Ft),Qt=a(Ft),Xe=c(Ft,"P",{"data-svelte-h":!0}),T(Xe)!=="svelte-1kdvlun"&&(Xe.innerHTML=Uo),Ft.forEach(o),W.forEach(o),Dt=a(e),g(xe.$$.fragment,e),xt=a(e),R=c(e,"DIV",{class:!0});var st=P(R);g(ke.$$.fragment,st),At=a(st),Qe=c(st,"P",{"data-svelte-h":!0}),T(Qe)!=="svelte-s1wkj9"&&(Qe.innerHTML=Jo),Ot=a(st),I=c(st,"DIV",{class:!0});var K=P(I);g(Ce.$$.fragment,K),Kt=a(K),Ae=c(K,"P",{"data-svelte-h":!0}),T(Ae)!=="svelte-1as06yq"&&(Ae.innerHTML=Fo),eo=a(K),g(q.$$.fragment,K),to=a(K),g(Y.$$.fragment,K),K.forEach(o),st.forEach(o),kt=a(e),g(je.$$.fragment,e),Ct=a(e),C=c(e,"DIV",{class:!0});var ee=P(C);g(ze.$$.fragment,ee),oo=a(ee),Oe=c(ee,"P",{"data-svelte-h":!0}),T(Oe)!=="svelte-1w35xhv"&&(Oe.textContent=Ro),no=a(ee),Ke=c(ee,"P",{"data-svelte-h":!0}),T(Ke)!=="svelte-1gjh92c"&&(Ke.innerHTML=Wo),so=a(ee),U=c(ee,"DIV",{class:!0});var te=P(U);g(Ie.$$.fragment,te),ao=a(te),et=c(te,"P",{"data-svelte-h":!0}),T(et)!=="svelte-ab8f44"&&(et.innerHTML=Eo),ro=a(te),g(X.$$.fragment,te),io=a(te),g(Q.$$.fragment,te),te.forEach(o),ee.forEach(o),jt=a(e),g(Ue.$$.fragment,e),zt=a(e),j=c(e,"DIV",{class:!0});var oe=P(j);g(Je.$$.fragment,oe),lo=a(oe),tt=c(oe,"P",{"data-svelte-h":!0}),T(tt)!=="svelte-a7kv1k"&&(tt.textContent=Zo),co=a(oe),ot=c(oe,"P",{"data-svelte-h":!0}),T(ot)!=="svelte-1gjh92c"&&(ot.innerHTML=So),mo=a(oe),J=c(oe,"DIV",{class:!0});var ne=P(J);g(Fe.$$.fragment,ne),po=a(ne),nt=c(ne,"P",{"data-svelte-h":!0}),T(nt)!=="svelte-jxq9fy"&&(nt.innerHTML=No),ho=a(ne),g(A.$$.fragment,ne),go=a(ne),g(O.$$.fragment,ne),ne.forEach(o),oe.forEach(o),It=a(e),g(Re.$$.fragment,e),Ut=a(e),at=c(e,"P",{}),P(at).forEach(o),this.h()},h(){M(n,"name","hf:doc:metadata"),M(n,"content",nn),Vo(S.src,To="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/dpt_architecture.jpg")||M(S,"src",To),M(S,"alt","drawing"),M(S,"width","600"),M(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(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(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,t){l(document.head,n),i(e,v,t),i(e,m,t),i(e,p,t),f(y,e,t),i(e,r,t),f(w,e,t),i(e,it,t),i(e,se,t),i(e,lt,t),i(e,ae,t),i(e,dt,t),i(e,re,t),i(e,ct,t),i(e,S,t),i(e,mt,t),i(e,ie,t),i(e,pt,t),i(e,le,t),i(e,ht,t),f(de,e,t),i(e,gt,t),i(e,ce,t),i(e,ft,t),f(me,e,t),i(e,ut,t),f(pe,e,t),i(e,_t,t),i(e,he,t),i(e,bt,t),i(e,ge,t),i(e,Tt,t),i(e,fe,t),i(e,yt,t),f(ue,e,t),i(e,vt,t),i(e,D,t),f(_e,D,null),l(D,Wt),l(D,Be),l(D,Et),l(D,Ve),l(D,Zt),f(N,D,null),l(D,St),l(D,B),f(be,B,null),l(B,Nt),l(B,He),i(e,wt,t),f(Te,e,t),i(e,Mt,t),i(e,F,t),f(ye,F,null),l(F,Bt),l(F,V),f(ve,V,null),l(V,Vt),l(V,Ge),l(F,Ht),l(F,H),f(we,H,null),l(H,Gt),l(H,Le),i(e,$t,t),f(Me,e,t),i(e,Pt,t),i(e,k,t),f($e,k,null),l(k,Lt),l(k,qe),l(k,qt),l(k,G),f(Pe,G,null),l(G,Yt),l(G,Ye),l(k,Xt),l(k,L),f(De,L,null),l(L,Qt),l(L,Xe),i(e,Dt,t),f(xe,e,t),i(e,xt,t),i(e,R,t),f(ke,R,null),l(R,At),l(R,Qe),l(R,Ot),l(R,I),f(Ce,I,null),l(I,Kt),l(I,Ae),l(I,eo),f(q,I,null),l(I,to),f(Y,I,null),i(e,kt,t),f(je,e,t),i(e,Ct,t),i(e,C,t),f(ze,C,null),l(C,oo),l(C,Oe),l(C,no),l(C,Ke),l(C,so),l(C,U),f(Ie,U,null),l(U,ao),l(U,et),l(U,ro),f(X,U,null),l(U,io),f(Q,U,null),i(e,jt,t),f(Ue,e,t),i(e,zt,t),i(e,j,t),f(Je,j,null),l(j,lo),l(j,tt),l(j,co),l(j,ot),l(j,mo),l(j,J),f(Fe,J,null),l(J,po),l(J,nt),l(J,ho),f(A,J,null),l(J,go),f(O,J,null),i(e,It,t),f(Re,e,t),i(e,Ut,t),i(e,at,t),Jt=!0},p(e,[t]){const z={};t&2&&(z.$$scope={dirty:t,ctx:e}),N.$set(z);const We={};t&2&&(We.$$scope={dirty:t,ctx:e}),q.$set(We);const Z={};t&2&&(Z.$$scope={dirty:t,ctx:e}),Y.$set(Z);const Ee={};t&2&&(Ee.$$scope={dirty:t,ctx:e}),X.$set(Ee);const Ze={};t&2&&(Ze.$$scope={dirty:t,ctx:e}),Q.$set(Ze);const W={};t&2&&(W.$$scope={dirty:t,ctx:e}),A.$set(W);const Se={};t&2&&(Se.$$scope={dirty:t,ctx:e}),O.$set(Se)},i(e){Jt||(u(y.$$.fragment,e),u(w.$$.fragment,e),u(de.$$.fragment,e),u(me.$$.fragment,e),u(pe.$$.fragment,e),u(ue.$$.fragment,e),u(_e.$$.fragment,e),u(N.$$.fragment,e),u(be.$$.fragment,e),u(Te.$$.fragment,e),u(ye.$$.fragment,e),u(ve.$$.fragment,e),u(we.$$.fragment,e),u(Me.$$.fragment,e),u($e.$$.fragment,e),u(Pe.$$.fragment,e),u(De.$$.fragment,e),u(xe.$$.fragment,e),u(ke.$$.fragment,e),u(Ce.$$.fragment,e),u(q.$$.fragment,e),u(Y.$$.fragment,e),u(je.$$.fragment,e),u(ze.$$.fragment,e),u(Ie.$$.fragment,e),u(X.$$.fragment,e),u(Q.$$.fragment,e),u(Ue.$$.fragment,e),u(Je.$$.fragment,e),u(Fe.$$.fragment,e),u(A.$$.fragment,e),u(O.$$.fragment,e),u(Re.$$.fragment,e),Jt=!0)},o(e){_(y.$$.fragment,e),_(w.$$.fragment,e),_(de.$$.fragment,e),_(me.$$.fragment,e),_(pe.$$.fragment,e),_(ue.$$.fragment,e),_(_e.$$.fragment,e),_(N.$$.fragment,e),_(be.$$.fragment,e),_(Te.$$.fragment,e),_(ye.$$.fragment,e),_(ve.$$.fragment,e),_(we.$$.fragment,e),_(Me.$$.fragment,e),_($e.$$.fragment,e),_(Pe.$$.fragment,e),_(De.$$.fragment,e),_(xe.$$.fragment,e),_(ke.$$.fragment,e),_(Ce.$$.fragment,e),_(q.$$.fragment,e),_(Y.$$.fragment,e),_(je.$$.fragment,e),_(ze.$$.fragment,e),_(Ie.$$.fragment,e),_(X.$$.fragment,e),_(Q.$$.fragment,e),_(Ue.$$.fragment,e),_(Je.$$.fragment,e),_(Fe.$$.fragment,e),_(A.$$.fragment,e),_(O.$$.fragment,e),_(Re.$$.fragment,e),Jt=!1},d(e){e&&(o(v),o(m),o(p),o(r),o(it),o(se),o(lt),o(ae),o(dt),o(re),o(ct),o(S),o(mt),o(ie),o(pt),o(le),o(ht),o(gt),o(ce),o(ft),o(ut),o(_t),o(he),o(bt),o(ge),o(Tt),o(fe),o(yt),o(vt),o(D),o(wt),o(Mt),o(F),o($t),o(Pt),o(k),o(Dt),o(xt),o(R),o(kt),o(Ct),o(C),o(jt),o(zt),o(j),o(It),o(Ut),o(at)),o(n),b(y,e),b(w,e),b(de,e),b(me,e),b(pe,e),b(ue,e),b(_e),b(N),b(be),b(Te,e),b(ye),b(ve),b(we),b(Me,e),b($e),b(Pe),b(De),b(xe,e),b(ke),b(Ce),b(q),b(Y),b(je,e),b(ze),b(Ie),b(X),b(Q),b(Ue,e),b(Je),b(Fe),b(A),b(O),b(Re,e)}}}const nn='{"title":"DPT","local":"dpt","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage tips","local":"usage-tips","sections":[],"depth":2},{"title":"Resources","local":"resources","sections":[],"depth":2},{"title":"DPTConfig","local":"transformers.DPTConfig","sections":[],"depth":2},{"title":"DPTFeatureExtractor","local":"transformers.DPTFeatureExtractor","sections":[],"depth":2},{"title":"DPTImageProcessor","local":"transformers.DPTImageProcessor","sections":[],"depth":2},{"title":"DPTModel","local":"transformers.DPTModel","sections":[],"depth":2},{"title":"DPTForDepthEstimation","local":"transformers.DPTForDepthEstimation","sections":[],"depth":2},{"title":"DPTForSemanticSegmentation","local":"transformers.DPTForSemanticSegmentation","sections":[],"depth":2}],"depth":1}';function sn($){return Ho(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class hn extends Go{constructor(n){super(),Lo(this,n,sn,on,Bo,{})}}export{hn as component}; | |
Xet Storage Details
- Size:
- 84.1 kB
- Xet hash:
- 501ba91d30a6e5668caed0bac004d152d55fe4a93918bca7b714a6bfaaf00a65
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.