-
Notifications
You must be signed in to change notification settings - Fork 710
Description
I noticed that in Rasterization.cpp, inside the rasterize_to_pixels_from_world_3dgs_fwd function, there is a hard assertion at Line 744 enforcing 3 channels:
// Rasterization.cpp Line 744
assert (channels == 3); // only support RGB for nowI am currently attempting to render RGB + Depth, which results in channels = 4. Consequently, this assertion fails and causes the program to crash. This occurs when using the configuration: with_eval3d + with_ut : python: /home/lenovo/Projects/gaussians/honor_vv/submodules/gsplat/gsplat/cuda/csrc/Rasterization.cpp:974: std::tuple<at::Tensor, at::Tensor, at::Tensor> gsplat::rasterize_to_pixels_from_world_3dgs_fwd(at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, std::optionalat::Tensor, std::optionalat::Tensor, uint32_t, uint32_t, uint32_t, at::Tensor, std::optionalat::Tensor, at::Tensor, CameraModelType, UnscentedTransformParameters, ShutterType, std::optionalat::Tensor, std::optionalat::Tensor, std::optionalat::Tensor, FThetaCameraDistortionParameters, at::Tensor, at::Tensor): Assertion `channels == 3' failed.
Aborted (core dumped)
Is there a specific technical reason why we strictly assert channels == 3 here? If the downstream logic supports it, is it safe to remove this assertion or change it to channels >= 3 to allow for Depth or other attributes?
Any insights would be appreciated. Thanks!