MrNeRF/gaussian-splatting-cuda

Request to Ensure Compatibility with Windows

Opened this issue · 12 comments

MrNeRF commented

As a potential user of this project, I am interested in running it on a Windows environment. At this point, the necessary steps or requirements to get the project running on Windows are not clear. I kindly request that the following updates be made to the project:

  1. Update Documentation: Please add clear and comprehensive instructions to the README or a separate installation guide that outlines the steps to set up and run the project on Windows. This should include any dependencies that need to be installed.
  2. Ensure Compatibility: Please update the codebase, if necessary, to ensure that the project compiles and runs smoothly on Windows.

My main goal as a user is to have a seamless experience when compiling and running this project on a Windows system. I would greatly appreciate it if these changes could be made to satisfy this need.

MrNeRF commented

Cool! How did you do this?

instructions 13 sep 2023

   // Set up rasterization configuration
   GaussianRasterizationSettings raster_settings = {
       .image_height = static_cast<int>(viewpoint_camera.Get_image_height()),
       .image_width = static_cast<int>(viewpoint_camera.Get_image_width()),
       .tanfovx = std::tan(viewpoint_camera.Get_FoVx() * 0.5f),
       .tanfovy = std::tan(viewpoint_camera.Get_FoVy() * 0.5f),
       .bg = bg_color,
       .scale_modifier = scaling_modifier,
       .viewmatrix = viewpoint_camera.Get_world_view_transform(),
       .projmatrix = viewpoint_camera.Get_full_proj_transform(),
       .sh_degree = gaussianModel.Get_active_sh_degree(),
       .camera_center = viewpoint_camera.Get_camera_center(),
       .prefiltered = false};

to this

   // Set up rasterization configuration
   GaussianRasterizationSettings raster_settings = {
       static_cast<int>(viewpoint_camera.Get_image_height()),
       static_cast<int>(viewpoint_camera.Get_image_width()),
       std::tan(viewpoint_camera.Get_FoVx() * 0.5f),
       std::tan(viewpoint_camera.Get_FoVy() * 0.5f),
       bg_color,
       scaling_modifier,
       viewpoint_camera.Get_world_view_transform(),
       viewpoint_camera.Get_full_proj_transform(),
       gaussianModel.Get_active_sh_degree(),
       viewpoint_camera.Get_camera_center(),
       false};
  • In src/parameters.cu add #include <filesystem> and change this part of the code
namespace gs {
    namespace param {
        OptimizationParameters read_optim_params_from_json() {

            // automatically get the root path. Works only on linux, I guess.
            std::filesystem::path executablePath = std::filesystem::canonical("/proc/self/exe");
            std::filesystem::path parentDir = executablePath.parent_path().parent_path();
            std::filesystem::path json_path = parentDir / "parameter/optimization_params.json";
            // Check if the file exists before trying to open it

to this

namespace gs {
    namespace param {
        OptimizationParameters read_optim_params_from_json() {

            std::filesystem::path json_path =  "parameter/optimization_params.json"; 
            // Check if the file exists before trying to open it
  • In CMakeLists.txt i added set(CAFFE2_USE_CUDNN 1) to enable cuDNN just in case

  • After using build command cmake -B build -DCMAKE_BUILD_TYPE=Release you need to open generated project (in build folder) in Visual Studio 2022 and select Release version

  • Then you need to add python311.lib manually to dependencies:
    (C:\Program Files\Python311\libs\python311.lib)

264847385-c678d3a6-f8c1-49d6-978f-1186c385564a-1.mp4

And it compiled successfully

  • Now for the program to work, you need to copy all .dll files from the folder

gaussian-splatting-cuda\external\libtorch\lib

to the folder

gaussian-splatting-cuda\build\Release

image

And you need to copy folder

gaussian-splatting-cuda\parameter

to the folder

gaussian-splatting-cuda\build\Release

image

MrNeRF commented

Ok, thank you very much. It appears to me as almost everything you are doing relates to libtorch. This will be very soon fully replaced by CUDA and then we can completely ditch it. This should hopefully make the setup a lot easier.

windows Compiled successfully, but failed to train during training。
image

Seems not to train at all as at appears from your terminal output. Just loads the data. Not sure, what the issue is.

Hi, may I ask whether the libtorch is replaced yet?
Thanks for any comment.

No, it is not. I had no time to implement this fully. :(

windows Compiled successfully, but failed to train during training。 image

I'm having the same issue, have you solved this issue please?

Excuse me, what model of graphics card are you using and what is the CUDA version, I tried the exe file you posted, but it still doesn't work, I guess it is related to the graphics card model or CUDA version

I'm using cuda 11.8 and 1050 ti

I'm using cuda 11.8 and 1050 ti

ohmy god i finally find my problem. you ve mentioned
image
the key is Release,not debug,i have to admit that im not so familar with visualstudio,thanks a lot!!!!