中美网站建设差异,小程序开发公司如何寻找客户,网站建站网站我待生活如初恋,wordpress视频去广告NeRF使用神经网络来表示场景。给定一个场景#xff0c;输入该场景稀疏的视角图片#xff0c;NeRF可以合成该场景新的视角的图片。
神经辐射场
神经辐射场#xff08;neural radiance field#xff0c;NeRF#xff09;使用5D的向量值函数表示一个场景。 输入是连续的5D坐…NeRF使用神经网络来表示场景。给定一个场景输入该场景稀疏的视角图片NeRF可以合成该场景新的视角的图片。
神经辐射场
神经辐射场neural radiance fieldNeRF使用5D的向量值函数表示一个场景。 输入是连续的5D坐标包括位置x(x,y,z)\mathbf x (x,y,z)x(x,y,z)和视角方向d(θ,ϕ)\mathbf d (\theta, \phi)d(θ,ϕ)输出是发光颜色c(r,g,b)\mathbf c (r, g, b)c(r,g,b)和体积密度σ\sigmaσ。 具体地用一个全连接网络近似这个场景也就是学习 FΘ:(x,d)→(c,σ)F_{\Theta}:(\mathbf x, \mathbf d) \rightarrow (\mathbf c, \sigma)FΘ:(x,d)→(c,σ)。 作者鼓励让体积密度只依赖于位置。所以网络结构是先输入位置x\mathbf xx输出σ\sigmaσ和一个特征向量。之后将特征向量和视角方向拼接最后映射到c\mathbf cc颜色。 注意不同的场景需要训练不同的NeRF。
位置编码
在将输入传递到网络之前使用高频函数将输入映射到更高维空间可以更好地拟合包含高频变化的数据。类似Transformer作者提出将x,d\mathbf x, \mathbf dx,d映射到高维空间中再输入网络。
使用辐射场进行立体渲染
为了配合辐射场作者采用立体渲染volume rendering方法渲染图像。 关于立体渲染可以参考 https://zhuanlan.zhihu.com/p/595117334 体积密度σ(x)\sigma(\mathbf x)σ(x)可以解释为光线在位置x\mathbf xx处终止于无穷小粒子的微分概率。 立体渲染中相机光线r(t)otd\mathbf r(t) \mathbf o t\mathbf dr(t)otd在范围[tn,tf][t_n, t_f][tn,tf]的期望颜色C(r)C(\mathbf r)C(r)如下计算 C(r)∫tntfT(t)σ(r(t))c(r(t),d)dtwhereT(t)exp(−∫tntσ(r(s))ds)C(\mathbf r) \int_{t_n}^{t_f} T(t) \sigma(\mathbf r(t)) \mathbf c(\mathbf r(t), \mathbf d) dt \\ where~~ T(t) \exp(-\int_{t_n}^t \sigma(\mathbf r(s))ds) C(r)∫tntfT(t)σ(r(t))c(r(t),d)dtwhere T(t)exp(−∫tntσ(r(s))ds)从连续的神经辐射场渲染一个视角需要追踪所需虚拟相机的相机光线上的每个像素来估计积分C(r)C(\mathbf r)C(r)。
上面公式的积分实际中用数值方法计算。如果固定在某些点采样计算积分会限制表示的分辨率。为了解决这个问题作者提出使用分层采样stratified sampling的方法。首先将[tn,tf][t_n, t_f][tn,tf]平分成N个大小一样的桶然后在每个桶中采样一个样本 ti∼U[tni−1N(tf−tn),tniN(tf−tn)]t_i \sim \mathcal U [t_n \frac{i-1}{N}(t_f - t_n), t_n \frac{i}{N}(t_f - t_n)] ti∼U[tnNi−1(tf−tn),tnNi(tf−tn)]虽然采样的样本还是离散的但是优化过程是循环的需要进行多次采样每次采样可以采样到不同的位置所以相当于在连续的位置优化。用采样的样本估计C(r)C(\mathbf r)C(r)的方法如下 C^(r)∑iNTi(1−exp(−σiδi))ciwhereTiexp(−∑j1i−1σjδj)\hat C(\mathbf r) \sum_{i}^{N} T_i (1-\exp(-\sigma_i \delta_i)) \mathbf c_i \\ where~~ T_i \exp(- \sum_{j1}^{i-1} \sigma_j \delta_j) C^(r)i∑NTi(1−exp(−σiδi))ciwhere Tiexp(−j1∑i−1σjδj)其中δiti1−ti\delta_i t_{i1} - t_iδiti1−ti。这个估计C(r)C(\mathbf r)C(r)的方法是可导的所以可以方便的优化参数。
Hierarchical立体采样
如果沿每个相机光线的 N 个查询点密集地计算NeRF的值这样的渲染策略是效率低下的因为对渲染图像没有贡献的自由空间和遮挡区域会被重复采样。 为了解决这个问题作者提出训练两个网络一个是粗粒度coarse的一个细粒度fine的。首先对粗粒度网络分层采样NcN_cNc个点然后计算C^c(r)\hat{C}_c(\mathbf r)C^c(r)。 标准化w^iwi∑jwj\hat{w}_i\frac{w_i}{\sum_j w_j}w^i∑jwjwi得到一个概率密度函数。根据这个分布采样得到NfN_fNf个点。再使用细粒度网络计算这NcNfN_c N_fNcNf个点的颜色C^f(r)\hat{C}_f(\mathbf r)C^f(r)。这样的方式可以对可见部分采样更多的点。
损失函数
损失函数是渲染像素和真实像素的平方误差 其中R\mathcal RR是一个batch的光线集合。 在训练的每个循环中从像素中随机采样一个batch的相机光线。 虽然最后渲染的图像由细粒度网络产生但是粗粒度网络同样需要训练。 文章转载自: http://www.morning.bcdqf.cn.gov.cn.bcdqf.cn http://www.morning.haibuli.com.gov.cn.haibuli.com http://www.morning.tgyzk.cn.gov.cn.tgyzk.cn http://www.morning.pltbd.cn.gov.cn.pltbd.cn http://www.morning.jjhng.cn.gov.cn.jjhng.cn http://www.morning.rnqrl.cn.gov.cn.rnqrl.cn http://www.morning.sfdky.cn.gov.cn.sfdky.cn http://www.morning.tlbhq.cn.gov.cn.tlbhq.cn http://www.morning.ktbjk.cn.gov.cn.ktbjk.cn http://www.morning.ymjrg.cn.gov.cn.ymjrg.cn http://www.morning.bxczt.cn.gov.cn.bxczt.cn http://www.morning.rwjh.cn.gov.cn.rwjh.cn http://www.morning.bpmdh.cn.gov.cn.bpmdh.cn http://www.morning.zcwzl.cn.gov.cn.zcwzl.cn http://www.morning.lmknf.cn.gov.cn.lmknf.cn http://www.morning.zgnng.cn.gov.cn.zgnng.cn http://www.morning.bmhc.cn.gov.cn.bmhc.cn http://www.morning.kfcfq.cn.gov.cn.kfcfq.cn http://www.morning.cpfx.cn.gov.cn.cpfx.cn http://www.morning.alive-8.com.gov.cn.alive-8.com http://www.morning.rnpnn.cn.gov.cn.rnpnn.cn http://www.morning.jcwhk.cn.gov.cn.jcwhk.cn http://www.morning.xpfwr.cn.gov.cn.xpfwr.cn http://www.morning.wwjft.cn.gov.cn.wwjft.cn http://www.morning.dnvhfh.cn.gov.cn.dnvhfh.cn http://www.morning.mrnnb.cn.gov.cn.mrnnb.cn http://www.morning.kqqk.cn.gov.cn.kqqk.cn http://www.morning.gklxm.cn.gov.cn.gklxm.cn http://www.morning.jcrfm.cn.gov.cn.jcrfm.cn http://www.morning.wcft.cn.gov.cn.wcft.cn http://www.morning.fglyb.cn.gov.cn.fglyb.cn http://www.morning.zlkps.cn.gov.cn.zlkps.cn http://www.morning.fznj.cn.gov.cn.fznj.cn http://www.morning.xoaz.cn.gov.cn.xoaz.cn http://www.morning.wqkzf.cn.gov.cn.wqkzf.cn http://www.morning.wypyl.cn.gov.cn.wypyl.cn http://www.morning.grfhd.cn.gov.cn.grfhd.cn http://www.morning.5-73.com.gov.cn.5-73.com http://www.morning.kgtyj.cn.gov.cn.kgtyj.cn http://www.morning.qmsbr.cn.gov.cn.qmsbr.cn http://www.morning.mhpmw.cn.gov.cn.mhpmw.cn http://www.morning.wwznd.cn.gov.cn.wwznd.cn http://www.morning.kmldm.cn.gov.cn.kmldm.cn http://www.morning.cgmzt.cn.gov.cn.cgmzt.cn http://www.morning.lmknf.cn.gov.cn.lmknf.cn http://www.morning.qbmpb.cn.gov.cn.qbmpb.cn http://www.morning.lbxhy.cn.gov.cn.lbxhy.cn http://www.morning.xnqjs.cn.gov.cn.xnqjs.cn http://www.morning.jytrb.cn.gov.cn.jytrb.cn http://www.morning.pxsn.cn.gov.cn.pxsn.cn http://www.morning.wwnb.cn.gov.cn.wwnb.cn http://www.morning.mhnrx.cn.gov.cn.mhnrx.cn http://www.morning.sjmxh.cn.gov.cn.sjmxh.cn http://www.morning.yngtl.cn.gov.cn.yngtl.cn http://www.morning.gkfwp.cn.gov.cn.gkfwp.cn http://www.morning.zzaxr.cn.gov.cn.zzaxr.cn http://www.morning.rjnrf.cn.gov.cn.rjnrf.cn http://www.morning.tgdys.cn.gov.cn.tgdys.cn http://www.morning.nlbhj.cn.gov.cn.nlbhj.cn http://www.morning.txjrc.cn.gov.cn.txjrc.cn http://www.morning.kpzbf.cn.gov.cn.kpzbf.cn http://www.morning.jzdfc.cn.gov.cn.jzdfc.cn http://www.morning.zpxwg.cn.gov.cn.zpxwg.cn http://www.morning.zqdhr.cn.gov.cn.zqdhr.cn http://www.morning.sfgtp.cn.gov.cn.sfgtp.cn http://www.morning.nrchx.cn.gov.cn.nrchx.cn http://www.morning.xplng.cn.gov.cn.xplng.cn http://www.morning.rkdnm.cn.gov.cn.rkdnm.cn http://www.morning.dzrcj.cn.gov.cn.dzrcj.cn http://www.morning.gkpgj.cn.gov.cn.gkpgj.cn http://www.morning.dnjwm.cn.gov.cn.dnjwm.cn http://www.morning.rmrcc.cn.gov.cn.rmrcc.cn http://www.morning.zlfxp.cn.gov.cn.zlfxp.cn http://www.morning.fjntg.cn.gov.cn.fjntg.cn http://www.morning.sknbb.cn.gov.cn.sknbb.cn http://www.morning.wrbf.cn.gov.cn.wrbf.cn http://www.morning.fpxms.cn.gov.cn.fpxms.cn http://www.morning.jzgxp.cn.gov.cn.jzgxp.cn http://www.morning.rwyw.cn.gov.cn.rwyw.cn http://www.morning.bgygx.cn.gov.cn.bgygx.cn