Totoro97 / f2-nerf

Fast neural radiance field training with free camera trajectories
https://totoro97.github.io/projects/f2-nerf/
Apache License 2.0
933 stars 69 forks source link

Question about re-projection? #90

Open jelleopard opened 1 year ago

jelleopard commented 1 year ago

Hi, thanks for your excellent work!!!

How to reproject pts to a 2d plane? The code I wrote is as follows :

Tensor position_camera = torch::bmm(pts_w2cs, pts); Tensor UV = FlexOps::Sum(weights.unsqueeze(-1) * position_camera.reshape({ n_all_pts, 3 }), idx_start_end); Tensor UV_forward = torch::bmm(pts_intris, UV.unsqueeze(-1)); UV_forward = UV_forward.reshape({ -1, 3 }); Tensor final_UV = UV_f

orward.slice(1, 0, 2) / UV_forward.slice(1, 2, 3);

Thank you for your answer!