Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request to Ensure Compatibility with Windows #4

Open
MrNeRF opened this issue Aug 18, 2023 · 12 comments
Open

Request to Ensure Compatibility with Windows #4

MrNeRF opened this issue Aug 18, 2023 · 12 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@MrNeRF
Copy link
Owner

MrNeRF commented Aug 18, 2023

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 MrNeRF added good first issue Good for newcomers help wanted Extra attention is needed labels Aug 18, 2023
@DiHubKi
Copy link

DiHubKi commented Aug 30, 2023

image

@MrNeRF
Copy link
Owner Author

MrNeRF commented Aug 30, 2023

Cool! How did you do this?

@DiHubKi
Copy link

DiHubKi commented Aug 30, 2023

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
Copy link
Owner Author

MrNeRF commented Aug 30, 2023

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.

@MrNeRF MrNeRF mentioned this issue Aug 31, 2023
@ydi-mua
Copy link

ydi-mua commented Oct 13, 2023

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

@MrNeRF
Copy link
Owner Author

MrNeRF commented Oct 13, 2023

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

@ZiXuanVickyLu
Copy link

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

@MrNeRF
Copy link
Owner Author

MrNeRF commented Mar 2, 2024

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

@LfWhat
Copy link

LfWhat commented Apr 22, 2024

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

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

@LfWhat
Copy link

LfWhat commented Apr 22, 2024

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

@DiHubKi
Copy link

DiHubKi commented Apr 22, 2024

I'm using cuda 11.8 and 1050 ti

@LfWhat
Copy link

LfWhat commented Apr 22, 2024

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!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants