2DGS梯度推导
Published:
https://en.wikipedia.org/wiki/Matrix_calculus#Scalar-by-vector_identities
Ray-splat points
\[\mathbf{x}=(x z, y z, z, 1)^{\mathrm{T}}=\mathbf{W} P(u, v)=\mathbf{W H}(u, v, 1,1)^{\mathrm{T}}\] \[\hat{\mathbf{x}}=(x, y, z)^{\mathrm{T}}=(\frac{1}{z}, \frac{1}{z}, 1)\mathbf{W} P(u, v)\]Depth
Mean depth
\[D=\sum_i \omega_i z_i\]where
\[\omega_i=T_i \alpha_i \hat{\mathcal{G}}_i(\mathbf{u}(\mathbf{x}))\]is the weight contribution of the
$i$
-th Gaussian and
\[T_i=\prod_{j=1}^{i-1}\left(1-\alpha_j \hat{\mathcal{G}}_j(\mathbf{u}(\mathbf{x}))\right)\]measures its visibility.
- Relative variables
- \[z_i\]
- \[\omega_i\]
Calculate
\(z_i\)
\[\frac{\partial z_{\text {mean }}}{\partial z_i}=\omega_i\] \[\frac{\partial L}{\partial z_i}=\frac{\partial L}{D}\frac{D}{\partial z_i}=\frac{\partial L}{D}\omega_i\]Calculate
\(\omega_i\)
\[\frac{\partial z_{\text {mean }}}{\partial \omega_i}= z_i\] \[\frac{\partial L}{\partial \omega_i}=\frac{\partial L}{D}\frac{D}{\partial \omega_i}=\frac{\partial L}{D}z_i\]Calculate
\(\alpha_i\)
\[\frac{\partial T_i}{\partial \alpha_i} = T_{i-1} \left(-\hat{\mathcal{G}}_{i-1}(\mathbf{u}(\mathbf{x}))\right)\] \[\frac{\partial \omega_i}{\partial \alpha_i}= T_i \hat{\mathcal{G}}_i(\mathbf{u}(\mathbf{x})) + \alpha_i \hat{\mathcal{G}}_i(\mathbf{u}(\mathbf{x})) \frac{\partial T_i}{\partial \alpha_i}\\ = T_i \hat{\mathcal{G}}_i(\mathbf{u}(\mathbf{x})) - \alpha_i T_{i-1} \hat{\mathcal{G}}_{i-1}(\mathbf{u}(\mathbf{x})) \hat{\mathcal{G}}_i(\mathbf{u}(\mathbf{x}))\]