NeuS: Learning Neural Implicit Surfaces by Volume Rendering for Multi-view Reconstruction
1、Introduction
In NeuS, we propose to represent a surface as the zero-level set of a signed distance function (SDF) and develop a new volume rendering method to train a neural SDF representation.
2、Method
2.1. Rendering Procedure
2.1.1. Scene representation
the scene of an object to be reconstructed is represented by two functions:
- f : R 3 → R f : R^3 → R f:R3→R that maps a spatial position x ∈ R 3 x ∈ R^3 x∈R3 to its signed distance to the object
- c : R 3 × S 2 → R 3 c : R^3 × S^2 → R^3 c:R3×S2→R3 that encodes the color associated with a point x ∈ R 3 x ∈ R^3 x∈R3 and a viewing direction v ∈ S 2 v ∈ S^2 v∈S2.
The surface S S S of the object is represented by the zero-level set of its SDF:
S = { x ∈ R 3 ∣ f ( x ) = 0 } S=\{x\in R^3|f(x)=0\} S={x∈R3∣f(x)=0}
为了引入volume rendering,先引入一个probability density function(called S-density) ϕ s ( f ( x ) ) \phi_s(f(x)) ϕs(f(x)),其中 ϕ s ( x ) = s e − s x / ( 1 + e − s x ) 2 \phi_s(x)=se^{-sx}/(1+e^{-sx})^2 ϕs(x)=se−sx/(1+e−sx)2(logistic density distribution)是Sigmoid function 的导数,因为其计算方便性。
2.1.2. Rendering
将ray记作 { p ( t ) = o + t v ∣ t ≥ 0 } \{p(t)=o+tv|t \geq0\} {p(t)=o+tv∣t≥0},整条ray上的color通过积分得到: C ( o , v ) = ∫ 0 + ∞ w ( t ) c ( p ( t ) , v ) d t C(o,v)=\int^{+\infin}_0w(t)c(p(t),v)dt C(o,v)=∫0+∞w(t)c(p(t),v)dt,其中 w ( t ) w(t) w(t)代表点 p ( t ) p(t) p(t)的权重。
2.1.3. Requirements on weight function
- Unbiased:给定一个camera ray p ( t ) p(t) p(t), w ( t ) w(t) w(t)在ray与surface表面的交叉点上得到一个最大值。即 w ( t ) w(t) w(t)在surface上最大。
- Occlusion-aware: 当两个点有相同的SDF值时,离观测点近的点(深度小)应该有更大的weight(对最终的color的贡献更大)。(例如一条ray打过了多个surface,每个在surface上的点的sdf都是0)
2.1.4. Naive solution
其中最naive的想法是直接将nerf中的volume density作为 w ( t ) w(t) w(t),即:
w ( t ) = T ( t ) σ ( t ) w(t)=T(t)\sigma(t) w(t)=T(t)σ(t)
文中将S-density值作为传统nerf中的densit即 σ ( t ) \sigma(t) σ(t)。随着深度t增大要乘上更多的 T ( t ) = e x p ( − ∫ 0 t σ ( u ) d u ) T(t)=exp(-\int^t_0\sigma(u)du) T(t)=exp(−∫0tσ(u)du),所以 w ( t ) w(t) w(t)会越来越小( T ( t ) < 1 T(t)<1 T(t)<1),因此它是Occlusion-aware但是并不是Unbiased(证明见补充材料)。
因此后续为了解决Unbiased的问题,对于 σ ( t ) \sigma(t) σ(t)的选值进一步优化。
2.1.5. Our solution
入式(4)所示, w ( t ) w(t) w(t)是无偏的,但是不是occlusion-aware因此还是需要遵循volume rendering的形式但是对于density σ ( t ) \sigma(t) σ(t)的选值还需要进一步推导。
首先考虑ray只与surface有一个交点的情况,并且surface是一个平面,这种情况下式(4)满足weight function的两个条件,因此根据此时weight function的表达式转换为volume density的形式,推导出其中 σ ( t ) \sigma(t) σ(t)的表达式。
针对这种情况,signed distance function f ( p ( t ) ) = − ∣ c o s ( θ ) ∣ ∗ ( t − t ∗ ) f(p(t))=-|cos(\theta)|*(t-t^*) f(p(t))=−∣cos(θ)∣∗(t−t∗),其中 θ \theta θ代表view direction v v v 与表面外向法向量 n n n之间的夹角,由于假设表面是平面,所以 ∣ c o s ( θ ) ∣ |cos(\theta)| ∣cos(θ)∣为一个常数, t ∗ t^* t∗代表surface上的点,即 f ( p ( t ∗ ) ) = 0 f(p(t^*))=0 f(p(t∗))=0
volume rendering中 w ( t ) = T ( t ) ρ ( t ) , T ( t ) = e x p ( − ∫ 0 t ρ ( u ) d u ) w(t)=T(t)ρ(t),T(t)=exp(-\int_0^tρ(u)du) w(t)=T(t)ρ(t),T(t)=exp(−∫0tρ(u)du)。
因此有等式(7)
考虑一般情况, − d Φ S d t ( f ( p ( t ) ) ) {-\frac{d\Phi_S}{dt}(f(p(t)))} −dtdΦS(f(p(t)))会是负值,因为其中 Φ S \Phi_S ΦS为sigmoid函数导数为一个0值附近的单峰函数(类似高斯函数),所以随着 f ( p ( t ) ) f(p(t)) f(p(t)) (SDF)小于0且逐渐增大则梯度为正,整个值为负,因此与0取max: