3DGS复现
连接云服务器
- 在AutoDL里租一台RTX 3090的服务器,选择基础环境:MiniConda Conda3 Python3.10 Ubuntu22.04 CUDA11.8
- 在VS Code里按Ctrl + Shift + P,输入Remote-SSH,选择Add…,添加远程主机。
- 在AutoDL里复制登录命令和密码,在VS Code里相应地输入
连接SSH
- 检查是否安装Git:
git --version - 生成密钥:
ssh-keygen -t ed25519 -C "email@example.com" - 复制密钥:
cat ~/.ssh/id_ed25519.pub - 在Github上的SSH里添加New SSH Key
配置环境
- 克隆:
git clone git@github.com:graphdeco-inria/gaussian-splatting.git --recursive - 检查是否安装CUDA:
nvcc --version - 切换目录:
cd gaussian-splatting - 换清华源:
1 | # 1. 添加清华源的 channels (对应 defaults, conda-forge, pytorch) |
- 用mamba:
1 | conda install -n base -c conda-forge mamba |
转换
- 安装COLMAP:
sudo apt update && sudo apt install colmap - 检测COLMAP:
colmap -h - 连接FileZilla:协议SFTP,主机即SSH命令,输入对应的密码
- 在gaussian_splatting下创建存放训练数据的文件夹,在文件夹里创建一个项目的文件夹,然后创建input文件夹。把拍的照片用FileZilla放到input里。
- 虚拟显示:
sudo apt update && sudo apt install xvfb -y - 转换:
xvfb-run -a python convert.py -s ./data/truck/
训练
- 训练:
python train.py -s ./data/train - 在output文件夹里得到结果
All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.
Comments