import{S as Js,i as _s,s as ks,e as i,k as p,w,t as h,M as Us,c as n,d as t,m as r,a as o,x as v,h as m,b as c,N as Pt,G as a,g as l,y as M,q as b,o as $,B as j,v as Es}from"../../chunks/vendor-hf-doc-builder.js";import{T as Ts}from"../../chunks/Tip-hf-doc-builder.js";import{I as St}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as G}from"../../chunks/CodeBlock-hf-doc-builder.js";function Zs(Ee){let u,y,f,J,E,d,V;return{c(){u=h(`The task illustrated in this tutorial is supported by the following model architectures:

`),y=i("p"),f=i("a"),J=h("DPT"),E=h(", "),d=i("a"),V=h("GLPN"),this.h()},l(g){u=m(g,`The task illustrated in this tutorial is supported by the following model architectures:

`),y=n(g,"P",{});var _=o(y);f=n(_,"A",{href:!0});var x=o(f);J=m(x,"DPT"),x.forEach(t),E=m(_,", "),d=n(_,"A",{href:!0});var T=o(d);V=m(T,"GLPN"),T.forEach(t),_.forEach(t),this.h()},h(){c(f,"href","../model_doc/dpt"),c(d,"href","../model_doc/glpn")},m(g,_){l(g,u,_),l(g,y,_),a(y,f),a(f,J),a(y,E),a(y,d),a(d,V)},d(g){g&&t(u),g&&t(y)}}}function Ws(Ee){let u,y,f,J,E,d,V,g,_,x,T,ht,Te,le,mt,Ze,I,We,ie,ct,Ge,R,ve,ft,ut,Me,dt,Ie,ne,gt,Re,A,Be,Z,B,be,H,yt,$e,wt,ze,k,vt,oe,Mt,bt,P,$t,jt,Ne,S,Ce,pe,Jt,Ve,X,xe,F,re,Xt,Ae,he,_t,He,Q,Pe,U,kt,je,Ut,Et,Je,Tt,Zt,Se,me,Wt,Xe,Y,Fe,D,ce,Ft,Qe,W,z,_e,q,Gt,ke,It,Ye,fe,Rt,De,N,Bt,L,zt,Nt,qe,K,Le,C,Ct,Ue,Vt,xt,Ke,O,Oe,ue,At,et,ee,tt,de,Ht,st,te,at,se,ge,Qt,lt;return d=new St({}),I=new Ts({props:{$$slots:{default:[Zs]},$$scope:{ctx:Ee}}}),A=new G({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1xJTIwdHJhbnNmb3JtZXJz",highlighted:"pip install -q transformers"}}),H=new St({}),S=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBY2hlY2twb2ludCUyMCUzRCUyMCUyMnZpbnZpbm8wMiUyRmdscG4tbnl1JTIyJTBBZGVwdGhfZXN0aW1hdG9yJTIwJTNEJTIwcGlwZWxpbmUoJTIyZGVwdGgtZXN0aW1hdGlvbiUyMiUyQyUyMG1vZGVsJTNEY2hlY2twb2ludCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>checkpoint = <span class="hljs-string">&quot;vinvino02/glpn-nyu&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>depth_estimator = pipeline(<span class="hljs-string">&quot;depth-estimation&quot;</span>, model=checkpoint)`}}),X=new G({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwcyUzQSUyRiUyRnVuc3BsYXNoLmNvbSUyRnBob3RvcyUyRkh3QkFzU2JQQkRVJTJGZG93bmxvYWQlM0ZpeGlkJTNETW53eE1qQTNmREI4TVh4elpXRnlZMmg4TXpSOGZHTmhjaVV5TUdsdUpUSXdkR2hsSlRJd2MzUnlaV1YwZkdWdWZEQjhNSHg4ZkRFMk56ZzVNREV3T0RnJTI2Zm9yY2UlM0R0cnVlJTI2dyUzRDY0MCUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQWltYWdl",highlighted:`<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;https://unsplash.com/photos/HwBAsSbPBDU/download?ixid=MnwxMjA3fDB8MXxzZWFyY2h8MzR8fGNhciUyMGluJTIwdGhlJTIwc3RyZWV0fGVufDB8MHx8fDE2Nzg5MDEwODg&amp;force=true&amp;w=640&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`}}),Q=new G({props:{code:"cHJlZGljdGlvbnMlMjAlM0QlMjBkZXB0aF9lc3RpbWF0b3IoaW1hZ2Up",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>predictions = depth_estimator(image)'}}),Y=new G({props:{code:"cHJlZGljdGlvbnMlNUIlMjJkZXB0aCUyMiU1RA==",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>predictions[<span class="hljs-string">&quot;depth&quot;</span>]'}}),q=new St({}),K=new G({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMEF1dG9Nb2RlbEZvckRlcHRoRXN0aW1hdGlvbiUwQSUwQWNoZWNrcG9pbnQlMjAlM0QlMjAlMjJ2aW52aW5vMDIlMkZnbHBuLW55dSUyMiUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoY2hlY2twb2ludCklMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvckRlcHRoRXN0aW1hdGlvbi5mcm9tX3ByZXRyYWluZWQoY2hlY2twb2ludCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, AutoModelForDepthEstimation

<span class="hljs-meta">&gt;&gt;&gt; </span>checkpoint = <span class="hljs-string">&quot;vinvino02/glpn-nyu&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(checkpoint)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForDepthEstimation.from_pretrained(checkpoint)`}}),O=new G({props:{code:"cGl4ZWxfdmFsdWVzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMikucGl4ZWxfdmFsdWVz",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>pixel_values = image_processor(image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).pixel_values'}}),ee=new G({props:{code:"aW1wb3J0JTIwdG9yY2glMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKHBpeGVsX3ZhbHVlcyklMEElMjAlMjAlMjAlMjBwcmVkaWN0ZWRfZGVwdGglMjAlM0QlMjBvdXRwdXRzLnByZWRpY3RlZF9kZXB0aA==",highlighted:`<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">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(pixel_values)
<span class="hljs-meta">... </span>    predicted_depth = outputs.predicted_depth`}}),te=new G({props:{code:"aW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBJTBBJTIzJTIwaW50ZXJwb2xhdGUlMjB0byUyMG9yaWdpbmFsJTIwc2l6ZSUwQXByZWRpY3Rpb24lMjAlM0QlMjB0b3JjaC5ubi5mdW5jdGlvbmFsLmludGVycG9sYXRlKCUwQSUyMCUyMCUyMCUyMHByZWRpY3RlZF9kZXB0aC51bnNxdWVlemUoMSklMkMlMEElMjAlMjAlMjAlMjBzaXplJTNEaW1hZ2Uuc2l6ZSU1QiUzQSUzQS0xJTVEJTJDJTBBJTIwJTIwJTIwJTIwbW9kZSUzRCUyMmJpY3ViaWMlMjIlMkMlMEElMjAlMjAlMjAlMjBhbGlnbl9jb3JuZXJzJTNERmFsc2UlMkMlMEEpLnNxdWVlemUoKSUwQW91dHB1dCUyMCUzRCUyMHByZWRpY3Rpb24ubnVtcHkoKSUwQSUwQWZvcm1hdHRlZCUyMCUzRCUyMChvdXRwdXQlMjAqJTIwMjU1JTIwJTJGJTIwbnAubWF4KG91dHB1dCkpLmFzdHlwZSglMjJ1aW50OCUyMiklMEFkZXB0aCUyMCUzRCUyMEltYWdlLmZyb21hcnJheShmb3JtYXR0ZWQpJTBBZGVwdGg=",highlighted:`<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-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>).squeeze()
<span class="hljs-meta">&gt;&gt;&gt; </span>output = prediction.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)
<span class="hljs-meta">&gt;&gt;&gt; </span>depth`}}),{c(){u=i("meta"),y=p(),f=i("h1"),J=i("a"),E=i("span"),w(d.$$.fragment),V=p(),g=i("span"),_=h("Monocular depth estimation"),x=p(),T=i("p"),ht=h(`Monocular depth estimation is a computer vision task that involves predicting the depth information of a scene from a
single image. In other words, it is the process of estimating the distance of objects in a scene from
a single camera viewpoint.`),Te=p(),le=i("p"),mt=h(`Monocular depth estimation has various applications, including 3D reconstruction, augmented reality, autonomous driving,
and robotics. It is a challenging task as it requires the model to understand the complex relationships between objects
in the scene and the corresponding depth information, which can be affected by factors such as lighting conditions,
occlusion, and texture.`),Ze=p(),w(I.$$.fragment),We=p(),ie=i("p"),ct=h("In this guide you\u2019ll learn how to:"),Ge=p(),R=i("ul"),ve=i("li"),ft=h("create a depth estimation pipeline"),ut=p(),Me=i("li"),dt=h("run depth estimation inference by hand"),Ie=p(),ne=i("p"),gt=h("Before you begin, make sure you have all the necessary libraries installed:"),Re=p(),w(A.$$.fragment),Be=p(),Z=i("h2"),B=i("a"),be=i("span"),w(H.$$.fragment),yt=p(),$e=i("span"),wt=h("Depth estimation pipeline"),ze=p(),k=i("p"),vt=h("The simplest way to try out inference with a model supporting depth estimation is to use the corresponding "),oe=i("a"),Mt=h("pipeline()"),bt=h(`.
Instantiate a pipeline from a `),P=i("a"),$t=h("checkpoint on the Hugging Face Hub"),jt=h(":"),Ne=p(),w(S.$$.fragment),Ce=p(),pe=i("p"),Jt=h("Next, choose an image to analyze:"),Ve=p(),w(X.$$.fragment),xe=p(),F=i("div"),re=i("img"),Ae=p(),he=i("p"),_t=h("Pass the image to the pipeline."),He=p(),w(Q.$$.fragment),Pe=p(),U=i("p"),kt=h("The pipeline returns a dictionary with two entries. The first one, called "),je=i("code"),Ut=h("predicted_depth"),Et=h(`, is a tensor with the values
being the depth expressed in meters for each pixel.
The second one, `),Je=i("code"),Tt=h("depth"),Zt=h(", is a PIL image that visualizes the depth estimation result."),Se=p(),me=i("p"),Wt=h("Let\u2019s take a look at the visualized result:"),Xe=p(),w(Y.$$.fragment),Fe=p(),D=i("div"),ce=i("img"),Qe=p(),W=i("h2"),z=i("a"),_e=i("span"),w(q.$$.fragment),Gt=p(),ke=i("span"),It=h("Depth estimation inference by hand"),Ye=p(),fe=i("p"),Rt=h("Now that you\u2019ve seen how to use the depth estimation pipeline, let\u2019s see how we can replicate the same result by hand."),De=p(),N=i("p"),Bt=h("Start by loading the model and associated processor from a "),L=i("a"),zt=h("checkpoint on the Hugging Face Hub"),Nt=h(`.
Here we\u2019ll use the same checkpoint as before:`),qe=p(),w(K.$$.fragment),Le=p(),C=i("p"),Ct=h("Prepare the image input for the model using the "),Ue=i("code"),Vt=h("image_processor"),xt=h(` that will take care of the necessary image transformations
such as resizing and normalization:`),Ke=p(),w(O.$$.fragment),Oe=p(),ue=i("p"),At=h("Pass the prepared inputs through the model:"),et=p(),w(ee.$$.fragment),tt=p(),de=i("p"),Ht=h("Visualize the results:"),st=p(),w(te.$$.fragment),at=p(),se=i("div"),ge=i("img"),this.h()},l(e){const s=Us('[data-svelte="svelte-1phssyn"]',document.head);u=n(s,"META",{name:!0,content:!0}),s.forEach(t),y=r(e),f=n(e,"H1",{class:!0});var ae=o(f);J=n(ae,"A",{id:!0,class:!0,href:!0});var Yt=o(J);E=n(Yt,"SPAN",{});var Dt=o(E);v(d.$$.fragment,Dt),Dt.forEach(t),Yt.forEach(t),V=r(ae),g=n(ae,"SPAN",{});var qt=o(g);_=m(qt,"Monocular depth estimation"),qt.forEach(t),ae.forEach(t),x=r(e),T=n(e,"P",{});var Lt=o(T);ht=m(Lt,`Monocular depth estimation is a computer vision task that involves predicting the depth information of a scene from a
single image. In other words, it is the process of estimating the distance of objects in a scene from
a single camera viewpoint.`),Lt.forEach(t),Te=r(e),le=n(e,"P",{});var Kt=o(le);mt=m(Kt,`Monocular depth estimation has various applications, including 3D reconstruction, augmented reality, autonomous driving,
and robotics. It is a challenging task as it requires the model to understand the complex relationships between objects
in the scene and the corresponding depth information, which can be affected by factors such as lighting conditions,
occlusion, and texture.`),Kt.forEach(t),Ze=r(e),v(I.$$.fragment,e),We=r(e),ie=n(e,"P",{});var Ot=o(ie);ct=m(Ot,"In this guide you\u2019ll learn how to:"),Ot.forEach(t),Ge=r(e),R=n(e,"UL",{});var it=o(R);ve=n(it,"LI",{});var es=o(ve);ft=m(es,"create a depth estimation pipeline"),es.forEach(t),ut=r(it),Me=n(it,"LI",{});var ts=o(Me);dt=m(ts,"run depth estimation inference by hand"),ts.forEach(t),it.forEach(t),Ie=r(e),ne=n(e,"P",{});var ss=o(ne);gt=m(ss,"Before you begin, make sure you have all the necessary libraries installed:"),ss.forEach(t),Re=r(e),v(A.$$.fragment,e),Be=r(e),Z=n(e,"H2",{class:!0});var nt=o(Z);B=n(nt,"A",{id:!0,class:!0,href:!0});var as=o(B);be=n(as,"SPAN",{});var ls=o(be);v(H.$$.fragment,ls),ls.forEach(t),as.forEach(t),yt=r(nt),$e=n(nt,"SPAN",{});var is=o($e);wt=m(is,"Depth estimation pipeline"),is.forEach(t),nt.forEach(t),ze=r(e),k=n(e,"P",{});var ye=o(k);vt=m(ye,"The simplest way to try out inference with a model supporting depth estimation is to use the corresponding "),oe=n(ye,"A",{href:!0});var ns=o(oe);Mt=m(ns,"pipeline()"),ns.forEach(t),bt=m(ye,`.
Instantiate a pipeline from a `),P=n(ye,"A",{href:!0,rel:!0});var os=o(P);$t=m(os,"checkpoint on the Hugging Face Hub"),os.forEach(t),jt=m(ye,":"),ye.forEach(t),Ne=r(e),v(S.$$.fragment,e),Ce=r(e),pe=n(e,"P",{});var ps=o(pe);Jt=m(ps,"Next, choose an image to analyze:"),ps.forEach(t),Ve=r(e),v(X.$$.fragment,e),xe=r(e),F=n(e,"DIV",{class:!0});var rs=o(F);re=n(rs,"IMG",{src:!0,alt:!0}),rs.forEach(t),Ae=r(e),he=n(e,"P",{});var hs=o(he);_t=m(hs,"Pass the image to the pipeline."),hs.forEach(t),He=r(e),v(Q.$$.fragment,e),Pe=r(e),U=n(e,"P",{});var we=o(U);kt=m(we,"The pipeline returns a dictionary with two entries. The first one, called "),je=n(we,"CODE",{});var ms=o(je);Ut=m(ms,"predicted_depth"),ms.forEach(t),Et=m(we,`, is a tensor with the values
being the depth expressed in meters for each pixel.
The second one, `),Je=n(we,"CODE",{});var cs=o(Je);Tt=m(cs,"depth"),cs.forEach(t),Zt=m(we,", is a PIL image that visualizes the depth estimation result."),we.forEach(t),Se=r(e),me=n(e,"P",{});var fs=o(me);Wt=m(fs,"Let\u2019s take a look at the visualized result:"),fs.forEach(t),Xe=r(e),v(Y.$$.fragment,e),Fe=r(e),D=n(e,"DIV",{class:!0});var us=o(D);ce=n(us,"IMG",{src:!0,alt:!0}),us.forEach(t),Qe=r(e),W=n(e,"H2",{class:!0});var ot=o(W);z=n(ot,"A",{id:!0,class:!0,href:!0});var ds=o(z);_e=n(ds,"SPAN",{});var gs=o(_e);v(q.$$.fragment,gs),gs.forEach(t),ds.forEach(t),Gt=r(ot),ke=n(ot,"SPAN",{});var ys=o(ke);It=m(ys,"Depth estimation inference by hand"),ys.forEach(t),ot.forEach(t),Ye=r(e),fe=n(e,"P",{});var ws=o(fe);Rt=m(ws,"Now that you\u2019ve seen how to use the depth estimation pipeline, let\u2019s see how we can replicate the same result by hand."),ws.forEach(t),De=r(e),N=n(e,"P",{});var pt=o(N);Bt=m(pt,"Start by loading the model and associated processor from a "),L=n(pt,"A",{href:!0,rel:!0});var vs=o(L);zt=m(vs,"checkpoint on the Hugging Face Hub"),vs.forEach(t),Nt=m(pt,`.
Here we\u2019ll use the same checkpoint as before:`),pt.forEach(t),qe=r(e),v(K.$$.fragment,e),Le=r(e),C=n(e,"P",{});var rt=o(C);Ct=m(rt,"Prepare the image input for the model using the "),Ue=n(rt,"CODE",{});var Ms=o(Ue);Vt=m(Ms,"image_processor"),Ms.forEach(t),xt=m(rt,` that will take care of the necessary image transformations
such as resizing and normalization:`),rt.forEach(t),Ke=r(e),v(O.$$.fragment,e),Oe=r(e),ue=n(e,"P",{});var bs=o(ue);At=m(bs,"Pass the prepared inputs through the model:"),bs.forEach(t),et=r(e),v(ee.$$.fragment,e),tt=r(e),de=n(e,"P",{});var $s=o(de);Ht=m($s,"Visualize the results:"),$s.forEach(t),st=r(e),v(te.$$.fragment,e),at=r(e),se=n(e,"DIV",{class:!0});var js=o(se);ge=n(js,"IMG",{src:!0,alt:!0}),js.forEach(t),this.h()},h(){c(u,"name","hf:doc:metadata"),c(u,"content",JSON.stringify(Gs)),c(J,"id","monocular-depth-estimation"),c(J,"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"),c(J,"href","#monocular-depth-estimation"),c(f,"class","relative group"),c(B,"id","depth-estimation-pipeline"),c(B,"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"),c(B,"href","#depth-estimation-pipeline"),c(Z,"class","relative group"),c(oe,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.pipeline"),c(P,"href","https://huggingface.co/models?pipeline_tag=depth-estimation&sort=downloads"),c(P,"rel","nofollow"),Pt(re.src,Xt="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/depth-estimation-example.jpg")||c(re,"src",Xt),c(re,"alt","Photo of a busy street"),c(F,"class","flex justify-center"),Pt(ce.src,Ft="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/depth-visualization.png")||c(ce,"src",Ft),c(ce,"alt","Depth estimation visualization"),c(D,"class","flex justify-center"),c(z,"id","depth-estimation-inference-by-hand"),c(z,"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"),c(z,"href","#depth-estimation-inference-by-hand"),c(W,"class","relative group"),c(L,"href","https://huggingface.co/models?pipeline_tag=depth-estimation&sort=downloads"),c(L,"rel","nofollow"),Pt(ge.src,Qt="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/depth-visualization.png")||c(ge,"src",Qt),c(ge,"alt","Depth estimation visualization"),c(se,"class","flex justify-center")},m(e,s){a(document.head,u),l(e,y,s),l(e,f,s),a(f,J),a(J,E),M(d,E,null),a(f,V),a(f,g),a(g,_),l(e,x,s),l(e,T,s),a(T,ht),l(e,Te,s),l(e,le,s),a(le,mt),l(e,Ze,s),M(I,e,s),l(e,We,s),l(e,ie,s),a(ie,ct),l(e,Ge,s),l(e,R,s),a(R,ve),a(ve,ft),a(R,ut),a(R,Me),a(Me,dt),l(e,Ie,s),l(e,ne,s),a(ne,gt),l(e,Re,s),M(A,e,s),l(e,Be,s),l(e,Z,s),a(Z,B),a(B,be),M(H,be,null),a(Z,yt),a(Z,$e),a($e,wt),l(e,ze,s),l(e,k,s),a(k,vt),a(k,oe),a(oe,Mt),a(k,bt),a(k,P),a(P,$t),a(k,jt),l(e,Ne,s),M(S,e,s),l(e,Ce,s),l(e,pe,s),a(pe,Jt),l(e,Ve,s),M(X,e,s),l(e,xe,s),l(e,F,s),a(F,re),l(e,Ae,s),l(e,he,s),a(he,_t),l(e,He,s),M(Q,e,s),l(e,Pe,s),l(e,U,s),a(U,kt),a(U,je),a(je,Ut),a(U,Et),a(U,Je),a(Je,Tt),a(U,Zt),l(e,Se,s),l(e,me,s),a(me,Wt),l(e,Xe,s),M(Y,e,s),l(e,Fe,s),l(e,D,s),a(D,ce),l(e,Qe,s),l(e,W,s),a(W,z),a(z,_e),M(q,_e,null),a(W,Gt),a(W,ke),a(ke,It),l(e,Ye,s),l(e,fe,s),a(fe,Rt),l(e,De,s),l(e,N,s),a(N,Bt),a(N,L),a(L,zt),a(N,Nt),l(e,qe,s),M(K,e,s),l(e,Le,s),l(e,C,s),a(C,Ct),a(C,Ue),a(Ue,Vt),a(C,xt),l(e,Ke,s),M(O,e,s),l(e,Oe,s),l(e,ue,s),a(ue,At),l(e,et,s),M(ee,e,s),l(e,tt,s),l(e,de,s),a(de,Ht),l(e,st,s),M(te,e,s),l(e,at,s),l(e,se,s),a(se,ge),lt=!0},p(e,[s]){const ae={};s&2&&(ae.$$scope={dirty:s,ctx:e}),I.$set(ae)},i(e){lt||(b(d.$$.fragment,e),b(I.$$.fragment,e),b(A.$$.fragment,e),b(H.$$.fragment,e),b(S.$$.fragment,e),b(X.$$.fragment,e),b(Q.$$.fragment,e),b(Y.$$.fragment,e),b(q.$$.fragment,e),b(K.$$.fragment,e),b(O.$$.fragment,e),b(ee.$$.fragment,e),b(te.$$.fragment,e),lt=!0)},o(e){$(d.$$.fragment,e),$(I.$$.fragment,e),$(A.$$.fragment,e),$(H.$$.fragment,e),$(S.$$.fragment,e),$(X.$$.fragment,e),$(Q.$$.fragment,e),$(Y.$$.fragment,e),$(q.$$.fragment,e),$(K.$$.fragment,e),$(O.$$.fragment,e),$(ee.$$.fragment,e),$(te.$$.fragment,e),lt=!1},d(e){t(u),e&&t(y),e&&t(f),j(d),e&&t(x),e&&t(T),e&&t(Te),e&&t(le),e&&t(Ze),j(I,e),e&&t(We),e&&t(ie),e&&t(Ge),e&&t(R),e&&t(Ie),e&&t(ne),e&&t(Re),j(A,e),e&&t(Be),e&&t(Z),j(H),e&&t(ze),e&&t(k),e&&t(Ne),j(S,e),e&&t(Ce),e&&t(pe),e&&t(Ve),j(X,e),e&&t(xe),e&&t(F),e&&t(Ae),e&&t(he),e&&t(He),j(Q,e),e&&t(Pe),e&&t(U),e&&t(Se),e&&t(me),e&&t(Xe),j(Y,e),e&&t(Fe),e&&t(D),e&&t(Qe),e&&t(W),j(q),e&&t(Ye),e&&t(fe),e&&t(De),e&&t(N),e&&t(qe),j(K,e),e&&t(Le),e&&t(C),e&&t(Ke),j(O,e),e&&t(Oe),e&&t(ue),e&&t(et),j(ee,e),e&&t(tt),e&&t(de),e&&t(st),j(te,e),e&&t(at),e&&t(se)}}}const Gs={local:"monocular-depth-estimation",sections:[{local:"depth-estimation-pipeline",title:"Depth estimation pipeline"},{local:"depth-estimation-inference-by-hand",title:"Depth estimation inference by hand"}],title:"Monocular depth estimation"};function Is(Ee){return Es(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Cs extends Js{constructor(u){super();_s(this,u,Is,Ws,ks,{})}}export{Cs as default,Gs as metadata};
