slothfulxtx / diff-gaussian-rasterization

Differentiable gaussian rasterization with depth, alpha, normal map and extra per-Gaussian attributes, also support camera pose gradient
Other
165 stars 10 forks source link

Depth map multiplied by alpha values #13

Closed DogeSquad closed 1 month ago

DogeSquad commented 3 months ago

Hi there,

I have noticed that the output depth map is somehow multiplied by the alpha values. Am I missing something or is this not intentional? Because fading out the depth via the alpha values pushes pixels closer to the camera.

Screenshot from 2024-06-24 15-29-33

On the left is the original depth map. On the right is the corrected depth map (division by alpha values).

slothfulxtx commented 3 months ago

Hi, My advice on the depth map is that you should regularize the output alpha map with a ground truth object mask during training, and directly use the output depth map instead of the normalized one. Maybe this solution can help.

2019213039 commented 2 months ago

Hello, thanks for open source. What is the rendered alpha image used for?

Here are the original image: 000085

Here are the mask: 000085 png

Here are the depth label: 000085 Here are the depth results I got when training on the waymo dataset: 00085_depth

Here are the alpha result: 00085_alpha

From the rendered depth map, the odd thing is that for the close up white Land Rover, the rendered result sets the distance of the vehicle to the farthest distance ([1.0, 1.0, 1.0]). Can you tell me why?

slothfulxtx commented 2 months ago

Sorry for the delayed response. It's quite interesting that your depth map is highly related to the semantic information of the rendered image. My advice is that use your gt depth and gt mask to supervise the 3D GS during optimization. Setting the weight of depth loss and alpha loss as 1.0 may be helpful. @2019213039 Further discussion can be sent to my email (xutx21@mails.tsinghua.edu.cn), in which way I can see your message timely.