DepthRegularizedGS icon indicating copy to clipboard operation
DepthRegularizedGS copied to clipboard

TypeError: rasterize_gaussians_backward(): incompatible function arguments.

Open shingkim opened this issue 2 years ago • 6 comments

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

shingkim avatar Oct 24 '24 11:10 shingkim

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?

ning-zelin avatar Nov 03 '24 14:11 ning-zelin

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

JunJie1213855 avatar Nov 12 '24 11:11 JunJie1213855

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.

JunJie1213855 avatar Nov 12 '24 12:11 JunJie1213855

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?

JunJie1213855 avatar Nov 12 '24 12:11 JunJie1213855

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

Beilinlin avatar Jan 20 '25 01:01 Beilinlin

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?

thank you very much, I originally thought my env is wrong. I have modified this .py file following your recommendation, and the process can run normally, but it run very slowly, about fineshed after 45 minutes.

Image

eternalland avatar Mar 08 '25 07:03 eternalland