jchibane / if-net

Implicit Feature Network (IF-Net) - Codebase
305 stars 59 forks source link

Questions on boundary_sampling #8

Closed pengsida closed 4 years ago

pengsida commented 4 years ago

Hi,

I have read carefully the paper and the supplementary material. But I cannot find the relationship between boundary_points and grid_coords in https://github.com/jchibane/if-net/blob/master/data_processing/boundary_sampling.py#L28 Why do you need to reverse the x and z axes in grid_coords and then multiply it by 2?

grid_coords[:, 0], grid_coords[:, 2] = boundary_points[:, 2], boundary_points[:, 0]
grid_coords = 2 * grid_coords
pengsida commented 4 years ago

I found that multiplying the grid_coords is for F.grid_sample, which requires [-1, 1]. But I still do not know why you need to reverse the x and z axes?

pengsida commented 4 years ago

I found that reversing the x and z axes is also for F.grid_sample, corresponding to d, h, w in F.grid_sample. Thank you!

jchibane commented 4 years ago

Hi,

exactly, the reason for both is the grid_sample function! :)

Best, Julian