Imported from https://github.com/umich-vl/pose-hg-demo