robot0321 / DepthRegularizedGS

This is an official repository for "Depth-Regularized Optimization for 3D Gaussian Splatting in Few-Shot Images"
Other
193 stars 11 forks source link

TypeError: rasterize_gaussians_backward(): incompatible function arguments. #21

Open shingkim opened 1 month ago

shingkim commented 1 month ago

Good work, but i am having this problem, is there a way to fix it? 2024-10-24 19-36-25屏幕截图

ning-zelin commented 3 weeks ago

Good work, but i am having this problem, is there a way to fix it? 2024-10-24 19-36-25屏幕截图

Hello, I've encountered the same issue. Do you know how to fix it now?

5p6 commented 1 week ago

I've encountered the same issue,have you solve this problem?

5p6 commented 1 week ago

I have resolved this issue. The author's diff-gaussianreseralition-depth-acc python package encountered a parameter mismatch when encapsulating it in the backward direction. Comparing the 107 rows in ${envdir}/Lib/site packages/diff_gaussianreseralition_depth.acc/init. py file with the 41 row RasterizeGaussiansBackwardCUDA function in submodules/diff-gaussianreseralition-depth-acc/rasterize_points.h, it can be observed that gradyacc and acc are confused,please change the code in ${envdir}/Lib/site packages/diff_gaussianreseralition_depth.acc/init. py at 107 rows

        args = (
                raster_settings.bg,
                means3D.data, 
                radii,
                acc, # move
                depth,# delete it
                colors_precomp, 
                scales, 
                rotations, 
                raster_settings.scale_modifier, 
                cov3Ds_precomp, 
                raster_settings.viewmatrix, 
                raster_settings.projmatrix, 
                raster_settings.tanfovx, 
                raster_settings.tanfovy, 
                grad_out_color,
                grad_out_depth, 
                sh, 
                raster_settings.sh_degree, 
                raster_settings.campos,
                geomBuffer,
                num_rendered,
                binningBuffer,
                imgBuffer,
                raster_settings.debug)

into

        args = (
                raster_settings.bg,
                means3D, 
                radii,
                colors_precomp, 
                scales, 
                rotations, 
                raster_settings.scale_modifier, 
                cov3Ds_precomp, 
                raster_settings.viewmatrix, 
                raster_settings.projmatrix, 
                raster_settings.tanfovx, 
                raster_settings.tanfovy, 
                grad_out_color,
                grad_out_depth, 
                grad_acc, # to use
                sh, 
                raster_settings.sh_degree, 
                raster_settings.campos,
                geomBuffer,
                num_rendered,
                binningBuffer,
                imgBuffer,
                acc, # moved
                raster_settings.debug)

and then run it again.

5p6 commented 1 week ago

I have resolved this issue. The author's diff-gaussianreseralition-depth-acc python package encountered a parameter mismatch when encapsulating it in the backward direction. Comparing the 107 rows in ${envdir}/Lib/site packages/diff_gaussianreseralition_depth.acc/init. py file with the 41 row RasterizeGaussiansBackwardCUDA function in submodules/diff-gaussianreseralition-depth-acc/rasterize_points.h, it can be observed that gradyacc and acc are confused,please change the code in ${envdir}/Lib/site packages/diff_gaussianreseralition_depth.acc/init. py at 107 rows

        args = (
                raster_settings.bg,
                means3D.data, 
                radii,
                acc, # move
                depth,# delete it
                colors_precomp, 
                scales, 
                rotations, 
                raster_settings.scale_modifier, 
                cov3Ds_precomp, 
                raster_settings.viewmatrix, 
                raster_settings.projmatrix, 
                raster_settings.tanfovx, 
                raster_settings.tanfovy, 
                grad_out_color,
                grad_out_depth, 
                sh, 
                raster_settings.sh_degree, 
                raster_settings.campos,
                geomBuffer,
                num_rendered,
                binningBuffer,
                imgBuffer,
                raster_settings.debug)

into

        args = (
                raster_settings.bg,
                means3D, 
                radii,
                colors_precomp, 
                scales, 
                rotations, 
                raster_settings.scale_modifier, 
                cov3Ds_precomp, 
                raster_settings.viewmatrix, 
                raster_settings.projmatrix, 
                raster_settings.tanfovx, 
                raster_settings.tanfovy, 
                grad_out_color,
                grad_out_depth, 
                grad_acc, # to use
                sh, 
                raster_settings.sh_degree, 
                raster_settings.campos,
                geomBuffer,
                num_rendered,
                binningBuffer,
                imgBuffer,
                acc, # moved
                raster_settings.debug)

and then run it again.

when i changed like this,the performance of the model will become bad,very bad,i dont know,could the author to fix this problem?