NeRF
input: (x, y, z, θ, φ) 代表输入的采样点位姿
output: (r, g, b, σ) 代表颜色和不透明度



Positional encoding
\[\gamma(p) = \left(\sin(2^0 \pi p), \cos(2^0 \pi p), \sin(2^1 \pi p), \cos(2^1 \pi p), \ldots, \sin(2^{L-1} \pi p), \cos(2^{L-1} \pi p)\right) \]def posenc(x):
# x: position (x,y,z)
rets = [x]
for i in range(L_embed):
for fn in [tf.sin, tf.cos]:
rets.append(fn(2.**i * x))
return tf.concat(rets, -1)
Volume Render
NeRF采用的是一种体积雾的渲染方式,在获取一定范围采样点的(r,g,b,a)之后需要再进行特定积分运算,最终得到对应像素最终的(r,g,b,a),在训练时通过光线采样点积分的得到的像素值
这种特定的积分方式主要只考虑第一个波峰的值,这样可以避免在图片上显现出物体另一面的不透明度高的部分
可以看到示意图中Ray1和Ray2颜色较深(第一个波峰且a不透明度高)的部分权重就大,其余部分相当于权重就比较小。

- $\delta_i = t_{i+1} - t_i$ is the distance between adjacent samples
有助于理解但是错误的解释
input: (x, y, z, θ, φ) 代表输入的相机位姿
output: (r, g, b, σ) 代表颜色和不透明度

Enjoy Reading This Article?
Here are some more articles you might like to read next: