import{s as Qt,n as At,o as Et}from"../chunks/scheduler.7bc62968.js";import{S as $t,i as qt,g as p,s as e,r as ts,m as c,H as d,A as Yt,h as i,f as t,c as l,j as M,u as ns,x as o,n as h,B as u,k as xt,y as r,a as n,v as es,d as ls,t as ps,w as is}from"../chunks/index.2f8492b0.js";import{C as Pt}from"../chunks/CodeBlock.4e96d6f7.js";import{H as gs,E as Dt}from"../chunks/EditOnGithub.2a9ce03a.js";function Kt(Ya){let b,ds,os,us,x,ys,T,Pa=`Neural Radiance Fields are a way of storing a 3D scene within a neural network. This way of storing and representing a scene is often called an implicit representation, since the scene parameters are fully represented by the underlying Multi-Layer Perceptron (MLP).
(As compared to an explicit representation that stores scene parameters like colour or density explicitly in voxel grids.)
This novel way of representing a scene showed very impressive results in the task of <a href="https://en.wikipedia.org/wiki/View_synthesis" rel="nofollow">novel view synthesis</a>, the task of interpolating novel views from camera perspectives that are not in the training set.
Furthermore, it allows us to store large scenes with a smaller memory footprint than explicit representation, since we merely need to store the weights of our neural network compared to voxel grids, which increase in memory size by a cubic term.`,vs,J,ws,_,Da=`The field of NeRFs is relatively young with the first publication by <a href="https://www.matthewtancik.com/nerf" rel="nofollow">Mildenhall et al.</a> appearing in 2020.
Since then, a vast number of papers have been published and fast advancements have been made.
Since 2020, more than 620 preprints and publications have been released, with more than 250 repositories on GitHub. <em>(as of Dec 2023, statistics from <a href="https://paperswithcode.com/method/nerf" rel="nofollow">paperswithcode.com</a>)</em>`,bs,U,Ka=`Since the first formulation of NeRFs requires long training times (up to days on beefy GPUs), there have been a lot of advancements towards faster training and inference.
An important leap was NVIDIA’s <a href="https://nvlabs.github.io/instant-ngp/" rel="nofollow">Instant-ngp</a>, which was released in 2022.
While the model architecture used in this approach is similar to existing ones, the authors introduced a novel encoding method that uses trainable hash-tables.
Thanks to this type of encoding, we can shrink the MLP down significantly without loosing reconstruction quality.
This novel approach was faster to train and query while performing on par quality wise with then state-of-the-art methods.
<a href="https://jonbarron.info/mipnerf360/" rel="nofollow">Mipnerf-360</a>, which was also released in 2022, is also worth mentioning.
Again, the model architecture is the same as for most NeRFs, but the authors introduced a novel scene contraction that allows us to represent scenes that are unbounded in all directions, which is important for real-world applications.
<a href="https://jonbarron.info/zipnerf/" rel="nofollow">Zip-NeRF</a>, released in 2023, combines recent advancements like the encoding from <a href="https://nvlabs.github.io/instant-ngp/" rel="nofollow">Instant-ngp</a> and the scene contraction from <a href="https://jonbarron.info/mipnerf360/" rel="nofollow">Mipnerf-360</a> to handle real-world situation whilst decreasing training times to under an hour.
<em>(this is still measured on beefy GPUs to be fair)</em>`,fs,j,Oa="Since the field of NeRFs is rapidly evolving, we added a section at the end where we will tease the latest research and the possible future direction of NeRFs.",Ms,k,st="But now enough with the history, let’s dive into the intrinsics of NeRFs! 🚀🚀",xs,z,Ts,y,Ha,Js,Tt='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="bold">x</mi><mo>∈</mo><msup><mi mathvariant="double-struck">R</mi><mn>3</mn></msup></mrow><annotation encoding="application/x-tex"> \\mathbf{x} \\in \\mathbb{R}^{3} </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.5782em;vertical-align:-0.0391em;"></span><span class="mord mathbf">x</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">∈</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord mathbb">R</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">3</span></span></span></span></span></span></span></span></span></span></span></span>',_s,Us,Jt='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="bold-italic">θ</mi><mo>∈</mo><msup><mi mathvariant="double-struck">R</mi><mn>2</mn></msup></mrow><annotation encoding="application/x-tex"> \\boldsymbol{\\theta} \\in \\mathbb{R}^{2} </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.7335em;vertical-align:-0.0391em;"></span><span class="mord"><span class="mord"><span class="mord boldsymbol" style="margin-right:0.03194em;">θ</span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">∈</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord mathbb">R</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span></span></span></span></span>',js,ks,_t='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="bold">c</mi><mo>∈</mo><msup><mi mathvariant="double-struck">R</mi><mn>3</mn></msup></mrow><annotation encoding="application/x-tex"> \\mathbf{c} \\in \\mathbb{R}^{3} </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.5782em;vertical-align:-0.0391em;"></span><span class="mord mathbf">c</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">∈</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord mathbb">R</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">3</span></span></span></span></span></span></span></span></span></span></span></span>',zs,Cs,Ut='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>σ</mi><mo>∈</mo><msup><mi mathvariant="double-struck">R</mi><mn>1</mn></msup></mrow><annotation encoding="application/x-tex"> \\sigma \\in \\mathbb{R}^{1}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.5782em;vertical-align:-0.0391em;"></span><span class="mord mathnormal" style="margin-right:0.03588em;">σ</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">∈</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord mathbb">R</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">1</span></span></span></span></span></span></span></span></span></span></span></span>',Is,Rs,jt='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>F</mi><mi mathvariant="normal">Θ</mi></msub><mo>:</mo><mo stretchy="false">(</mo><mi mathvariant="bold">x</mi><mo separator="true">,</mo><mi mathvariant="bold-italic">θ</mi><mo stretchy="false">)</mo><mo>→</mo><mo stretchy="false">(</mo><mi mathvariant="bold">c</mi><mo separator="true">,</mo><mi>σ</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex"> F_{\\mathrm{\\Theta}} : (\\mathbf{x}, \\boldsymbol{\\theta}) \\to (\\mathbf{c},\\sigma) </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8333em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord mathnormal" style="margin-right:0.13889em;">F</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3283em;"><span style="top:-2.55em;margin-left:-0.1389em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathrm mtight">Θ</span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">:</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathbf">x</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord"><span class="mord"><span class="mord boldsymbol" style="margin-right:0.03194em;">θ</span></span></span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">→</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathbf">c</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathnormal" style="margin-right:0.03588em;">σ</span><span class="mclose">)</span></span></span></span>',Zs,Ws,C,at="A simple NeRF pipeline can be summarized with the following picture:",Fs,I,tt='<img src="https://huggingface.co/datasets/hf-vision/course-assets/resolve/main/nerf_pipeline.png" alt="nerf_pipeline"/>',Ns,R,nt='Image from: <a href="https://www.matthewtancik.com/nerf" rel="nofollow">Mildenhall et al. (2020)</a>',Bs,Z,et="<strong>(a)</strong> Sample points and viewing directions along camera rays and pass them through the network.",Vs,W,lt="<strong>(b)</strong> Network output is a colour vector and density value for each sample.",Gs,F,pt="<strong>(c)</strong> Combine the outputs of the network via volumetric rendering to go from discrete samples in 3D space to a 2D image.",Hs,N,it="<strong>(d)</strong> Compute the loss and update network gradients via backpropagation to represent scene.",Ls,B,mt="This is overview is very high level, so for a better understanding, let’s go into the details of the volume rendering and the used loss function.",Xs,V,rt="<strong>Volume Rendering</strong>",Ss,f,La,ms,ot="differentiable",Xa,Qs,kt='<span class="katex-display"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><mi mathvariant="bold">C</mi><mo stretchy="false">(</mo><mi mathvariant="bold">r</mi><mo stretchy="false">)</mo><mo>=</mo><msubsup><mo>∫</mo><msub><mi>t</mi><mi>n</mi></msub><msub><mi>t</mi><mi>f</mi></msub></msubsup><mi>T</mi><mo stretchy="false">(</mo><mi>t</mi><mo stretchy="false">)</mo><mi>σ</mi><mo stretchy="false">(</mo><mi mathvariant="bold">r</mi><mo stretchy="false">(</mo><mi>t</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mi mathvariant="bold">c</mi><mo stretchy="false">(</mo><mi mathvariant="bold">r</mi><mo stretchy="false">(</mo><mi>t</mi><mo stretchy="false">)</mo><mo separator="true">,</mo><mi mathvariant="bold">d</mi><mo stretchy="false">)</mo><mi>d</mi><mi>t</mi></mrow><annotation encoding="application/x-tex">\\mathbf{C}(\\mathbf{r}) = \\int_{t_n}^{t_f}T(t)\\sigma(\\mathbf{r}(t))\\mathbf{c}(\\mathbf{r}(t),\\mathbf{d})dt</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathbf">C</span><span class="mopen">(</span><span class="mord mathbf">r</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:2.5555em;vertical-align:-1.012em;"></span><span class="mop"><span class="mop op-symbol large-op" style="margin-right:0.44445em;position:relative;top:-0.0011em;">∫</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:1.5435em;"><span style="top:-1.7881em;margin-left:-0.4445em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight"><span class="mord mathnormal mtight">t</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.1645em;"><span style="top:-2.357em;margin-left:0em;margin-right:0.0714em;"><span class="pstrut" style="height:2.5em;"></span><span class="sizing reset-size3 size1 mtight"><span class="mord mathnormal mtight">n</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.143em;"><span></span></span></span></span></span></span></span></span></span><span style="top:-3.8129em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight"><span class="mord mathnormal mtight">t</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3448em;"><span style="top:-2.3488em;margin-left:0em;margin-right:0.0714em;"><span class="pstrut" style="height:2.5em;"></span><span class="sizing reset-size3 size1 mtight"><span class="mord mathnormal mtight" style="margin-right:0.10764em;">f</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.2901em;"><span></span></span></span></span></span></span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:1.012em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathnormal" style="margin-right:0.13889em;">T</span><span class="mopen">(</span><span class="mord mathnormal">t</span><span class="mclose">)</span><span class="mord mathnormal" style="margin-right:0.03588em;">σ</span><span class="mopen">(</span><span class="mord mathbf">r</span><span class="mopen">(</span><span class="mord mathnormal">t</span><span class="mclose">))</span><span class="mord mathbf">c</span><span class="mopen">(</span><span class="mord mathbf">r</span><span class="mopen">(</span><span class="mord mathnormal">t</span><span class="mclose">)</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathbf">d</span><span class="mclose">)</span><span class="mord mathnormal">d</span><span class="mord mathnormal">t</span></span></span></span></span>',As,m,Sa,Es,zt='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="bold">C</mi><mo stretchy="false">(</mo><mi mathvariant="bold">r</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex"> \\mathbf{C}(\\mathbf{r}) </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathbf">C</span><span class="mopen">(</span><span class="mord mathbf">r</span><span class="mclose">)</span></span></span></span>',$s,qs,Ct='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="bold">r</mi><mo stretchy="false">(</mo><mi>t</mi><mo stretchy="false">)</mo><mo>=</mo><mi mathvariant="bold">o</mi><mo>+</mo><mi>t</mi><mi mathvariant="bold">d</mi></mrow><annotation encoding="application/x-tex"> \\mathbf{r}(t)=\\mathbf{o}+t\\mathbf{d} </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathbf">r</span><span class="mopen">(</span><span class="mord mathnormal">t</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6667em;vertical-align:-0.0833em;"></span><span class="mord mathbf">o</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">+</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:0.6944em;"></span><span class="mord mathnormal">t</span><span class="mord mathbf">d</span></span></span></span>',Ys,Ps,It='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="bold">o</mi><mo>∈</mo><msup><mi mathvariant="double-struck">R</mi><mn>3</mn></msup></mrow><annotation encoding="application/x-tex"> \\mathbf{o} \\in \\mathbb{R}^{3} </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.5782em;vertical-align:-0.0391em;"></span><span class="mord mathbf">o</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">∈</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord mathbb">R</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">3</span></span></span></span></span></span></span></span></span></span></span></span>',Ds,Ks,Rt='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="bold-italic">d</mi><mo>∈</mo><msup><mi mathvariant="double-struck">R</mi><mn>3</mn></msup></mrow><annotation encoding="application/x-tex"> \\boldsymbol{d} \\in \\mathbb{R}^{3} </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.7335em;vertical-align:-0.0391em;"></span><span class="mord"><span class="mord"><span class="mord boldsymbol">d</span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">∈</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord mathbb">R</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">3</span></span></span></span></span></span></span></span></span></span></span></span>',Os,sa,Zt='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>t</mi><mo>∈</mo><msub><mi mathvariant="double-struck">R</mi><mo>+</mo></msub></mrow><annotation encoding="application/x-tex"> t \\in \\mathbb{R}_+ </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6542em;vertical-align:-0.0391em;"></span><span class="mord mathnormal">t</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">∈</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8972em;vertical-align:-0.2083em;"></span><span class="mord"><span class="mord mathbb">R</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.2583em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mbin mtight">+</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.2083em;"><span></span></span></span></span></span></span></span></span></span>',aa,ta,Wt='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>t</mi><mi>n</mi></msub></mrow><annotation encoding="application/x-tex"> t_n </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.7651em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord mathnormal">t</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.1514em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">n</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span>',na,ea,Ft='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>t</mi><mi>f</mi></msub></mrow><annotation encoding="application/x-tex"> t_f </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.9012em;vertical-align:-0.2861em;"></span><span class="mord"><span class="mord mathnormal">t</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3361em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight" style="margin-right:0.10764em;">f</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.2861em;"><span></span></span></span></span></span></span></span></span></span>',la,pa,Nt='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>T</mi><mo stretchy="false">(</mo><mi>t</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex"> T(t) </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal" style="margin-right:0.13889em;">T</span><span class="mopen">(</span><span class="mord mathnormal">t</span><span class="mclose">)</span></span></span></span>',ia,ma,Bt='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="bold">r</mi><mo stretchy="false">(</mo><mi>t</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex"> \\mathbf{r}(t) </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathbf">r</span><span class="mopen">(</span><span class="mord mathnormal">t</span><span class="mclose">)</span></span></span></span>',ra,oa,Vt='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>t</mi><mi>n</mi></msub></mrow><annotation encoding="application/x-tex"> t_n </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.7651em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord mathnormal">t</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.1514em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">n</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span>',ca,ha,Gt='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>t</mi></mrow><annotation encoding="application/x-tex"> t </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6151em;"></span><span class="mord mathnormal">t</span></span></span></span>',ga,da,G,Qa,ua,Ht='<span class="katex-display"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><mi><mover accent="true"><mi mathvariant="bold-italic">C</mi><mo>^</mo></mover></mi><mo stretchy="false">(</mo><mi mathvariant="bold">r</mi><mo stretchy="false">)</mo><mo>=</mo><munderover><mo>∑</mo><mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow><mi>N</mi></munderover><msub><mi>T</mi><mi>i</mi></msub><mo stretchy="false">(</mo><mn>1</mn><mo>−</mo><mi>exp</mi><mo>⁡</mo><mo stretchy="false">(</mo><mo>−</mo><msub><mi>σ</mi><mi>i</mi></msub><msub><mi>δ</mi><mi>i</mi></msub><mo stretchy="false">)</mo><mo stretchy="false">)</mo><msub><mi mathvariant="bold">c</mi><mi>i</mi></msub><mtext> </mtext><mo separator="true">,</mo><mtext> where </mtext><msub><mi>T</mi><mi>i</mi></msub><mo>=</mo><mi>exp</mi><mo>⁡</mo><mo fence="false" stretchy="true" minsize="2.4em" maxsize="2.4em">(</mo><mo>−</mo><munderover><mo>∑</mo><mrow><mi>j</mi><mo>=</mo><mn>1</mn></mrow><mrow><mi>i</mi><mo>−</mo><mn>1</mn></mrow></munderover><msub><mi>σ</mi><mi>j</mi></msub><msub><mi>δ</mi><mi>j</mi></msub><mo fence="false" stretchy="true" minsize="2.4em" maxsize="2.4em">)</mo></mrow><annotation encoding="application/x-tex">\\boldsymbol{\\hat{C}}(\\mathbf{r})=\\sum_{i=1}^{N}T_i (1-\\exp(-\\sigma_i \\delta_i)) \\mathbf{c}_i\\,, \\textrm{ where }T_i=\\exp \\bigg(-\\sum_{j=1}^{i-1} \\sigma_j \\delta_j \\bigg)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1.1995em;vertical-align:-0.25em;"></span><span class="mord"><span class="mord"><span class="mord accent"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.9495em;"><span style="top:-3em;"><span class="pstrut" style="height:3em;"></span><span class="mord boldsymbol" style="margin-right:0.06979em;">C</span></span><span style="top:-3.2551em;"><span class="pstrut" style="height:3em;"></span><span class="accent-body" style="left:-0.2875em;"><span class="mord mathbf">^</span></span></span></span></span></span></span></span></span><span class="mopen">(</span><span class="mord mathbf">r</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:3.106em;vertical-align:-1.2777em;"></span><span class="mop op-limits"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:1.8283em;"><span style="top:-1.8723em;margin-left:0em;"><span class="pstrut" style="height:3.05em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">i</span><span class="mrel mtight">=</span><span class="mord mtight">1</span></span></span></span><span style="top:-3.05em;"><span class="pstrut" style="height:3.05em;"></span><span><span class="mop op-symbol large-op">∑</span></span></span><span style="top:-4.3em;margin-left:0em;"><span class="pstrut" style="height:3.05em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight" style="margin-right:0.10903em;">N</span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:1.2777em;"><span></span></span></span></span></span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord"><span class="mord mathnormal" style="margin-right:0.13889em;">T</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3117em;"><span style="top:-2.55em;margin-left:-0.1389em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">i</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mopen">(</span><span class="mord">1</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">−</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mop">exp</span><span class="mopen">(</span><span class="mord">−</span><span class="mord"><span class="mord mathnormal" style="margin-right:0.03588em;">σ</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3117em;"><span style="top:-2.55em;margin-left:-0.0359em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">i</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mord"><span class="mord mathnormal" style="margin-right:0.03785em;">δ</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3117em;"><span style="top:-2.55em;margin-left:-0.0379em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">i</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mclose">))</span><span class="mord"><span class="mord mathbf">c</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3117em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">i</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord text"><span class="mord textrm"> where </span></span><span class="mord"><span class="mord mathnormal" style="margin-right:0.13889em;">T</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3117em;"><span style="top:-2.55em;margin-left:-0.1389em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">i</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:2.4em;vertical-align:-0.95em;"></span><span class="mop">exp</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord"><span class="delimsizing size3">(</span></span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">−</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:3.2254em;vertical-align:-1.4138em;"></span><span class="mop op-limits"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:1.8117em;"><span style="top:-1.8723em;margin-left:0em;"><span class="pstrut" style="height:3.05em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight" style="margin-right:0.05724em;">j</span><span class="mrel mtight">=</span><span class="mord mtight">1</span></span></span></span><span style="top:-3.05em;"><span class="pstrut" style="height:3.05em;"></span><span><span class="mop op-symbol large-op">∑</span></span></span><span style="top:-4.3em;margin-left:0em;"><span class="pstrut" style="height:3.05em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">i</span><span class="mbin mtight">−</span><span class="mord mtight">1</span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:1.4138em;"><span></span></span></span></span></span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord"><span class="mord mathnormal" style="margin-right:0.03588em;">σ</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3117em;"><span style="top:-2.55em;margin-left:-0.0359em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight" style="margin-right:0.05724em;">j</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.2861em;"><span></span></span></span></span></span></span><span class="mord"><span class="mord mathnormal" style="margin-right:0.03785em;">δ</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3117em;"><span style="top:-2.55em;margin-left:-0.0379em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight" style="margin-right:0.05724em;">j</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.2861em;"><span></span></span></span></span></span></span><span class="mord"><span class="delimsizing size3">)</span></span></span></span></span></span>',ya,H,ct="Below, you can see a schematic visualisation of a discretized camera ray in order to get a better sense of the variables from above:",va,L,ht='<img src="https://huggingface.co/datasets/hf-vision/course-assets/resolve/main/nerf_ray_visualisation.png" alt="ray_image"/>',wa,X,gt="<strong>Loss formulation</strong>",ba,S,Aa,fa,Lt=`<span class="katex-display"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><msub><mi mathvariant="script">L</mi><mrow><mi mathvariant="normal">r</mi><mi mathvariant="normal">e</mi><mi mathvariant="normal">c</mi><mi mathvariant="normal">o</mi><mi mathvariant="normal">n</mi></mrow></msub><mo stretchy="false">(</mo><mi><mover accent="true"><mi mathvariant="bold-italic">C</mi><mo>^</mo></mover></mi><mo separator="true">,</mo><mi><msup><mi mathvariant="bold-italic">C</mi><mo mathvariant="bold-italic">∗</mo></msup></mi><mo stretchy="false">)</mo><mo>=</mo><msup><mrow><mo fence="true">∥</mo><mi><mover accent="true"><mi mathvariant="bold-italic">C</mi><mo>^</mo></mover></mi><mo>−</mo><mi><msup><mi mathvariant="bold-italic">C</mi><mo mathvariant="bold-italic">∗</mo></msup></mi><mo fence="true">∥</mo></mrow><mn>2</mn></msup></mrow><annotation encoding="application/x-tex">\\mathcal{L}_{\\rm recon}(\\boldsymbol{\\hat{C}},\\boldsymbol{C^*}) = \\left\\|\\boldsymbol{\\hat{C}}-\\boldsymbol{C^*}\\right\\|^2</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1.1995em;vertical-align:-0.25em;"></span><span class="mord"><span class="mord mathcal">L</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.1514em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight"><span class="mord mathrm mtight">recon</span></span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mopen">(</span><span class="mord"><span class="mord"><span class="mord accent"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.9495em;"><span style="top:-3em;"><span class="pstrut" style="height:3em;"></span><span class="mord boldsymbol" style="margin-right:0.06979em;">C</span></span><span style="top:-3.2551em;"><span class="pstrut" style="height:3em;"></span><span class="accent-body" style="left:-0.2875em;"><span class="mord mathbf">^</span></span></span></span></span></span></span></span></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord"><span class="mord"><span class="mord"><span class="mord boldsymbol" style="margin-right:0.06979em;">C</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.7436em;"><span style="top:-3.113em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mbin mathbf mtight">∗</span></span></span></span></span></span></span></span></span></span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:2.004em;vertical-align:-0.65em;"></span><span class="minner"><span class="minner"><span class="mopen"><span class="delimsizing mult"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:1.15em;"><span style="top:-3.15em;"><span class="pstrut" style="height:3.8em;"></span><span style="width:0.556em;height:1.800em;"><svg xmlns="http://www.w3.org/2000/svg" width='0.556em' height='1.800em' viewBox='0 0 556 1800'><path d='M145 15 v585 v600 v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v-600 v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v600 v585 h43z
M367 15 v585 v600 v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v-600 v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v600 v585 h43z'/></svg></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.65em;"><span></span></span></span></span></span></span><span class="mord"><span class="mord"><span class="mord accent"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.9495em;"><span style="top:-3em;"><span class="pstrut" style="height:3em;"></span><span class="mord boldsymbol" style="margin-right:0.06979em;">C</span></span><span style="top:-3.2551em;"><span class="pstrut" style="height:3em;"></span><span class="accent-body" style="left:-0.2875em;"><span class="mord mathbf">^</span></span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">−</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mord"><span class="mord"><span class="mord"><span class="mord boldsymbol" style="margin-right:0.06979em;">C</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.7436em;"><span style="top:-3.113em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mbin mathbf mtight">∗</span></span></span></span></span></span></span></span></span></span><span class="mclose"><span class="delimsizing mult"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:1.15em;"><span style="top:-3.15em;"><span class="pstrut" style="height:3.8em;"></span><span style="width:0.556em;height:1.800em;"><svg xmlns="http://www.w3.org/2000/svg" width='0.556em' height='1.800em' viewBox='0 0 556 1800'><path d='M145 15 v585 v600 v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v-600 v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v600 v585 h43z
M367 15 v585 v600 v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v-600 v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v600 v585 h43z'/></svg></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.65em;"><span></span></span></span></span></span></span></span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:1.354em;"><span style="top:-3.6029em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span></span></span></span></span>`,Ma,w,Ea,xa,Xt='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi><mover accent="true"><mi mathvariant="bold-italic">C</mi><mo>^</mo></mover></mi></mrow><annotation encoding="application/x-tex"> \\boldsymbol{\\hat{C}} </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.9495em;"></span><span class="mord"><span class="mord"><span class="mord accent"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.9495em;"><span style="top:-3em;"><span class="pstrut" style="height:3em;"></span><span class="mord boldsymbol" style="margin-right:0.06979em;">C</span></span><span style="top:-3.2551em;"><span class="pstrut" style="height:3em;"></span><span class="accent-body" style="left:-0.2875em;"><span class="mord mathbf">^</span></span></span></span></span></span></span></span></span></span></span></span>',Ta,Ja,St='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mi mathvariant="bold-italic">C</mi><mo>∗</mo></msup></mrow><annotation encoding="application/x-tex"> \\boldsymbol{C}^* </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.7647em;"></span><span class="mord"><span class="mord"><span class="mord"><span class="mord boldsymbol" style="margin-right:0.06979em;">C</span></span></span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.7647em;"><span style="top:-3.139em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mbin mtight">∗</span></span></span></span></span></span></span></span></span></span></span>',_a,Ua,Q,dt="<strong>Additional remarks</strong>",ja,A,ut=`It is very hard to describe the whole NeRF pipeline in detail within a single chapter.
The explanations above are important to understand the basic concepts and similar if not identical in every NeRF model.
However, some additional tricks are needed to obtain a well performing model.`,ka,E,yt=`First of all, it is necesarry to encode input signals in order to capture high-frequency variations in colour and geometry.
The practice of encoding inputs before passing them through a neural network is not unique to the NeRF domain but also widely adopted in other ML domains like for example Natural Language Processing (NLP).
A very simple encoding where we map the inputs to a higher dimensional space, enabling us to capture high frequency variations in scene parameters could look as follows:`,za,$,Ca,q,vt="The output should look something like the image below:",Ia,Y,wt='<img src="https://huggingface.co/datasets/hf-vision/course-assets/resolve/main/nerf_encodings.png" alt="encoding"/>',Ra,P,bt=`The second trick worth mentioning is that most methods use smart approaches to sample points in space.
Essentially, we want to avoid sampling in regions where the scene is empty.
There are various approaches to concentrate samples in regions that contribute most to the final image, but the most prominent one is to use a second network, often called <em>proposal network</em> so that no compute is wasted.
If you are interested in the inner workings and optimisation of such a <em>proposal network</em>, feel free to dig into the publication of <a href="https://jonbarron.info/mipnerf360/" rel="nofollow">Mipnerf-360</a>, where it was first proposed.`,Za,D,Wa,K,ft=`To get the full experience when training your first NeRF, I recommend taking a look at the awesome <a href="https://colab.research.google.com/github/nerfstudio-project/nerfstudio/blob/main/colab/demo.ipynb" rel="nofollow">Google Colab notebook from the nerfstudio team</a>.
There, you can upload images of a scene of your choice and train a NeRF. You could for example fit a model to represent your living room. 🎉🎉`,Fa,O,Na,ss,Mt=`The field is rapidly evolving and the number of new publications is almost exploding.
Concerning training and rendering speed, <a href="https://vr-nerf.github.io" rel="nofollow">VR-NeRF</a> and <a href="https://smerf-3d.github.io" rel="nofollow">SMERF</a> show very promising results.
We believe that we will soon be able to stream a real-world scene in real-time on an edge device, and this is a huge leap towards a realistic <em>Metaverse</em>.
However, the research in the field of NeRFs is not only focusing on training and inference speed, but encompasses various directions like, Generative NeRFs, Pose Estimation, Deformable NeRFs, Compositionality and many more.
If you are interested in a curated list of NeRF publications, checkout <a href="https://github.com/awesome-NeRF/awesome-NeRF" rel="nofollow">Awesome-NeRF</a>.`,Ba,as,Va,cs,Ga;return x=new gs({props:{title:"Neural Radiance Fields (NeRFs)",local:"neural-radiance-fields-nerfs",headingTag:"h1"}}),J=new gs({props:{title:"Short History 📖",local:"short-history-",headingTag:"h2"}}),z=new gs({props:{title:"Underlying approach (Vanilla NeRF) 📘🔍",local:"underlying-approach-vanilla-nerf-",headingTag:"h2"}}),$=new Pt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFpbXBvcnQlMjBtZWRpYXB5JTIwYXMlMjBtZWRpYSUwQWltcG9ydCUyMG51bXB5JTIwYXMlMjBucCUwQSUwQSUwQWRlZiUyMHBvc2l0aW9uYWxfZW5jb2RpbmcoaW5fdGVuc29yJTJDJTIwbnVtX2ZyZXF1ZW5jaWVzJTJDJTIwbWluX2ZyZXFfZXhwJTJDJ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JTIwJTNEJTIwdG9yY2guc3RhY2soJTBBJTIwJTIwJTIwJTIwdG9yY2gubWVzaGdyaWQoeF9zYW1wbGVzJTJDJTIweV9zYW1wbGVzKSUyQyUyMGRpbSUzRC0xJTBBKSUyMCUyMCUyMyUyMCU1QnJlc29sdXRpb24lMkMlMjByZXNvbHV0aW9uJTJDJTIwMiU1RCUwQSUwQSUyMyUyMEFwcGx5JTIwcG9zaXRpb25hbCUyMGVuY29kaW5nJTBBZW5jb2RlZF9ncmlkJTIwJTNEJTIwcG9zaXRpb25hbF9lbmNvZGluZyhncmlkJTJDJTIwbnVtX2ZyZXF1ZW5jaWVzJTJDJTIwbWluX2ZyZXFfZXhwJTJDJTIwbWF4X2ZyZXFfZXhwKSUwQSUwQSUyMyUyMFZpc3VhbGl6ZSUyMHJlc3VsdCUwQXZpc3VhbGl6ZV9ncmlkKGdyaWQlMkMlMjBlbmNvZGVkX2dyaWQlMkMlMjByZXNvbHV0aW9uKQ==",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">import</span> mediapy <span class="hljs-keyword">as</span> media
<span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np


<span class="hljs-keyword">def</span> <span class="hljs-title function_">positional_encoding</span>(<span class="hljs-params">in_tensor, num_frequencies, min_freq_exp, max_freq_exp</span>):
    <span class="hljs-string">&quot;&quot;&quot;Function for positional encoding.&quot;&quot;&quot;</span>
    <span class="hljs-comment"># Scale input tensor to [0, 2 * pi]</span>
    scaled_in_tensor = <span class="hljs-number">2</span> * np.pi * in_tensor
    <span class="hljs-comment"># Generate frequency spectrum</span>
    freqs = <span class="hljs-number">2</span> ** torch.linspace(
        min_freq_exp, max_freq_exp, num_frequencies, device=in_tensor.device
    )
    <span class="hljs-comment"># Generate encodings</span>
    scaled_inputs = scaled_in_tensor.unsqueeze(-<span class="hljs-number">1</span>) * freqs
    encoded_inputs = torch.cat(
        [torch.sin(scaled_inputs), torch.cos(scaled_inputs)], dim=-<span class="hljs-number">1</span>
    )
    <span class="hljs-keyword">return</span> encoded_inputs.view(*in_tensor.shape[:-<span class="hljs-number">1</span>], -<span class="hljs-number">1</span>)


<span class="hljs-keyword">def</span> <span class="hljs-title function_">visualize_grid</span>(<span class="hljs-params">grid, encoded_images, resolution</span>):
    <span class="hljs-string">&quot;&quot;&quot;Helper Function to visualize grid.&quot;&quot;&quot;</span>
    <span class="hljs-comment"># Split the grid into separate channels for x and y</span>
    x_channel, y_channel = grid[..., <span class="hljs-number">0</span>], grid[..., <span class="hljs-number">1</span>]
    <span class="hljs-comment"># Show the original grid</span>
    <span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Input Values:&quot;</span>)
    media.show_images([x_channel, y_channel], cmap=<span class="hljs-string">&quot;plasma&quot;</span>, border=<span class="hljs-literal">True</span>)
    <span class="hljs-comment"># Show the encoded grid</span>
    <span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Encoded Values:&quot;</span>)
    num_channels_to_visualize = <span class="hljs-built_in">min</span>(
        <span class="hljs-number">8</span>, encoded_images.shape[-<span class="hljs-number">1</span>]
    )  <span class="hljs-comment"># Visualize up to 8 channels</span>
    encoded_images_to_show = encoded_images.view(resolution, resolution, -<span class="hljs-number">1</span>).permute(
        <span class="hljs-number">2</span>, <span class="hljs-number">0</span>, <span class="hljs-number">1</span>
    )[:num_channels_to_visualize]
    media.show_images(encoded_images_to_show, vmin=-<span class="hljs-number">1</span>, vmax=<span class="hljs-number">1</span>, cmap=<span class="hljs-string">&quot;plasma&quot;</span>, border=<span class="hljs-literal">True</span>)


<span class="hljs-comment"># Parameters similar to your NeRFEncoding example</span>
num_frequencies = <span class="hljs-number">4</span>
min_freq_exp = <span class="hljs-number">0</span>
max_freq_exp = <span class="hljs-number">6</span>
resolution = <span class="hljs-number">128</span>

<span class="hljs-comment"># Generate a 2D grid of points in the range [0, 1]</span>
x_samples = torch.linspace(<span class="hljs-number">0</span>, <span class="hljs-number">1</span>, resolution)
y_samples = torch.linspace(<span class="hljs-number">0</span>, <span class="hljs-number">1</span>, resolution)
grid = torch.stack(
    torch.meshgrid(x_samples, y_samples), dim=-<span class="hljs-number">1</span>
)  <span class="hljs-comment"># [resolution, resolution, 2]</span>

<span class="hljs-comment"># Apply positional encoding</span>
encoded_grid = positional_encoding(grid, num_frequencies, min_freq_exp, max_freq_exp)

<span class="hljs-comment"># Visualize result</span>
visualize_grid(grid, encoded_grid, resolution)`,wrap:!1}}),D=new gs({props:{title:"Train your own NeRF",local:"train-your-own-nerf",headingTag:"h2"}}),O=new gs({props:{title:"Current advancements in the field",local:"current-advancements-in-the-field",headingTag:"h2"}}),as=new Dt({props:{source:"https://github.com/johko/computer-vision-course/blob/main/chapters/en/unit8/nerf.mdx"}}),{c(){b=p("meta"),ds=e(),os=p("p"),us=e(),ts(x.$$.fragment),ys=e(),T=p("p"),T.innerHTML=Pa,vs=e(),ts(J.$$.fragment),ws=e(),_=p("p"),_.innerHTML=Da,bs=e(),U=p("p"),U.innerHTML=Ka,fs=e(),j=p("p"),j.textContent=Oa,Ms=e(),k=p("p"),k.textContent=st,xs=e(),ts(z.$$.fragment),Ts=e(),y=p("p"),Ha=c("The fundamental idea behind NeRFs is to represent a scene as a continuous function that maps a position,"),Js=new d(!1),_s=c(", and a viewing direction, "),Us=new d(!1),js=c(", to a colour"),ks=new d(!1),zs=c(" and volume density"),Cs=new d(!1),Is=c(`.
As neural networks can serve as universal function approximators, we can approximate this continuous function that represents the scene with a simple Multi-Layer Perceptron (MLP)`),Rs=new d(!1),Zs=c("."),Ws=e(),C=p("p"),C.textContent=at,Fs=e(),I=p("p"),I.innerHTML=tt,Ns=e(),R=p("p"),R.innerHTML=nt,Bs=e(),Z=p("p"),Z.innerHTML=et,Vs=e(),W=p("p"),W.innerHTML=lt,Gs=e(),F=p("p"),F.innerHTML=pt,Hs=e(),N=p("p"),N.innerHTML=it,Ls=e(),B=p("p"),B.textContent=mt,Xs=e(),V=p("p"),V.innerHTML=rt,Ss=e(),f=p("p"),La=c(`The principles behind the process of volumetric rendering are well established in classical computer graphics pipelines and do not stem from NeRFs.
What is important for the use case of NeRFs is that this step is `),ms=p("strong"),ms.textContent=ot,Xa=c(` in order to allow for backpropagation. The simplest form of volumetric rendering in NeRFs can be formulated as follows:
`),Qs=new d(!1),As=e(),m=p("p"),Sa=c("In the equation above,"),Es=new d(!1),$s=c(" is the expected colour of a camera ray"),qs=new d(!1),Ys=c(", where"),Ps=new d(!1),Ds=c(" is the origin of the camera,"),Ks=new d(!1),Os=c(" is the viewing direction as a 3D unit vector and"),sa=new d(!1),aa=c(" is the distance along the ray. "),ta=new d(!1),na=c(" and"),ea=new d(!1),la=c(" stand for the near and far bounds of the ray, respectively. "),pa=new d(!1),ia=c(" denotes the accumulated transmittance along ray"),ma=new d(!1),ra=c(" from"),oa=new d(!1),ca=c(" to"),ha=new d(!1),ga=c("."),da=e(),G=p("p"),Qa=c(`After discretization, the equation above can be computed as the following sum:
`),ua=new d(!1),ya=e(),H=p("p"),H.textContent=ct,va=e(),L=p("p"),L.innerHTML=ht,wa=e(),X=p("p"),X.innerHTML=gt,ba=e(),S=p("p"),Aa=c(`As the discretized volumetric rendeing equation is fully differentiable, the weights of the underlying neural network can then be trained using a reconstruction loss on the rendered pixels.
Many NeRF approaches use a pixel-wise error term that can be written as follows:
`),fa=new d(!1),Ma=e(),w=p("p"),Ea=c(",where"),xa=new d(!1),Ta=c(" is the rendered pixel colour and"),Ja=new d(!1),_a=c(" is the ground truth pixel colour."),Ua=e(),Q=p("p"),Q.innerHTML=dt,ja=e(),A=p("p"),A.textContent=ut,ka=e(),E=p("p"),E.textContent=yt,za=e(),ts($.$$.fragment),Ca=e(),q=p("p"),q.textContent=vt,Ia=e(),Y=p("p"),Y.innerHTML=wt,Ra=e(),P=p("p"),P.innerHTML=bt,Za=e(),ts(D.$$.fragment),Wa=e(),K=p("p"),K.innerHTML=ft,Fa=e(),ts(O.$$.fragment),Na=e(),ss=p("p"),ss.innerHTML=Mt,Ba=e(),ts(as.$$.fragment),Va=e(),cs=p("p"),this.h()},l(s){const a=Yt("svelte-u9bgzb",document.head);b=i(a,"META",{name:!0,content:!0}),a.forEach(t),ds=l(s),os=i(s,"P",{}),M(os).forEach(t),us=l(s),ns(x.$$.fragment,s),ys=l(s),T=i(s,"P",{"data-svelte-h":!0}),o(T)!=="svelte-jul4ou"&&(T.innerHTML=Pa),vs=l(s),ns(J.$$.fragment,s),ws=l(s),_=i(s,"P",{"data-svelte-h":!0}),o(_)!=="svelte-b8xglz"&&(_.innerHTML=Da),bs=l(s),U=i(s,"P",{"data-svelte-h":!0}),o(U)!=="svelte-16j6utc"&&(U.innerHTML=Ka),fs=l(s),j=i(s,"P",{"data-svelte-h":!0}),o(j)!=="svelte-1tm1mze"&&(j.textContent=Oa),Ms=l(s),k=i(s,"P",{"data-svelte-h":!0}),o(k)!=="svelte-pma9sc"&&(k.textContent=st),xs=l(s),ns(z.$$.fragment,s),Ts=l(s),y=i(s,"P",{});var v=M(y);Ha=h(v,"The fundamental idea behind NeRFs is to represent a scene as a continuous function that maps a position,"),Js=u(v,!1),_s=h(v,", and a viewing direction, "),Us=u(v,!1),js=h(v,", to a colour"),ks=u(v,!1),zs=h(v," and volume density"),Cs=u(v,!1),Is=h(v,`.
As neural networks can serve as universal function approximators, we can approximate this continuous function that represents the scene with a simple Multi-Layer Perceptron (MLP)`),Rs=u(v,!1),Zs=h(v,"."),v.forEach(t),Ws=l(s),C=i(s,"P",{"data-svelte-h":!0}),o(C)!=="svelte-y9lvf0"&&(C.textContent=at),Fs=l(s),I=i(s,"P",{"data-svelte-h":!0}),o(I)!=="svelte-1rmodno"&&(I.innerHTML=tt),Ns=l(s),R=i(s,"P",{"data-svelte-h":!0}),o(R)!=="svelte-1ka629u"&&(R.innerHTML=nt),Bs=l(s),Z=i(s,"P",{"data-svelte-h":!0}),o(Z)!=="svelte-1tobfln"&&(Z.innerHTML=et),Vs=l(s),W=i(s,"P",{"data-svelte-h":!0}),o(W)!=="svelte-1c917er"&&(W.innerHTML=lt),Gs=l(s),F=i(s,"P",{"data-svelte-h":!0}),o(F)!=="svelte-1oxe61n"&&(F.innerHTML=pt),Hs=l(s),N=i(s,"P",{"data-svelte-h":!0}),o(N)!=="svelte-9jqkju"&&(N.innerHTML=it),Ls=l(s),B=i(s,"P",{"data-svelte-h":!0}),o(B)!=="svelte-105mi7d"&&(B.textContent=mt),Xs=l(s),V=i(s,"P",{"data-svelte-h":!0}),o(V)!=="svelte-8gnilz"&&(V.innerHTML=rt),Ss=l(s),f=i(s,"P",{});var hs=M(f);La=h(hs,`The principles behind the process of volumetric rendering are well established in classical computer graphics pipelines and do not stem from NeRFs.
What is important for the use case of NeRFs is that this step is `),ms=i(hs,"STRONG",{"data-svelte-h":!0}),o(ms)!=="svelte-tu9yc4"&&(ms.textContent=ot),Xa=h(hs,` in order to allow for backpropagation. The simplest form of volumetric rendering in NeRFs can be formulated as follows:
`),Qs=u(hs,!1),hs.forEach(t),As=l(s),m=i(s,"P",{});var g=M(m);Sa=h(g,"In the equation above,"),Es=u(g,!1),$s=h(g," is the expected colour of a camera ray"),qs=u(g,!1),Ys=h(g,", where"),Ps=u(g,!1),Ds=h(g," is the origin of the camera,"),Ks=u(g,!1),Os=h(g," is the viewing direction as a 3D unit vector and"),sa=u(g,!1),aa=h(g," is the distance along the ray. "),ta=u(g,!1),na=h(g," and"),ea=u(g,!1),la=h(g," stand for the near and far bounds of the ray, respectively. "),pa=u(g,!1),ia=h(g," denotes the accumulated transmittance along ray"),ma=u(g,!1),ra=h(g," from"),oa=u(g,!1),ca=h(g," to"),ha=u(g,!1),ga=h(g,"."),g.forEach(t),da=l(s),G=i(s,"P",{});var $a=M(G);Qa=h($a,`After discretization, the equation above can be computed as the following sum:
`),ua=u($a,!1),$a.forEach(t),ya=l(s),H=i(s,"P",{"data-svelte-h":!0}),o(H)!=="svelte-1lchi64"&&(H.textContent=ct),va=l(s),L=i(s,"P",{"data-svelte-h":!0}),o(L)!=="svelte-130vc1o"&&(L.innerHTML=ht),wa=l(s),X=i(s,"P",{"data-svelte-h":!0}),o(X)!=="svelte-1ylz9no"&&(X.innerHTML=gt),ba=l(s),S=i(s,"P",{});var qa=M(S);Aa=h(qa,`As the discretized volumetric rendeing equation is fully differentiable, the weights of the underlying neural network can then be trained using a reconstruction loss on the rendered pixels.
Many NeRF approaches use a pixel-wise error term that can be written as follows:
`),fa=u(qa,!1),qa.forEach(t),Ma=l(s),w=i(s,"P",{});var rs=M(w);Ea=h(rs,",where"),xa=u(rs,!1),Ta=h(rs," is the rendered pixel colour and"),Ja=u(rs,!1),_a=h(rs," is the ground truth pixel colour."),rs.forEach(t),Ua=l(s),Q=i(s,"P",{"data-svelte-h":!0}),o(Q)!=="svelte-1fogha9"&&(Q.innerHTML=dt),ja=l(s),A=i(s,"P",{"data-svelte-h":!0}),o(A)!=="svelte-900j4b"&&(A.textContent=ut),ka=l(s),E=i(s,"P",{"data-svelte-h":!0}),o(E)!=="svelte-wakkft"&&(E.textContent=yt),za=l(s),ns($.$$.fragment,s),Ca=l(s),q=i(s,"P",{"data-svelte-h":!0}),o(q)!=="svelte-v8crjg"&&(q.textContent=vt),Ia=l(s),Y=i(s,"P",{"data-svelte-h":!0}),o(Y)!=="svelte-q7lmzd"&&(Y.innerHTML=wt),Ra=l(s),P=i(s,"P",{"data-svelte-h":!0}),o(P)!=="svelte-92cgsm"&&(P.innerHTML=bt),Za=l(s),ns(D.$$.fragment,s),Wa=l(s),K=i(s,"P",{"data-svelte-h":!0}),o(K)!=="svelte-zhe5l7"&&(K.innerHTML=ft),Fa=l(s),ns(O.$$.fragment,s),Na=l(s),ss=i(s,"P",{"data-svelte-h":!0}),o(ss)!=="svelte-z2v2y8"&&(ss.innerHTML=Mt),Ba=l(s),ns(as.$$.fragment,s),Va=l(s),cs=i(s,"P",{}),M(cs).forEach(t),this.h()},h(){xt(b,"name","hf:doc:metadata"),xt(b,"content",Ot),Js.a=_s,Us.a=js,ks.a=zs,Cs.a=Is,Rs.a=Zs,Qs.a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),n(s,Ua,a),n(s,Q,a),n(s,ja,a),n(s,A,a),n(s,ka,a),n(s,E,a),n(s,za,a),es($,s,a),n(s,Ca,a),n(s,q,a),n(s,Ia,a),n(s,Y,a),n(s,Ra,a),n(s,P,a),n(s,Za,a),es(D,s,a),n(s,Wa,a),n(s,K,a),n(s,Fa,a),es(O,s,a),n(s,Na,a),n(s,ss,a),n(s,Ba,a),es(as,s,a),n(s,Va,a),n(s,cs,a),Ga=!0},p:At,i(s){Ga||(ls(x.$$.fragment,s),ls(J.$$.fragment,s),ls(z.$$.fragment,s),ls($.$$.fragment,s),ls(D.$$.fragment,s),ls(O.$$.fragment,s),ls(as.$$.fragment,s),Ga=!0)},o(s){ps(x.$$.fragment,s),ps(J.$$.fragment,s),ps(z.$$.fragment,s),ps($.$$.fragment,s),ps(D.$$.fragment,s),ps(O.$$.fragment,s),ps(as.$$.fragment,s),Ga=!1},d(s){s&&(t(ds),t(os),t(us),t(ys),t(T),t(vs),t(ws),t(_),t(bs),t(U),t(fs),t(j),t(Ms),t(k),t(xs),t(Ts),t(y),t(Ws),t(C),t(Fs),t(I),t(Ns),t(R),t(Bs),t(Z),t(Vs),t(W),t(Gs),t(F),t(Hs),t(N),t(Ls),t(B),t(Xs),t(V),t(Ss),t(f),t(As),t(m),t(da),t(G),t(ya),t(H),t(va),t(L),t(wa),t(X),t(ba),t(S),t(Ma),t(w),t(Ua),t(Q),t(ja),t(A),t(ka),t(E),t(za),t(Ca),t(q),t(Ia),t(Y),t(Ra),t(P),t(Za),t(Wa),t(K),t(Fa),t(Na),t(ss),t(Ba),t(Va),t(cs)),t(b),is(x,s),is(J,s),is(z,s),is($,s),is(D,s),is(O,s),is(as,s)}}}const Ot='{"title":"Neural Radiance Fields (NeRFs)","local":"neural-radiance-fields-nerfs","sections":[{"title":"Short History 📖","local":"short-history-","sections":[],"depth":2},{"title":"Underlying approach (Vanilla NeRF) 📘🔍","local":"underlying-approach-vanilla-nerf-","sections":[],"depth":2},{"title":"Train your own NeRF","local":"train-your-own-nerf","sections":[],"depth":2},{"title":"Current advancements in the field","local":"current-advancements-in-the-field","sections":[],"depth":2}],"depth":1}';function sn(Ya){return Et(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ln extends $t{constructor(b){super(),qt(this,b,sn,Kt,Qt,{})}}export{ln as component};
