ilovepose / DarkPose

Distribution-Aware Coordinate Representation for Human Pose Estimation
https://ilovepose.github.io/coco
Apache License 2.0
550 stars 80 forks source link

Could you explain how to calculate the second derivative 'dxy' ? #25

Closed seekFire closed 3 years ago

seekFire commented 3 years ago

In inference.py, function taylor, the 2nd derivative dxy is calculated by:

dxy = 0.25 * (hm[py+1][px+1] - hm[py-1][px+1] - hm[py+1][px-1] + hm[py-1][px-1])

So could you explain why is the equation like this?

bigbrother33 commented 3 years ago

same question - -

hbin-ac commented 3 years ago

dx[px, py] = (hm[px+1, py] - hm[px -1, py]) / 2 dxy[px, py] = (dx[px, py+1] - dx[px, py-1]) / 2 = (hm[py+1, px+1] - hm[py-1, px+1] - hm[py+1, px-1] + hm[py-1, px-1]) / 4

seekFire commented 3 years ago

@hbin-ac I got it! Thank you very much!