szymanowiczs / splatter-image

Official implementation of `Splatter Image: Ultra-Fast Single-View 3D Reconstruction' CVPR 2024
https://szymanowiczs.github.io/splatter-image
BSD 3-Clause "New" or "Revised" License
795 stars 54 forks source link

Question about ray_dirs. #27

Closed karaokenoway closed 4 months ago

karaokenoway commented 5 months ago

Hi, what a great job!! I have a question about the process of initializing ray_dirs. why ray_dirs are divided by focal in this code?? If i use other data to train, should i take the same steps? Snipaste_2024-03-04_19-38-42

szymanowiczs commented 4 months ago

hi @karaokenoway apologies for a late reply. ray_dirs should be [u/f, v/f, 1] where u, v are x, y locations of the pixel centres (in pixel units) and f is focal length in pixels. For cars and chairs this is done when it is initialised, as encoded above. If focal length varies across source images, the buffer is set to be [u, v, 1] and is divided by focal length in the reconstruction method.

You definitely need to do this for your own data too.