xingyizhou / pytorch-pose-hg-3d

PyTorch implementation for 3D human pose estimation
GNU General Public License v3.0
614 stars 143 forks source link

Gaussian kernel generation #74

Closed blackccpie closed 5 years ago

blackccpie commented 5 years ago

Hi,

I was just wondering how you generated your hardcoded 7x7 gaussian kernel in img.py. In fact the values differ from the reference formula found in the reference pose-hg-train implementation, which is something like:

# The gaussian is not normalized, we want the center value to equal 1
g = np.exp(- ((x - x0) ** 2 + (y - y0) ** 2) / (2 * sigma ** 2))

Thanks for your help,

Regards

Albert

xingyizhou commented 5 years ago

I am aware of the difference, and that's why I use hard coding. The value is from my original torch implementation.

blackccpie commented 5 years ago

ok thanks for the tip, the original torch.image native implementation of image.gaussian can be found here, and it gives the sames coefficients as yours.