Pixel2Mesh
Pixel2Mesh copied to clipboard
Question on F.grid_sample for mesh to pixel
Hi there,
Thanks for providing the code for pixel2mesh, nice work!
I have one question for computing the 2D image features by computing the correspondence between pixel and vertex in mesh. In models/layers/gprojection.py line 86787, why do you divide the w and h by half of image dimension? Is that to align the coordinate system in PyTorch in order to use F.grid_sample? Some details would be highly appreciated!
Thanks!
For example, you need to map [0, 800] to [-1, 1]. You need to do this:
- minus 800
- divide by 400 (which is 800/2).