> 技术文档 > 3DGS复现

3DGS复现


一、环境搭建

1、基础环境配置

由于我的配置问题,我采用的是逐步安装的方式,大家可以使用yml直接配置环境,这里放一下逐步搭建的命令,参考3DGS复现部署全过程(win11笔记本),只放关键的安装配置命令,其他的cuda torch相关的我就不放了,我使用的版本与官方给的不符,但是可以用,大家根据自己的情况来:

git clone https://github.com/graphdeco-inria/gaussian-splatting --recursivecd gaussian-splattingconda create -n gaussian_splatting python=3.10conda activate gaussian_splattingconda install -c conda-forge vs2019_win-64

安装本地的库,大家在拉取代码的时候一定要用上面的命令,不能简单的git clone,不然这些链接的库下载不下来,文件夹里是空的。

SET DISTUTILS_USE_SDK=1pip install submodules\\diff-gaussian-rasterizationpip install submodules\\simple-knnpip install submodules/fused-ssim

安装其他库

pip install plyfilepip install tqdmpip install opencv-pythonpip install joblib

2、colmap安装

colmap是从图片生成点云的工具,这里参考Linux 编译安装colmap

(1)、安装相关库

sudo apt-get install \\ git \\ cmake \\ build-essential \\ libboost-program-options-dev \\ libboost-filesystem-dev \\ libboost-graph-dev \\ libboost-system-dev \\ libboost-test-dev \\ libeigen3-dev \\ libsuitesparse-dev \\ libfreeimage-dev \\ libmetis-dev \\ libgoogle-glog-dev \\ libgflags-dev \\ libglew-dev \\ qtbase5-dev \\ libqt5opengl5-dev \\ libcgal-dev \\ libcgal-qt5-dev \\ libflann-dev \\ libsqlite3-dev \\ libatlas-base-dev

(2)、安装ceres库

cd colmapgit clone https://ceres-solver.googlesource.com/ceres-solvercd ceres-solvermkdir buildcd buildcmake .. -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFFmake -jsudo make install

安装过程中报错

CMake Error at /usr/share/cmake-3.22/Modules/CMakeDetermineCompilerId.cmake:726 (message): Compiling the CUDA compiler identification source file \"CMakeCUDACompilerId.cu\" failed. Compiler: /usr/local/cuda-12.1/bin/nvcc Build flags: Id flags: --keep;--keep-dir;tmp;-gencode=arch=compute_,code=sm_ -v The output was: 1 nvcc fatal : Unsupported gpu architecture \'compute_\' Call Stack (most recent call first): /usr/share/cmake-3.22/Modules/CMakeDetermineCompilerId.cmake:6 (CMAKE_DETERMINE_COMPILER_ID_BUILD) /usr/share/cmake-3.22/Modules/CMakeDetermineCompilerId.cmake:48 (__determine_compiler_id_test) /usr/share/cmake-3.22/Modules/CMakeDetermineCUDACompiler.cmake:298 (CMAKE_DETERMINE_COMPILER_ID) cmake/FindDependencies.cmake:167 (enable_language) CMakeLists.txt:118 (include)

查证后发现是GPU架构设置错误,在复现过程中我跟随Linux下编译安装colmap,将CmakeList.txt的内容修改成了

set(CMAKE_CUDA_ARCHITECTURES \"native\")

实际上,就是因为这一句命令,找不到GPU架构,这句命令中的nativa的意思是,自动检测并使用当前系统上的GPU架构作为编译目标,效果因人而异,我使用这个命令的时候反而找不到,需要自己手动设计GPU架构,命令如下:

set(CMAKE_CUDA_ARCHITECTURES 61)

这里面的61即为我的GPU架构,可以根据自己的配置按需更改,查找自己的GPU架构的命令如下:

nvidia-smi --query-gpu=compute_cap --format=csv

我的输出是

compute_cap6.1

根据这个6.1可知,我的GPU架构为61

(3)、编译colmap

cd colmapmkdir buildcd buildcmake ..make -jsudo make install

make -j出错,报错为

/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFFieldReadCount@LIBTIFF_4.0\'/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFFieldPassCount@LIBTIFF_4.0\'/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFFieldDataType@LIBTIFF_4.0\'/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libfreeimage.so: undefined reference to `_TIFFDataSize@LIBTIFF_4.0\'/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFFieldTag@LIBTIFF_4.0\'/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFFieldName@LIBTIFF_4.0\'collect2: error: ld returned 1 exit statusmake[2]: *** [src/colmap/exe/CMakeFiles/colmap_main.dir/build.make:358:src/colmap/exe/colmap] 错误 1make[1]: *** [CMakeFiles/Makefile2:686:src/colmap/exe/CMakeFiles/colmap_main.dir/all] 错误 2make: *** [Makefile:136:all] 错误 2

这个错误表示在链接过程中,未找到libtiff库中的某些函数,本质上是受anaconda的影响,anaconda的路径与库影响了系统自身默认的库和路径,问题的核心是去掉anaconda影响。
尝试一:在CMakeList.txt中加入

set(CMAKE_PREFIX_PATH \"/usr/lib/x86_64-linux-gnu/cmake\")

未起效。
尝试二:退出环境后,直接把anaconda3的名字改了,再重新开始安装。

cd colmapmkdir buildcd buildcmake ..make -jsudo make install

问题解决。

3、SIBR-Viewers安装

由于我的电脑GPU不是7.0以上的,在windows下使用viewers对GPU版本有要求,因此我使用的是Linux安装这个工具,报错报的头皮发麻。

(1)embree头文件找不到

报错

fatal error: embree3/rtcore.h: 没有那个文件或目录 16 | # include  | ^~~~~~~~~~~~~~~~~~compilation terminated.gmake[2]: *** [src/core/raycaster/CMakeFiles/sibr_raycaster.dir/build.make:132:src/core/raycaster/CMakeFiles/sibr_raycaster.dir/Raycaster.cpp.o] 错误 1gmake[2]: *** 正在等待未完成的任务....In file included from /media/gaussian-splatting/SIBR_viewers/src/./core/raycaster/CameraRaycaster.hpp:19,  from /media/gaussian-splatting/SIBR_viewers/src/core/raycaster/CameraRaycaster.cpp:15:/media/gaussian-splatting/SIBR_viewers/src/./core/raycaster/Raycaster.hpp:16:12: fatal error: embree3/rtcore.h: 没有那个文件或目录 16 | # include  | ^~~~~~~~~~~~~~~~~~compilation terminated.gmake[2]: *** [src/core/raycaster/CMakeFiles/sibr_raycaster.dir/build.make:76:src/core/raycaster/CMakeFiles/sibr_raycaster.dir/CameraRaycaster.cpp.o] 错误 1In file included from /media/gaussian-splatting/SIBR_viewers/src/./core/assets/InputCamera.hpp:16,  from /media/gaussian-splatting/SIBR_viewers/src/core/raycaster/Intersector2D.h:18,  from /media/gaussian-splatting/SIBR_viewers/src/core/raycaster/Intersector2D.cpp:13:/media/gaussian-splatting/SIBR_viewers/src/./core/graphics/Camera.hpp: In constructor ‘sibr::Camera::Camera()’:/media/gaussian-splatting/SIBR_viewers/src/./core/graphics/Camera.hpp:275:49: warning: ‘sibr::Camera::_dirtyViewProj’ will be initialized after [-Wreorder] 275 |  mutable bool  _dirtyViewProj; ///< Does the camera matrix need an update. | ^~~~~~~~~~~~~~/media/gaussian-splatting/SIBR_viewers/src/./core/graphics/Camera.hpp:271:57: warning: ‘std::string sibr::Camera::_savePath’ [-Wreorder] 271 |  std::string _savePath; ///< Save destination path when reocrding images. | ^~~~~~~~~In file included from /media/gaussian-splatting/SIBR_viewers/src/./core/assets/InputCamera.hpp:16,  from /media/gaussian-splatting/SIBR_viewers/src/core/raycaster/Intersector2D.h:18,  from /media/gaussian-splatting/SIBR_viewers/src/core/raycaster/Intersector2D.cpp:13:/media/gaussian-splatting/SIBR_viewers/src/./core/graphics/Camera.hpp:34:17: warning: when initialized here [-Wreorder] 34 |  Camera( void ): |  ^~~~~~In file included from /media/gaussian-splatting/SIBR_viewers/src/./core/assets/InputCamera.hpp:16,  from /media/gaussian-splatting/SIBR_viewers/src/core/raycaster/Intersector2D.h:18,  from /media/gaussian-splatting/SIBR_viewers/src/core/raycaster/Intersector2D.cpp:13:/media/gaussian-splatting/SIBR_viewers/src/./core/graphics/Camera.hpp:285:41: warning: ‘sibr::Camera::_isOrtho’ will be initialized after [-Wreorder] 285 |  bool  _isOrtho; ///< Is the camera orthographic. |  ^~~~~~~~/media/vdail/E/ly/gaussian-splatting/SIBR_viewers/src/./core/graphics/Camera.hpp:284:34: warning: ‘sibr::Vector2f sibr::Camera::_p’ [-Wreorder] 284 |  sibr::Vector2f _p = {0.5f, 0.5}; ///< Principal point. | ^~In file included from /gaussian-splatting/SIBR_viewers/src/./core/assets/InputCamera.hpp:16,  from /media/gaussian-splatting/SIBR_viewers/src/core/raycaster/Intersector2D.h:18,  from /media/gaussian-splatting/SIBR_viewers/src/core/raycaster/Intersector2D.cpp:13:/media/gaussian-splatting/SIBR_viewers/src/./core/graphics/Camera.hpp:34:17: warning: when initialized here [-Wreorder] 34 |  Camera( void ): |  ^~~~~~In file included from /media/gaussian-splatting/SIBR_viewers/src/core/raycaster/Intersector2D.h:18,  from /media/gaussian-splatting/SIBR_viewers/src/core/raycaster/Intersector2D.cpp:13:/media/gaussian-splatting/SIBR_viewers/src/./core/assets/InputCamera.hpp: At global scope:/media/gaussian-splatting/SIBR_viewers/src/./core/assets/InputCamera.hpp:275:54: warning: extra qualification ‘sibr::InputCamera::’ on member ‘loadTransform’ [-fpermissive] 275 |  static std::vector InputCamera::loadTransform(const std::string& transformPath, int w, int h, std::string extension, const float zNear = 0.01f, const float zFar = 1000.0f, const int offset = 0, const int fovXfovYFlag = 0); | ^~~~~~~~~~~/media/gaussian-splatting/SIBR_viewers/src/./core/assets/InputCamera.hpp: In constructor ‘sibr::InputCamera::InputCamera()’:/media/gaussian-splatting/SIBR_viewers/src/./core/assets/InputCamera.hpp:328:22: warning: ‘sibr::InputCamera::_h’ will be initialized after [-Wreorder] 328 |  uint _h; ///< Image height |^~/media/gaussian-splatting/SIBR_viewers/src/./core/assets/InputCamera.hpp:319:22: warning: ‘uint sibr::InputCamera::_id’ [-Wreorder] 319 |  uint _id; ///< Input camera id |^~~In file included from /media/gaussian-splatting/SIBR_viewers/src/core/raycaster/Intersector2D.h:18,  from /media/gaussian-splatting/SIBR_viewers/src/core/raycaster/Intersector2D.cpp:13:/media/gaussian-splatting/SIBR_viewers/src/./core/assets/InputCamera.hpp:50:17: warning: when initialized here [-Wreorder] 50 |  InputCamera() : |  ^~~~~~~~~~~In file included from /media/gaussian-splatting/SIBR_viewers/src/core/raycaster/VoxelGrid.cpp:13:/media/gaussian-splatting/SIBR_viewers/src/core/raycaster/VoxelGrid.hpp: In constructor ‘sibr::VoxelGridBase::VoxelGridBase(const Box&, const Vector3i&, bool)’:/media/gaussian-splatting/SIBR_viewers/src/core/raycaster/VoxelGrid.hpp:227:21: warning: ‘sibr::VoxelGridBase::box’ will be initialized after [-Wreorder] 227 |  Box box; ///< Grid bounding box. |  ^~~/media/gaussian-splatting/SIBR_viewers/src/core/raycaster/VoxelGrid.hpp:224:32: warning: ‘sibr::Vector3i sibr::VoxelGridBase::dims’ [-Wreorder] 224 |  sibr::Vector3i dims; ///< Integer grid dimensions. | ^~~~/media/gaussian-splatting/SIBR_viewers/src/core/raycaster/VoxelGrid.cpp:22:9: warning: when initialized here [-Wreorder] 22 | VoxelGridBase::VoxelGridBase(const Box & boundingBox, const sibr::Vector3i & numsPerDim, bool forceCube) | ^~~~~~~~~~~~~In file included from /media/gaussian-splatting/SIBR_viewers/src/./core/graphics/RenderTarget.hpp:17,  from /media/gaussian-splatting/SIBR_viewers/src/core/raycaster/Intersector2D.cpp:15:/media/gaussian-splatting/SIBR_viewers/src/./core/graphics/Image.hpp: In member function ‘bool sibr::Image::loadByteStream(const string&, bool) [with T_Type = unsigned char; unsigned int T_NumComp = 1]’:/media/gaussian-splatting/SIBR_viewers/src/./core/graphics/Image.hpp:884:21: warning: ‘hIm’ may be used uninitialized in this function [-Wmaybe-uninitialized] 884 |  int hIm; |  ^~~/media/gaussian-splatting/SIBR_viewers/src/./core/graphics/Image.hpp:883:21: warning: ‘wIm’ may be used uninitialized in this function [-Wmaybe-uninitialized] 883 |  int wIm; |  ^~~gmake[1]: *** [CMakeFiles/Makefile2:1054:src/core/raycaster/CMakeFiles/sibr_raycaster.dir/all] 错误 2gmake: *** [Makefile:136:all] 错误 2

图找不到了,这个错误困扰我很久,我一直认为是头文件的链接出问题了,一直在检查路径,怀疑是自己安装embree的问题,解决的方法和头文件什么的毫无关系,就是

sudo apt-get install libembree-dev

问题就解决了

(2)gmake: *** [Makefile:136:all] 错误 2

这个错误我也不知道该怎么描述,具体报错如下:

/usr/bin/ld: /home/anaconda3/envs/gaussian_splatting1/lib/libQt6Widgets.so.6: undefined reference to `std::__glibcxx_assert_fail(char const*, int, char const*, char const*)@GLIBCXX_3.4.30\'/usr/bin/ld: /home/anaconda3/envs/gaussian_splatting1/lib/libQt6Test.so.6: undefined reference to `__truncsfhf2@GCC_12.0.0\'/usr/bin/ld: /home/anaconda3/envs/gaussian_splatting1/lib/libQt6Test.so.6: undefined reference to `__extendhfsf2@GCC_12.0.0\'/usr/bin/ld: /home/anaconda3/envs/gaussian_splatting1/lib/libQt6Test.so.6: undefined reference to `__eqhf2@GCC_12.0.0\'/usr/bin/ld: /home/anaconda3/envs/gaussian_splatting1/lib/libQt6Test.so.6: undefined reference to `__extendhfdf2@GCC_12.0.0\'/usr/bin/ld: /home/anaconda3/envs/gaussian_splatting1/lib/libavutil.so.59: undefined reference to `vaMapBuffer2\'collect2: error: ld returned 1 exit statusgmake[2]: *** [src/projects/basic/apps/texturedMesh/CMakeFiles/SIBR_texturedMesh_app.dir/build.make:188:src/projects/basic/apps/texturedMesh/SIBR_texturedMesh_app] 错误 1gmake[1]: *** [CMakeFiles/Makefile2:1335:src/projects/basic/apps/texturedMesh/CMakeFiles/SIBR_texturedMesh_app.dir/all] 错误 2[ 96%] Linking CXX shared library libsibr_gaussian.so[ 96%] Built target sibr_gaussian[ 97%] Linking CXX shared library libsibr_remote.so[ 97%] Built target sibr_remotegmake: *** [Makefile:136:all] 错误 2

在git上看到有人提到,不能在conda环境下进行build,于是我退回base环境
然后错误就变成这样:

/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_easy_getinfo@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_perform@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_cleanup@CURL_OPENSSL_4\'/usr/bin/ld: /lib/x86_64-linux-gnu/libnetcdf.so.19: undefined reference to `curl_global_init@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_mime_init@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_remove_handle@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `std::condition_variable::wait(std::unique_lock&)@GLIBCXX_3.4.30\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_mime_addpart@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_version_info@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_mime_name@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_mime_filename@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_info_read@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_easy_setopt@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_mime_free@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_easy_cleanup@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_mime_data_cb@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_easy_perform@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_easy_init@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_add_handle@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_slist_free_all@CURL_OPENSSL_4\'/usr/bin/ld: /lib/x86_64-linux-gnu/libnetcdf.so.19: undefined reference to `curl_easy_strerror@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_slist_append@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_poll@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_version@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_setopt@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_mime_data@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_init@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_wait@CURL_OPENSSL_4\'/usr/bin/ld: /lib/x86_64-linux-gnu/libnetcdf.so.19: undefined reference to `curl_global_cleanup@CURL_OPENSSL_4\'collect2: error: ld returned 1 exit statusgmake[2]: *** [src/projects/basic/apps/pointBased/CMakeFiles/SIBR_PointBased_app.dir/build.make:186:src/projects/basic/apps/pointBased/SIBR_PointBased_app] 错误 1gmake[1]: *** [CMakeFiles/Makefile2:1424:src/projects/basic/apps/pointBased/CMakeFiles/SIBR_PointBased_app.dir/all] 错误 2gmake[1]: *** 正在等待未完成的任务..../usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_easy_getinfo@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_perform@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_cleanup@CURL_OPENSSL_4\'/usr/bin/ld: /lib/x86_64-linux-gnu/libnetcdf.so.19: undefined reference to `curl_global_init@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_mime_init@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_remove_handle@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `std::condition_variable::wait(std::unique_lock&)@GLIBCXX_3.4.30\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_mime_addpart@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_version_info@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_mime_name@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_mime_filename@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_info_read@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_easy_setopt@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_mime_free@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_easy_cleanup@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_mime_data_cb@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_easy_perform@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_easy_init@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_add_handle@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_slist_free_all@CURL_OPENSSL_4\'/usr/bin/ld: /lib/x86_64-linux-gnu/libnetcdf.so.19: undefined reference to `curl_easy_strerror@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_slist_append@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_poll@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_version@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_setopt@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_mime_data@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_init@CURL_OPENSSL_4\'/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_wait@CURL_OPENSSL_4\'/usr/bin/ld: /lib/x86_64-linux-gnu/libnetcdf.so.19: undefined reference to `curl_global_cleanup@CURL_OPENSSL_4\'collect2: error: ld returned 1 exit statusgmake[2]: *** [src/projects/basic/apps/texturedMesh/CMakeFiles/SIBR_texturedMesh_app.dir/build.make:186:src/projects/basic/apps/texturedMesh/SIBR_texturedMesh_app] 错误 1gmake[1]: *** [CMakeFiles/Makefile2:1335:src/projects/basic/apps/texturedMesh/CMakeFiles/SIBR_texturedMesh_app.dir/all] 错误 2[ 96%] Linking CXX shared library libsibr_gaussian.so[ 96%] Built target sibr_gaussian[ 97%] Linking CXX shared library libsibr_remote.so[ 97%] Built target sibr_remotegmake: *** [Makefile:136:all] 错误 2

这个报错查了很久,根源问题在于anaconda(还是这个),简单粗暴的破解办法就是,anaconda3的目录换个名字,改成anaconda31啥的都行,问题解决。
重新构建整个项目

rm -rf build/*cmake -Bbuild . -DCMAKE_BUILD_TYPE=Releasecmake --build build -j --target install

二、训练模型

1、数据准备

(1)视频转换为图片

进入源码路径下,创建data文件夹,将准备的视频放入,使用FFmpeg截取视频并保存在input下:

ffmpeg -i input.mp4 -vf \"setpts=0.2*PTS\" input/input_%4d.jpg

(2)调用colmap,生成点云

在源码目录下使用cover.py

python convert.py -s data

2、开始训练

python train.py -s data -m data/output

训练结果的目录如图所示:
3DGS复现
3DGS复现
point_cloud里面存着两个结果,迭代7000轮和迭代30000轮的。

三、可视化结果

将上面保存的output放入SIBR_viewers/install/bin,执行
.\\bin\\SIBR_gaussianViewer_app -m output1得到重建结果