princeton-vl / pose-hg-train

Training and experimentation code used for "Stacked Hourglass Networks for Human Pose Estimation"
Other
575 stars 185 forks source link

Heatmap gaussian standard deviation #25

Closed taion closed 7 years ago

taion commented 7 years ago

We're trying to implement a model similar to yours, but are hitting some confusion with generating the heatmaps for the targets.

In your paper, you say that you use 2D gaussians with a standard deviation of 1 px for targets. However, looking at your drawGaussian function: https://github.com/anewell/pose-hg-train/blob/c25da4b48c74a7b314384b07e8c09a15b0343e7f/src/util/img.lua#L204-L224, you set size to 6 * sigma + 1.

That hmGauss value appears to be 1 per https://github.com/anewell/pose-hg-train/blob/2fef6915fbd836a5d218a5d2f0c87c463532f1a6/src/opts.lua#L64.

This appears to lead to a size of 7, which per the Torch image.gaussian constructor should give a sigma of 1.75.

Am I misunderstanding something here?

anewell commented 7 years ago

That's a good catch, at some point I had a hard-coded gaussian function which worked a little bit differently which is why the size of the patch is defined to be 1 + 6*sigma. Honestly, I must have overlooked the difference in the behavior of the image.gaussian function. You can run some tests, but I think you will find the difference from training with values of sigma ranging from 1-2 is pretty minimal. It's not as important as other hyperparameters.

taion commented 7 years ago

Got it. Just wanted to make sure I wasn't missing something. Thanks!