hbb1 / torch-splatting

A pure pytorch implementation of 3D gaussian Splatting
296 stars 25 forks source link

error in build cov2d #1

Closed MisEty closed 11 months ago

MisEty commented 12 months ago

Hello! thanks for your great work and I am also try to implement gaussian splatting in pytorch. And I noticed that in the line 92-93 of gauss_render.py:

tx = (t[..., 0] / t[..., 2]).clip(min=-tan_fovx*1.3, max=tan_fovx*1.3) * t[..., 0]
ty = (t[..., 1] / t[..., 2]).clip(min=-tan_fovy*1.3, max=tan_fovy*1.3) * t[..., 1]

but in diff-gaussian-rasterization image The clipped x y in multipled by t.z.

Also, I hope you can give more information of your pytorch demo (dataset format...). Thanks a lot!

hbb1 commented 12 months ago

Thanking for reminding me. The mistakes is fixed. I also uploaded an example data, with a json file indicating the image list to load. the image list is a list of dict: each item contains camera parameters (c2w and intrinsic), rgb image, alpha image (optional) and depth image (optional). Other data formats are also applicable, but additionally effort may be required to convert the camera to the desired camera class.

MisEty commented 11 months ago

Thanks for your reply!