ewrfcas / Pixel2MeshPlusPlus-MVDISN

Pixel2Mesh++: 3D Mesh Generation and Refinement from Multi-View Images (TPAMI2022)
BSD 3-Clause "New" or "Revised" License
25 stars 3 forks source link

Projection function - Single pixel only? #3

Closed kitbransby closed 2 years ago

kitbransby commented 2 years ago

Hi, In the tensorflow compatible version you interpolate the four nearest pixels like the original implementation,

i.e output = Q11 + Q21 + Q12 + Q22

but in the new version it seems like you sample from a single pixel. Have I understood that correctly?

output = F.grid_sample(img_feat, sample_points.unsqueeze(1), align_corners=True)
output = torch.transpose(output.squeeze(2), 1, 2)
ewrfcas commented 2 years ago

F.grid_sample works in bilinear interpolation, so it should be the same as the weighted summation.