XPengZhao / NeRF2

NeRF2: Neural Radio-Frequency Radiance Fields
https://xpengzhao.github.io/NeRF2/
MIT License
102 stars 12 forks source link

getting voxel origin #2

Closed Forge-Lee closed 10 months ago

Forge-Lee commented 10 months ago

Hi! I'm very impressed by your work, it's amazing that in the given demo your performance is so closed to the ground truth.

I'm a little bit confused that how you get the origin of the voxel, which is one of the input of the network (if I did not misunderstand). Is the method in the dataloader that generating sample ray origin implementing this part?

I'd appreciate it if you can reply.

XPengZhao commented 10 months ago

Yes, you are correct. When we sample the voxels, the origin of the ray (r_o) is designated to be at the center of the antenna array. This essentially means that we treat the antenna array as the starting point or 'origin' of all rays. The direction of each ray (r_d), however, is determined by the direction (pixel) of the spatial spectrum. This practically means that the direction in which each ray is projected is based on the spatial spectrum. The gen_rays_spectrum() function in dataloader.py implements this part.

Forge-Lee commented 10 months ago

Thanks a lot for the explanation! I have another related confusion is that how we get the coordinate of the voxel? I understand it as after getting the origin and the directions, we do "ray-tracing" and see where the ray interacts with the environment. Then we find a series of voxels along the ray from the interaction point and we have the coordinates. Is such understanding correct?

XPengZhao commented 10 months ago

In practice, we first establish a global coordinate system using an optical tracking system or SLAM. This enables us to pinpoint the coordinates of the antenna array, which serves as the origin of the ray. Next, we perform "ray tracing" to determine where the ray interacts with the environment.

The coordinate of a specific voxel along the ray from the interaction point can then be calculated using the formula $p_{voxel} = o + td$, where 'o' represents the origin, 't' is the distance along the ray, and 'd' is the direction of the ray.