windows中高斯泼建(gaussian-splatting)库安装 兼容vs2022 cuda11.8 UE5.3.2

由于我需要用到UE5.3.2,所以vs需要是2022版本,MSVC需要14.38版本

安装高斯泼建GitHub库

复制代码
git clone https://github.com/graphdeco-inria/gaussian-splatting --recursive
SET DISTUTILS_USE_SDK=1 # Windows only
conda create -n gaussian_splatting python=3.10

激活

复制代码
conda activate gaussian_splatting
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" -vcvars_ver=14.38

安装库

复制代码
conda install -c anaconda vs2022_win-64
pip install torch==2.0.0+cu118 torchvision==0.15.0+cu118 torchaudio==2.0.0+cu118 -f https://download.pytorch.org/whl/torch_stable.html
set CUDA_HOME=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8
set PATH=%CUDA_HOME%\bin;%PATH%
pip install --no-build-isolation --force-reinstall submodules\diff-gaussian-rasterization
pip install --no-build-isolation --force-reinstall submodules\simple-knn
pip install --no-build-isolation --force-reinstall submodules\fused-ssim

我的VS2022有两个版本MSVC的一个是14.42,一个是14.38 本项目需要14.38的库,正好UE5.3.2也是需要14.38

关于如何每次激活环境都是正确的MSVC版本

在D:\ProgramData\anaconda3\envs\gaussian_splatting\etc\conda\activate.d下创建zzz_force_old_msvc.bat

内容如下: @echo off call "C:\Program Files\Microsoft Visual

Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"

-vcvars_ver=14.38 echo. echo [User Config] Successfully forced MSVC version to 14.38 for Gaussian Splatting echo.


其他要安装的库

复制代码
pip install opencv-python
pip uninstall -y numpy
conda install numpy=1.23.5 --force-reinstall

数据集

https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/datasets/input/tandt_db.zip

数据集放到\gaussian-splatting\data

训练

复制代码
python train.py -s data/tandt/train

可视化

安装https://www.7-zip.org/download.html,并将安装路径D:\\ProgramData\\7-Zip添加到环境变量

复制代码
cd SIBR_viewers
cmake -Bbuild .
cmake --build build --target install --config RelWithDebInfo

报错

The CUDA Toolkit v11.8 directory '' does not exist.

说明 MSBuild 的 CUDA 11.8.targets 并没有拿到 CUDA_PATH

设置

复制代码
set CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8

依然报错,error STL1002: Unexpected compiler version, expected CUDA 12.4 or newer.这是因为 MSVC 14.42 的标准库(STL)强制要求 CUDA 12.4+,而我用的是 CUDA 11.8,所以编译必定报错。

复制代码
mkdir build
cd build
cmake .. -G "Visual Studio 17 2022" -T version=14.38
cmake --build . --target install --config RelWithDebInfo

完成

复制代码
.\SIBR_viewers\install\bin\SIBR_gaussianViewer_app -m ./output/5b19519c-f


相关推荐
ydmy6 小时前
注意力机制(个人理解)
pytorch·python·深度学习
愚者游世8 小时前
noexcept 说明符与 noexcept运算符各版本异同
开发语言·c++·程序人生·面试·visual studio
AI技术增长9 小时前
Pytorch图像去噪实战(四):Attention UNet图像去噪实战,让模型重点恢复边缘和纹理区域
人工智能·pytorch·python
隔壁大炮10 小时前
Day07-RNN介绍
人工智能·pytorch·rnn·深度学习·神经网络·算法·numpy
AI技术增长10 小时前
Pytorch图像去噪实战(二):用UNet解决DnCNN细节丢失问题(结构解析+完整代码+踩坑总结)
人工智能·pytorch·python
AI前沿资讯11 小时前
支持视频动作迁移的AI 3D平台有哪些?2026全维度测评
人工智能·3d
CG_MAGIC11 小时前
幕后花絮:用Blender打造自己的建筑
3d·blender·贴图·uv·建模教程·渲云渲染
AI技术增长12 小时前
Pytorch图像去噪实战(五):FFDNet可控图像去噪实战,用噪声强度图解决不同噪声等级问题
pytorch·python·深度学习
星辰徐哥12 小时前
Unity C#入门:Visual Studio与Unity的关联配置
unity·c#·visual studio
AI技术增长13 小时前
Pytorch图像去噪实战(三):ResUNet图像去噪模型实战,解决UNet深层训练不稳定问题
人工智能·pytorch·深度学习