# CD-GS **Repository Path**: haiyanggai/cd-gs ## Basic Information - **Project Name**: CD-GS - **Description**: Scene decomposition via Gaussian Splatting! - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-04-08 - **Last Updated**: 2024-10-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Scene Decomposition via Gaussian Splatting ### Environment Our default, provided install method is based on Conda package and environment management: ```shell conda env create --file environment.yml conda activate gaussian_splatting ``` 和 3DGS 用的环境一样,如果提前配好的话可以直接用 ## 1、 高斯和编码初始化 $$ \bf G_i = ( {\bf \mu}_i, {\bf f}_i, \alpha_i, {\bf R}_i, {\bf S}_i ) $$ $$ {\bf E}_{sun\_vis} \in \mathbb R^{n \times 16} $$ $$ {\bf E}_{sun\_shade} \in \mathbb R^{n \times 16} $$ $$ {\bf E}_{sky\_shade} \in \mathbb R^{n \times 16} $$ $$ {\bf E}_{reflectance} \in \mathbb R^{n \times 16} $$ $ \bf \mu_i \in \mathbb R^{3} $, $ \bf f_i \in \mathbb R^{4 \times 16} $, $ \alpha_i \in \mathbb R^{+} $, $ \bf R_i \in \mathbb R^{4} $ and $ \bf S_i \in \mathbb R^{3} $ 分别是每个 Gaussian 的均值,位置特征,不透明度,旋转四元数和缩放因子。其中每个 Gaussian 中的 $ \bf f_i $ 分序列优化,每 16 维分别储存对应属性的位置特诊(详见 2)。$ {\bf E}_* $ 分别代表 n 张训练数据需要解构的场景属性的编码。 ## 2、推理、渲染 分别用 MLP 计算解构颜色 $ \bf c_ {sun\_vis} \in \mathbb R^3 $, $ \bf c_{sun\_shade} \in \mathbb R^3 $, $ \bf c_{sky\_shade} \in \mathbb R^3 $ 和 $ \bf c_{reflectance} \in \mathbb R^3 $。方式如下: $$ \bf c_{sun\_vis} = \mathbf MLP_{sun\_vis}(\bf f_{0:15}, {\gamma(\bf d)}, {\bf E}_{sun\_vis}^l) $$ $$ \bf c_{sun\_shade} = \mathbf {MLP}_{sun\_shade}({\bf f_{16:31}}, {\gamma(\bf d)}, {\bf E}_{sun\_shade}^l) $$ $$ \bf c_{sky\_shade} = \mathbf {MLP}_{sky\_shade}({\bf f_{32:47}}, {\gamma(\bf d)}, {\bf E}_{sky\_shade}^l) $$ $$ \bf c_{reflectance} = \mathbf {MLP}_{reflectance}({\bf f_{48:63}}, {\gamma(\bf d)}, {\bf E}_{{reflectance}}^l) $$ 通过 $ \mathbf {MLP} $ 的 Gaussian 是经过 insideFrustrum 检查筛选出来的,只需要经过网络四次推理。送入渲染器的 Gaussian 如下(渲染器目前需要渲染四次,可通过修改 CUDA 代码实现一次渲染): $$ {\bf G}_i = ( {\bf \mu}_i, \alpha_i, {\bf R}_i, {\bf S}_i, {\bf c}_i^*, o_i ) $$ $ \bf c_i^* $ 可分别代表上述四种颜色。 渲染器返回 $$ \bf C_{sun\_vis} \in \mathbb R^{3 \times H \times W} $$ $$ \bf C_{sun\_vis} \in \mathbb R^{3 \times H \times W} $$ $$ \bf C_{sky\_shade} \in \mathbb R^{3 \times H \times W} $$ $$ \bf C_{reflectance} \in \mathbb R^{3 \times H \times W} $$ 最终合成视图 $$ \bf C = ({\bf C}_{sun\_vis} \times {\bf C}_{sun\_shade} + {\bf C}_{sky\_shade}) \times C_{reflectance} $$ *** * Dataset: `/data1/baihy/datasets/phototourist` * train / render / metrics: `bash train.sh`