oppo-us-research / SpacetimeGaussians

[CVPR 2024] Spacetime Gaussian Feature Splatting for Real-Time Dynamic View Synthesis
https://oppo-us-research.github.io/SpacetimeGaussians-website/
Other
616 stars 45 forks source link

SIBR viewer compiling error #45

Closed brianneoberson closed 6 months ago

brianneoberson commented 6 months ago

Hello,

I've trained one of the Neural3D scenes and want to inspect the results using the SIBR viewer. I followed the instructions in the comments of script/setup.sh but after replacing the two folders mentioned in the instructions and running cmake --build build --target install --config RelWithDebInfo I get the following error:

[ 95%] Building CXX object src/projects/gaussianviewer/renderer/CMakeFiles/sibr_gaussian.dir/GaussianView.cpp.o
/media/dc-04-vol03/Brianne/HBR/gaussian-splatting/SIBR_viewers/src/projects/gaussianviewer/renderer/GaussianView.cpp: In member function ‘virtual void sibr::GaussianView::onRenderIBR(sibr::IRenderTarget&, const sibr::Camera&)’:
/media/dc-04-vol03/Brianne/HBR/gaussian-splatting/SIBR_viewers/src/projects/gaussianviewer/renderer/GaussianView.cpp:635:52: error: no matching function for call to ‘CudaRasterizer::Rasterizer::forward(std::function<char*(long unsigned int)>&, std::function<char*(long unsigned int)>&, std::function<char*(long unsigned int)>&, int&, int&, int, float&, float*&, float*&, float*&, float*&, float*&, float*&, float*&, float*&, Eigen::DenseCoeffsBase<Eigen::Matrix<int, 2, 1, 2>, 1>::Scalar&, Eigen::DenseCoeffsBase<Eigen::Matrix<int, 2, 1, 2>, 1>::Scalar&, std::nullptr_t, float*&, float*&, float&, float*&, float*&, float*&, std::nullptr_t, float*&, float*&, float*&, float&, float&, bool, float*&, std::nullptr_t, int*&, float*&, float*&)’
  635 |                 CudaRasterizer::Rasterizer::forward(
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
  636 |                         geomBufferFunc,
      |                         ~~~~~~~~~~~~~~~             
  637 |                         binningBufferFunc,
      |                         ~~~~~~~~~~~~~~~~~~          
  638 |                         imgBufferFunc,
      |                         ~~~~~~~~~~~~~~              
  639 |                         count, _sh_degree, 16,
      |                         ~~~~~~~~~~~~~~~~~~~~~~      
  640 |                         timestamp,
      |                         ~~~~~~~~~~                  
  641 |                         trbfcenter_cuda,
      |                         ~~~~~~~~~~~~~~~~            
  642 |                         trbfscale_cuda,
      |                         ~~~~~~~~~~~~~~~             
  643 |                         motion_cuda,
      |                         ~~~~~~~~~~~~                
  644 |                         pos_cuda,
      |                         ~~~~~~~~~                   
  645 |                         means3Ddummy_cuda,
      |                         ~~~~~~~~~~~~~~~~~~          
  646 |                         opacity_cuda,
      |                         ~~~~~~~~~~~~~               
  647 |                         opacitiesdummy_cuda,
      |                         ~~~~~~~~~~~~~~~~~~~~        
  648 |                         background_cuda,
      |                         ~~~~~~~~~~~~~~~~            
  649 |                         _resolution.x(), _resolution.y(),
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  650 |                         nullptr,
      |                         ~~~~~~~~                    
  651 |                         colors_precomp_cuda,
      |                         ~~~~~~~~~~~~~~~~~~~~        
  652 |                         scale_cuda,
      |                         ~~~~~~~~~~~                 
  653 |                         _scalingModifier,
      |                         ~~~~~~~~~~~~~~~~~           
  654 |                         rot_cuda,
      |                         ~~~~~~~~~                   
  655 |                         rott_cuda,
      |                         ~~~~~~~~~~                  
  656 |                         rotdummy_cuda,
      |                         ~~~~~~~~~~~~~~              
  657 |                         nullptr,
      |                         ~~~~~~~~                    
  658 |                         view_cuda,
      |                         ~~~~~~~~~~                  
  659 |                         proj_cuda,
      |                         ~~~~~~~~~~                  
  660 |                         cam_pos_cuda,
      |                         ~~~~~~~~~~~~~               
  661 |                         tan_fovx,
      |                         ~~~~~~~~~                   
  662 |                         tan_fovy,
      |                         ~~~~~~~~~                   
  663 |                         false,
      |                         ~~~~~~                      
  664 |                         image_cuda,
      |                         ~~~~~~~~~~~                 
  665 |                         nullptr,
      |                         ~~~~~~~~                    
  666 |                         rects,
      |                         ~~~~~~                      
  667 |                         boxmin,
      |                         ~~~~~~~                     
  668 |                         boxmax
      |                         ~~~~~~                      
  669 |                 );
      |                 ~                                   
In file included from /media/dc-04-vol03/Brianne/HBR/gaussian-splatting/SIBR_viewers/src/projects/gaussianviewer/renderer/GaussianView.cpp:16:
/media/dc-04-vol03/Brianne/HBR/gaussian-splatting/SIBR_viewers/extlibs/CudaRasterizer/CudaRasterizer/cuda_rasterizer/rasterizer.h:31:28: note: candidate: ‘static int CudaRasterizer::Rasterizer::forward(std::function<char*(long unsigned int)>, std::function<char*(long unsigned int)>, std::function<char*(long unsigned int)>, int, int, int, const float*, int, int, const float*, const float*, const float*, const float*, const float*, float, const float*, const float*, const float*, const float*, const float*, float, float, bool, float*, int*, int*, float*, float*)’
   31 |                 static int forward(
      |                            ^~~~~~~
/media/dc-04-vol03/Brianne/HBR/gaussian-splatting/SIBR_viewers/extlibs/CudaRasterizer/CudaRasterizer/cuda_rasterizer/rasterizer.h:31:28: note:   candidate expects 28 arguments, 36 provided
gmake[2]: *** [src/projects/gaussianviewer/renderer/CMakeFiles/sibr_gaussian.dir/build.make:90: src/projects/gaussianviewer/renderer/CMakeFiles/sibr_gaussian.dir/GaussianView.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1700: src/projects/gaussianviewer/renderer/CMakeFiles/sibr_gaussian.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

Would you have any suggestions to fix this problem? I'm not sure if I missed a step or if there is a problem with the CudaRasterizer code.

lizhan17 commented 6 months ago

did you install on windows ? we only test the viewer on windows.

if you replace files, there should a hidden .git in the original folder, please do not replace that .git folder.

brianneoberson commented 6 months ago

Thanks for the quick response! I indeed made sure not to replace the gaussian_splatting/SIBR_viewers/.git file. But I am not using windows, I am on Linux. Is there no way to make it work on Linux?

lizhan17 commented 6 months ago

you probablly try to build 3dgs' viewer on Linux. Then, just replace 3dgs' viewer code with the code we provide. (you can think as if you modify the 3dgs' viewer and then re-build the viewer).

brianneoberson commented 6 months ago

yes, that is what I did. I am building on Linux after replacing the files mentioned. But I get the error as showed above...

lizhan17 commented 6 months ago

i will try to go through the linux pipeline to build the code. please give me two weeks. I am busy with some other stuffs.

brianneoberson commented 6 months ago

I'm not sure what went wrong the first time, but I tried cloning the gaussian-splatting repo again and replacing the two folders again. The build was successful this time. :)

szat commented 5 months ago

@brianneoberson would it be possible to provide a small install tutorial for linux?

brianneoberson commented 5 months ago

@brianneoberson would it be possible to provide a small install tutorial for linux?

I'm not really sure I can give more information than the provided instructions apart from the fact that I had to make sure to copy the files individually such as to not overwrite the .git file.

szat commented 5 months ago

I keep getting this error, anyone has any ideas?

Consolidate compiler generated dependencies of target SIBR_gaussianViewer_app
[ 95%] Linking CXX executable SIBR_gaussianViewer_app
/usr/bin/ld: ../../renderer/libsibr_gaussian.so: undefined reference to `CudaRasterizer::Rasterizer::forward(std::function<char* (unsigned long)>, std::function<char* (unsigned long)>, std::function<char* (unsigned long)>, int, int, int, float const*, int, int, float const*, float const*, float const*, float const*, float const*, float, float const*, float const*, float const*, float const*, float const*, float, float, bool, float*, int*, int*, float*, float*)'
collect2: error: ld returned 1 exit status
gmake[2]: *** [src/projects/gaussianviewer/apps/gaussianViewer/CMakeFiles/SIBR_gaussianViewer_app.dir/build.make:189: src/projects/gaussianviewer/apps/gaussianViewer/SIBR_gaussianViewer_app] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1609: src/projects/gaussianviewer/apps/gaussianViewer/CMakeFiles/SIBR_gaussianViewer_app.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2