daniel03c1 / masked_wavelet_nerf

MIT License
79 stars 5 forks source link

About shrink function #11

Closed xuyaojian123 closed 11 months ago

xuyaojian123 commented 11 months ago

Thank you very much for your work, I'd love to understand your code ideas!

This is original TensorRF shrink function

image

This your modified shrink function

image

What is the function of shrink? What is the difference from the original TensoRF shrink function? I see you used the F.grid_sample method, but the original TensoRF shrink function did not. In addition, what is the function of the variable unit, especially why self.init_mask() function is needed at the end? Maybe I have a lot of questions,but I hope to get your reply, thank you!

daniel03c1 commented 11 months ago

I really appreciate your interest in our work. As you pointed out, the only difference is "unit" and mask initialization. "Unit" ensures that the height and width of planes are divisible by the chosen "unit". This choice is deliberate, as it ensures that both the original plane and the result of applying the inverse discrete wavelet transform (idwt) to the plane maintain the same dimensions, assuming wavelets downscale planes by exactly two. If you want to use a much higher level of multilevel wavelet transformation, you might need to increase the unit size. Mask initialization is just a function that updates masks since planes have been shrunk.

xuyaojian123 commented 11 months ago

I really appreciate your interest in our work. As you pointed out, the only difference is "unit" and mask initialization. "Unit" ensures that the height and width of planes are divisible by the chosen "unit". This choice is deliberate, as it ensures that both the original plane and the result of applying the inverse discrete wavelet transform (idwt) to the plane maintain the same dimensions, assuming wavelets downscale planes by exactly two. If you want to use a much higher level of multilevel wavelet transformation, you might need to increase the unit size. Mask initialization is just a function that updates masks since planes have been shrunk.

Thank you!