3D Gaussian 三维视觉重建
论文资料
- 论文 https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/3d_gaussian_splatting_low.pdf
- 相关论文
- https://arxiv.org/html/2406.18533v1
On Scaling Up 3D Gaussian Splatting Training
- https://arxiv.org/html/2406.18533v1
扩展阅读
- https://zhuanlan.zhihu.com/p/680669616
这篇讲的比较详细易懂 - https://www.magnopus.com/blog/the-rise-of-3d-gaussian-splatting
- https://metaschool.so/articles/gaussian-splatting
- Animatable Gaussian Avatar https://github.com/heawon-yoon/anim-gaussian
使用3D高斯制作3D人物动画头像, 包含安装步骤
视频
合集 https://www.youtube.com/playlist?list=PLAGyKNXhhw2l-OlYOvCxyQ2l29rypwIjW
- 3D高斯介绍 3D Gaussian Splatting for Beginners
- 模型数据说明 Understanding the Gaussian splatting model
- 3D NeRF(另一种实现)和高斯的实际应用 Real World Applications for NeRFs and Gaussian Splatting - Simulation, Real Estate, Cinema, AR, VR!
- 3D NeRF的介绍 NeRF: Neural Radiance Fields for Beginners
- 3D NeRF和高斯的对比 Novel View Rendering and 3D Reconstruction - NeRFs vs Gaussian Splatting
- 在Linux环境下的安装, 训练和渲染 3D Gaussian Splatting in Linux - Setup, Training and Rendering
其它
- Creating 3D Game Models from Video using Photogrammetry https://www.youtube.com/watch?v=bDHJM6nAKtc
7年前的3D重建技术 - 3D Gaussian Splatting Demo https://www.youtube.com/watch?v=c0VNckM21B0
用iPhone XR拍摄后, 使用3D高斯重建的效果演示
B站中文
- https://www.bilibili.com/video/BV11e411n79b
3D高斯介绍 - https://www.bilibili.com/video/BV1bJ4m1b7qW/
3D高斯与其他两种重建方法的效果对比
安装步骤
安装必要的库和依赖
Ubuntu
apt update
apt install build-essential ninja-build
查看显卡
(base) root@ubuntu22:~# nvidia-smi
Sun Mar 30 17:21:08 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.78 Driver Version: 550.78 CUDA Version: 12.4 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 3080 Off | 00000000:00:08.0 Off | N/A |
| 30% 23C P8 8W / 320W | 10MiB / 10240MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 709 G /usr/lib/xorg/Xorg 4MiB |
+-----------------------------------------------------------------------------------------+
Cuda
安装 Cuda Toolkit
https://developer.nvidia.com/cuda-toolkit-archive
查看cuda版本
nvcc -V
Cuda 12.4
https://developer.nvidia.com/cuda-12-4-1-download-archive
这个安装遇到问题
wget https://developer.download.nvidia.com/compute/cuda/12.4.1/local_installers/cuda_12.4.1_550.54.15_linux.run
sudo sh cuda_12.4.1_550.54.15_linux.run
这个安装通过
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin
sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/12.4.1/local_installers/cuda-repo-ubuntu2204-12-4-local_12.4.1-550.54.15-1_amd64.deb
dpkg -i cuda-repo-ubuntu2204-12-4-local_12.4.1-550.54.15-1_amd64.deb
cp /var/cuda-repo-ubuntu2204-12-4-local/cuda-*-keyring.gpg /usr/share/keyrings/
apt update
apt install cuda-toolkit-12-4
未尝试
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get -y install cuda-toolkit-12-4
检查
(base) root@ubuntu22:~/Download# /usr/local/cuda/bin/nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Thu_Mar_28_02:18:24_PDT_2024
Cuda compilation tools, release 12.4, V12.4.131
Build cuda_12.4.r12.4/compiler.34097967_0
Cuda 12.1
https://developer.nvidia.com/cuda-12-1-1-download-archive
方式一: 使用run文件, 编译出错
# 这个文件有将近4.5GB, 需要增加带宽, 计划好时间.
wget https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installers/cuda_12.1.1_530.30.02_linux.run
sh cuda_12.1.1_530.30.02_linux.run
方式二: apt deb方式安装, 最后提示版本不一致
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin
sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installers/cuda-repo-ubuntu2204-12-1-local_12.1.1-530.30.02-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2204-12-1-local_12.1.1-530.30.02-1_amd64.deb
sudo cp /var/cuda-repo-ubuntu2204-12-1-local/cuda-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cuda
Conda
安装 Miniconda, 安装说明: https://www.cnblogs.com/milton/p/18023969
启用conda
eval "$(/home/milton/miniconda3/bin/conda shell.bash hook)"
创建一个conda环境, python版本为 3.10.12
conda create --name test001 python=3.10.12
conda activate test001
Pytorch
访问 Pytorch 官网 https://pytorch.org/
从 2.6 开始, conda 方式安装不再可用, 并且 2.6 只支持 11.8 和 12.4, 如果要用 12.1, 要换成 2.5
Cuda 12.6 安装 Pytorch 2.6
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126
Cuda 12.4 安装 Pytorch 2.6
pip3 install torch torchvision torchaudio
Cuda 12.1 安装 Pytorch 2.5.1
Conda
# CUDA 11.8
conda install pytorch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 pytorch-cuda=11.8 -c pytorch -c nvidia
# CUDA 12.1
conda install pytorch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 pytorch-cuda=12.1 -c pytorch -c nvidia
# CUDA 12.4
conda install pytorch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 pytorch-cuda=12.4 -c pytorch -c nvidia
Pip
# CUDA 11.8
pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cu118
# CUDA 12.1
pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cu121
# CUDA 12.4
pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cu124
其它
pip install plyfile tqdm tensorboard six
pip install opencv-python
导出项目
导出项目仓库
git clone https://github.com/graphdeco-inria/gaussian-splatting --recursive
安装模块
#gaussian
pip install submodules/diff-gaussian-rasterization
pip install submodules/simple-knn
下载训练素材
在项目 GitHub 仓库 的首页找到 Running 部分, 能找到这个下载链接
You can find our SfM data sets for Tanks&Temples and Deep Blending here:
https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/datasets/input/tandt_db.zip
然后有说明输出目录 If you do not provide an output model directory (-m), trained models are written to folders with randomized unique names inside the output directory. At this point, the trained models may be viewed with the real-time viewer (see further below).
默认数据集测试
训练: 使用项目自带的数据
python train.py -s [素材路径]
# e.g.
python train.py -s ./data/tandt/truck
执行过程中可以查看GPU的情况
(base) root@ubuntu22:~/WorkPython# nvidia-smi
Sun Mar 30 17:59:38 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.78 Driver Version: 550.78 CUDA Version: 12.4 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 3080 Off | 00000000:00:08.0 Off | N/A |
| 61% 69C P2 308W / 320W | 5499MiB / 10240MiB | 97% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 709 G /usr/lib/xorg/Xorg 4MiB |
| 0 N/A N/A 7040 C python 5484MiB |
+-----------------------------------------------------------------------------------------+
渲染:
python render.py -m [训练结果路径]
python metrics.py -m <path to trained model> # Compute error metrics on renderings
结果查看
下载模型文件后, 通过这个网站查看
https://poly.cam/tools/gaussian-splatting
问题处理
安装 CUDA 失败
(base) root@ubuntu22:~/Download# sudo sh cuda_12.1.1_530.30.02_linux.run
Installation failed. See log at /var/log/cuda-installer.log for details.
(base) root@ubuntu22:~/Download# more /var/log/cuda-installer.log
(test001) root@ubuntu22:~/Download# more /var/log/nvidia-installer.log
...
Using built-in stream user interface
-> Detected 8 CPUs online; setting concurrency level to 8.
-> Scanning the initramfs with lsinitramfs...
-> Executing: /usr/bin/lsinitramfs -l /boot/initrd.img-6.5.0-28-generic
-> The file '/tmp/.X0-lock' exists and appears to contain the process ID '737' of a running X server.
-> You appear to be running an X server. Installing the NVIDIA driver while X is running is not recommended, as doing so may prevent the
installer from detecting some potential installation problems, and it may not be possible to start new graphics applications after a new
driver is installed. If you choose to continue installation, it is highly recommended that you reboot your computer after installation
to use the newly installed driver. (Answer: Abort installation)
ERROR: Installation has failed. Please see the file '/var/log/nvidia-installer.log' for details. You may find suggestions on fixing ins
tallation problems in the README available on the Linux driver download page at www.nvidia.com.
停掉X Server后再安装
systemctl stop display-manager
we could not find ninja or g++
sudo apt-get update
sudo apt install build-essential
sudo apt-get install ninja-build
No such file or directory: ‘:/usr/local/cuda-11.8/bin/nvcc
Execute the command directly on the current command line
export CUDA_HOME=/usr/local/cuda
install again
pip install submodules/diff-gaussian-rasterization
pip install submodules/simple-knn
3D Gaussian 三维视觉重建的更多相关文章
- 三维视觉、SLAM方向全球顶尖实验室汇总
本文作者 任旭倩,公众号:计算机视觉life,编辑成员 欧洲 英国伦敦大学帝国理工学院 Dyson 机器人实验室 http://www.imperial.ac.uk/dyson-robotics-la ...
- 三维视觉惯性SLAM的有效Schmidt-EKF
三维视觉惯性SLAM的有效Schmidt-EKF An Efficient Schmidt-EKF for 3D Visual-Inertial SLAM 论文地址: http://openaccess ...
- SLAM: Structure From Motion-移动中三维场景重建
wiki链接:https://en.wikipedia.org/wiki/Structure_from_motion 三维重建: 三维物体建模总结 1. 视野内三维物体重建 : Kinect fusi ...
- 3D MinkowskiEngine稀疏模式重建
3D MinkowskiEngine稀疏模式重建 本文看一个简单的演示示例,该示例训练一个3D卷积神经网络,该网络用一个热点向量one-hot vector重构3D稀疏模式.这类似于Octree生成网 ...
- photometric_stereo halcon光度立体法三维表面重建
官方文档翻译 名称: photometric_stereo -- 通过光度立体技术重建表面. 签名: photometric_stereo(Images : HeightField, Gradient ...
- vrn:基于直接体积回归的单幅图像大姿态三维人脸重建
3D面部重建是一个非常困难的基本计算机视觉问题.目前的系统通常假设多个面部图像(有时来自同一主题)作为输入的可用性,并且必须解决许多方法学挑战,例如在大的面部姿势,表情和不均匀照明之间建立密集的对应. ...
- 老子云携手福昕鲲鹏,首次实现3D OFD三维版式文档的重大突破
你见过能动起来的文档吗? 这可不是动图,也不是视频,而是可以直接自由交互3D模型的3D OFD文档! OFD可能有人不熟悉,它其实是国产"PDF",3D OFD则突破了以往文字.图 ...
- Leetcode883.Projection Area of 3D Shapes三维形体投影面积
在 N * N 的网格中,我们放置了一些与 x,y,z 三轴对齐的 1 * 1 * 1 立方体. 每个值 v = grid[i][j] 表示 v 个正方体叠放在单元格 (i, j) 上. 现在,我们查 ...
- HDU4742----Pinball Game 3D(三维LIS、CDQ分治)
题意:三维空间内 n个小球,对应坐标(x,y,z).输出LIS的长度以及方案数. 首先可以先按x排序,先降低一维,然后 剩下y .z,在y上进行CDQ分治,按y的大小用前面的更新后面的.z方向离散化之 ...
- 单目三维稠密重建方案:Quadtree-accelerated Real-time Monocular Dense Mapping
论文:This is a monocular dense mapping system following the IEEE Robotics and Automation Letters (RA-L ...
随机推荐
- 测试直播伴侣和OBS对透明度的支持哪个好?
测试直播伴侣和OBS对透明度的支持哪个好? 抖音无人直播,用抖音弹幕助手 测试直播伴侣和OBS对透明度的支持哪个好?抖音无人直播,用抖音弹幕助手 测试地址1 测试地址2
- SpringBoot(四) - 整合Mybatis,逆向工程,JPA,Mybatis-plus
1.SpringBoot整合MyBatis 1.1 application.yml # 数据源配置 spring: datasource: driver-class-name: com.mysql.c ...
- weixueyuan-Nginx Web服务4
https://www.weixueyuan.net/nginx/web/ Nginx静态资源服务器搭建 HTML 是一种标记语言,提供 HTML 文件读取是静态服务器最基本的功能,静态服务器的配置样 ...
- Kotlin:【标准库函数】apply(配置函数)、let、run函数
(调用apply会返回接受者对象,最终file对象被返回,apply函数起到配置函数的作用) 组合使用实践: guestName不为空时: guestName为空时: 不使用let的写法 run函数: ...
- Codeforces Round 961 (Div. 2)
题目链接:Codeforces Round 961 (Div. 2) 总结:B1wa两发可惜,C出得有点小慢. A. Diagonals fag:贪心 Description:给定一个\(n * n\ ...
- go的math/rand随机数生成器
伪随机数生成器,默认情况下随机数种子是固定的, 注意:固定的随机数种子每次生成的随机数都是相同的随机数序列 一.基础用法 math/rand 包提供了随机数生成的方法.常用的函数包括: rand.In ...
- datawhale-大模型攻防比赛实践-第一次行动
最近刚好是在写智能信息安全的教程,最后一章准备讲内容安全,里面有一节探讨大模型安全的内容,刚好可以拿比赛的内容当案例. 首先,可以通过modelscope平台获得GPU使用权限.然后你就可以跑base ...
- 精选4款基于.NET开源、功能强大的通讯调试工具
前言 今天大姚给大家分享4款基于.NET开源.功能强大的通讯调试工具,旨在帮助.NET开发者们更好的应对通讯调试方面的学习和工作,提升调试效率. LLCOM LLCOM是一个.NET开源的.功能强大的 ...
- Lombok 只会用@Setter @Getter @Data ? 老鸟带你玩转lombok
lombok的官网 官方网址 : https://projectlombok.org lombok 稳定特性文档:https://projectlombok.org/features/ lombok ...
- CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
CSnakes 是一个用于在.NET项目中嵌入Python代码的工具,由.NET源生成器和运行时组成,能够实现高效的跨语言调用,Github:https://github.com/tonybalone ...