AliaksandrSiarohin / monkey-net

Animating Arbitrary Objects via Deep Motion Transfer
473 stars 81 forks source link

expected keypoint coordinates #25

Closed saandeepa93 closed 4 years ago

saandeepa93 commented 4 years ago

Hello, What is the intuition behind squishing the grid coordinates between [-1, 1] before calculating the expectation and covariance of the heatmaps? In the paper it is mentioned that the grid coordinates have values within the H*W coordinates but in the code those values are reduced to [-1, 1]. Referring to the make_coordinate_grid method under /modules/util.py. Please let me know if I am missing something.

Thanks in advance!

AliaksandrSiarohin commented 4 years ago

Pytorch grid_warp method assumes that your coordinated is in [-1,1] range. So you can either use this range from the begining, like I did or use [0,W]x[0,H] range and then normalise when you pass to grid_warp. These are equivalent.

saandeepa93 commented 4 years ago

Got it! Thank you for your quick response.