Added forward pass for depth rendering#2
Added forward pass for depth rendering#2JonathonLuiten wants to merge 1 commit intographdeco-inria:mainfrom
Conversation
|
The required changes to the main repo can be found in the following PR: |
|
Hey @grgkopanas and @Snosixtyboo I ran the speed test on this (tanks and temples / truck for 7000 iterations) It results in 0 slowdown. I think it's safe to merge this. Results: WITH CHANGE: Training progress: 23%|██▎ | 7000/30000 [02:50<12:04, 31.74it/s, Loss=0.0588340] ORIGINAL: Training progress: 23%|██▎ | 7000/30000 [02:50<12:07, 31.60it/s, Loss=0.0594036] |
Could you say why? Thanks! |
|
Because the backward pass for the depth hasn't been implemented. Unlike pytorch, the backward pass isn't automatically calculated in CUDA, and has to be written by hand. |
|
Ahh, by the way you had written it, I thought there was some more grand technical fault. Thanks! |
|
I always get memory error of this version with depth, seems there is hidden memory bug in this depth version |
|
I'm curious whether a backward pass has been implemented for this |
Added submodule license
| n_contrib[pix_id] = last_contributor; | ||
| for (int ch = 0; ch < CHANNELS; ch++) | ||
| out_color[ch * H * W + pix_id] = C[ch] + T * bg_color[ch]; | ||
| out_depth[pix_id] = D; |
Hi, |
Adds CUDA code to also render the depth map (as well as the color map). Note this is ONLY the forward pass for this, feeding gradients back through this depth map won't work.
Note, it is unclear if this will result in slower rendering (my guess is that it shouldn't), but someone should check this probably before merging (e.g. train on garden with and without these changes), and if it is slower, then it should be added with a flag and off by default.
Also note that this by itself with break the main gaussian_splatting repo, so there needs to be the corresponding PR there merged too simultaneously. I will make a PR for that there too now.