ethanweber / nerfbusters

Nerfbusters project
MIT License
215 stars 15 forks source link

[Visibility median count] Where is the preprocessing code for this ? #25

Closed minsu1206 closed 5 months ago

minsu1206 commented 6 months ago

Hi

I want to compute visibility median count map for my own scene and mipnerf360 dataset.

image

I understand how the process works, but I couldn't find the code for processing this map. I would appreciate it if you could let me know where the code is.

Thanks in advance.

ethanweber commented 6 months ago

Hey @minsu1206, maybe you can reference this code for how we did it: https://github.com/nerfstudio-project/nerfstudio/pull/2264/files. Let me know if it's not clear. Thanks for the interest in this part of the method!

minsu1206 commented 6 months ago

Thanks.

Could you check my rough understanding is correct or not ?

  1. Make a set of ray samples which march from camera origin through each pixel coordinate ( let's call this {R} ) 2.{R} as input -> VisibilityField.forward( ) -> computed visibility ( # the number of camera frustums that the point belongs to)
  2. computed visibility & weights as inputs -> VIsibilityRenderer.forward( ) ( computed_median is used here) -> final result
ethanweber commented 5 months ago

My bad for not replying earlier, but yes, I think that sounds correct. The way you describe would be good for visualizing an visibility render in the viewer. If you want to use it as a loss, then I skip rendering it and instead penalize nonzero densities wherever a sample has fewer than N visible cameras.

minsu1206 commented 5 months ago

Thanks. It helped me a lot ! I'll close this issue.