buaacyw / GaussianEditor

[CVPR 2024] GaussianEditor: Swift and Controllable 3D Editing with Gaussian Splatting
https://buaacyw.github.io/gaussian-editor/
Other
1.13k stars 57 forks source link

Question about Gaussian Semantic Tracing implementation. #64

Open broiron opened 2 months ago

broiron commented 2 months ago

Hello, Thanks for your work!

While analyzing the paper and code together, there was something curious about Semantic Tracing

In the paper, the following equation is used to calculate the weight of i-th Gaussian: $w_i = \sum o_i(p) T_i(p) M(p) $

However, in the code, particularly in apply_weight.cu, which seems to be the part assigning weight to the Gaussian, it appears to be implemented differently from the equation above.

// apply_weights.cu renderCUDA_apply_weights
for (int ch=0; ch<CHANNELS; ch++) {
    atomicAdd(weights + (collected_id[j] * CHANNELS + ch), C[ch]);
    atomicAdd(cnt + collected_id[j], 1);
}
...

When the Gaussian is used to render a 2D masked region, it seems the weight is calculated by just adding the mask value (0 or 1), which is C[ch]. And the average weight is calculated by dividing it in cnt.

Is that correct? Because It seems that the weight calculation method doesn't follow the equation in the paper, so I'm reaching out to inquire.

I would appreciate any insights from those who are familiar with this.