3D Gaussian Splatting论文简要解读与可视化复现(基于gsplat)

3D Gaussian Splatting介绍

3D Gaussian Splatting流程

gsplat的输入是经过COLMAP处理得到的稀疏点云用来初始化,但是在训练之后会变稠密

🚫 标准的 3D Gaussian Splatting 不使用神经网络。

✅ 它是一个 纯参数优化 (non-neural, direct optimization) 的方法。

优化流程:

代码实现:

基于下面的gsplat仓库:

https://docs.gsplat.studio/main/index.htmlhttps://docs.gsplat.studio/main/index.html安装gsplat

bash 复制代码
conda create --name gsplat -y python=3.8
conda activate gsplat

pip install torch==2.1.2+cu118 torchvision==0.16.2+cu118 --extra-index-url https://download.pytorch.org/whl/cu118

conda install -c "nvidia/label/cuda-11.8.0" cuda-toolkit
pip install ninja git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
bash 复制代码
pip install gsplat

这个过程需要安装很多依赖项

下载仓库:

bash 复制代码
git clone https://github.com/nerfstudio-project/gsplat.git

还需要手动安装一些其他的库:

(在./example/requirements.txt文件下,注释掉这几个并单独安装)

nerfview

fused-ssim

fused-bilagrid

bash 复制代码
pip install nerfview
pip install git+https://github.com/rahul-goel/fused-ssim/ --no-build-isolation

git clone https://github.com/harry7557558/fused-bilagrid.git
cd fused-bilagrid
pip install . --no-build-isolation

这里需要改一下源代码/data/xxx/projects/gsplat/examples/datasets/colmap.py

,把"no_factor_suffix": 改成True,使得代码可以兼容COLMAP的结果:

python 复制代码
        # Load extended metadata. Used by Bilarf dataset.
        self.extconf = {
            "spiral_radius_scale": 1.0,
            "no_factor_suffix": True, # False
        }

最后运行下面的代码即可复现:

data_dir 会自动找到mycolmap_project/sparse/0的模型位置

bash 复制代码
cd examples

CUDA_VISIBLE_DEVICES=0 python simple_trainer.py default \
    --data_dir /data/xxx/projects/colmap/mycolmap_project/ --data_factor 1 \
    --result_dir ./results/my_scene

可视化结果:

可以看到gsplat一步步的训练过程,生成的效果越来越精细

但是超出场景的远景视角还是可以看到有很多不足的

可以看到过程中高斯点会越来越多,画面越来越精细

对显存的占用不是很高

下图左侧为高斯重建结果,右侧为原图,可以发现把图拉近之后效果还是可以的

总共14张图片,训练时长在10mins左右,可以选择保存ply文件(但是会很大,因为最后会有很多点,我这个就有120MB)


gsplat的ply文件

gsplat的ply文件格式与普通的ply文件有所不同:

.ply 文件头部是 3D Gaussian Splatting(高斯渲染) 模型导出的点云文件头。

这些字段定义了每个点的属性(不仅仅是 xyz 坐标),而是包含了 颜色、方向、尺度、旋转等参数 ------

也就是"每个点是一个三维高斯分布(3D Gaussian)",而非简单的几何点。

bash 复制代码
ply
format binary_little_endian 1.0
element vertex 533057
property float x
property float y
property float z
property float f_dc_0
property float f_dc_1
property float f_dc_2
property float f_rest_0
property float f_rest_1
property float f_rest_2
property float f_rest_3
property float f_rest_4
property float f_rest_5
property float f_rest_6
property float f_rest_7
property float f_rest_8
property float f_rest_9
property float f_rest_10
property float f_rest_11
property float f_rest_12
property float f_rest_13
property float f_rest_14
property float f_rest_15
property float f_rest_16
property float f_rest_17
property float f_rest_18
property float f_rest_19
property float f_rest_20
property float f_rest_21
property float f_rest_22
property float f_rest_23
property float f_rest_24
property float f_rest_25
property float f_rest_26
property float f_rest_27
property float f_rest_28
property float f_rest_29
property float f_rest_30
property float f_rest_31
property float f_rest_32
property float f_rest_33
property float f_rest_34
property float f_rest_35
property float f_rest_36
property float f_rest_37
property float f_rest_38
property float f_rest_39
property float f_rest_40
property float f_rest_41
property float f_rest_42
property float f_rest_43
property float f_rest_44
property float opacity
property float scale_0
property float scale_1
property float scale_2
property float rot_0
property float rot_1
property float rot_2
property float rot_3
end_header

解析:

由于 gsplat 并不是从几何角度直接重建三维结构,因此其输出的 PLY 文件 中的点并不完全对应真实空间中的表面位置点。

直接可视化这些点云时,结果往往呈现为一团分布的点,而不是清晰的三维场景结构。这些非几何位置点主要起到**表示环境辐射场或光照分布(appearance / radiance modeling)**的作用,而非真实几何形状。

相关推荐
快乐非自愿16 小时前
RAG夺命10连问,你能抗住第几问?
人工智能·面试·程序员
千匠网络19 小时前
破局出海壁垒,千匠网络新能源汽车跨境出海解决方案
人工智能
马丁聊GEO21 小时前
解码AI用户心智,筑牢可信GEO根基——悠易科技深度参与《中国AI用户态度与行为研究报告(2026)》发布会
人工智能·科技
nap-joker21 小时前
Fusion - Mamba用于跨模态目标检测
人工智能·目标检测·计算机视觉·fusion-mamba·可见光-红外成像融合·远距离/伪目标问题
一只幸运猫.21 小时前
2026Java 后端面试完整版|八股简答 + AI 大模型集成技术(最新趋势)
人工智能·面试·职场和发展
Promise微笑21 小时前
2026年国产替代油介损测试仪:油介损全场景解决方案与技术演进
大数据·网络·人工智能
深海鱼在掘金21 小时前
深入浅出 LangChain —— 第三章:模型抽象层
人工智能·langchain·agent
生信碱移21 小时前
PACells:这个方法可以鉴定疾病/预后相关的重要细胞亚群,作者提供的代码流程可以学习起来了,甚至兼容转录组与 ATAC 两种数据类型!
人工智能·学习·算法·机器学习·数据挖掘·数据分析·r语言
workflower21 小时前
具身智能行业应用-生活服务业
大数据·人工智能·机器人·动态规划·生活
GitCode官方21 小时前
基于昇腾 MindSpeed LLM 玩转 DeepSeekV4-Flash 模型的预训练复现部署
人工智能·开源·atomgit