shunsukesaito / PIFu

This repository contains the code for the paper "PIFu: Pixel-Aligned Implicit Function for High-Resolution Clothed Human Digitization"
https://shunsukesaito.github.io/PIFu/
Other
1.76k stars 341 forks source link

torch grid_sample takes input in range [-1,1] #34

Closed AlleUndKalle closed 4 years ago

AlleUndKalle commented 4 years ago

Thanks for your awesome work!

Here in the index() function definition (https://github.com/shunsukesaito/PIFu/blob/master/lib/geometry.py#L8), it is written that uv parameter is in range [0,1]. However, in pytorch documentation (https://pytorch.org/docs/stable/nn.functional.html#grid-sample) it is noted as [-1,1].

Is this a bug or typo in writing of the function definition?

leezhongguo commented 4 years ago

I think it should be [-1,1].

shunsukesaito commented 4 years ago

Sorry, it should be [-1,1] and my comment in the code was just wrong. Code itself is working as expected.