bearpaw/pytorch-pose

About data preprocessing of LSP dataset

Closed this issue · 5 comments

Hi Dr. Yang,

I read the data loading file of LSP dataset:
https://github.com/bearpaw/pytorch-pose/blob/master/pose/datasets/lsp.py

I have two questions:

  1. The augmentation code is commented out in this file. Is the augmentation unnecessary for the LSP data?
  2. You enlarge the scale by a factor of 1.4375. How do you pre-compute the scale of the LSP data? I see only the joints and their visibility are given. If you use the image size as the body size, do you use the long side or short side the rectangle? Besides, how do you pre-compute the center of human bodies? Do you think the testing performance is better if I use the mean coordinates of visible joints or the just the image center?

Thanks!

Hi, the augmentation part should be uncommented (commented only for the debugging purpose).

Sorry that I cannot remember how to compute 1.4375. But this code is mostly motivated by https://github.com/shihenw/convolutional-pose-machines-release and https://github.com/anewell/pose-hg-train

For LSP, we use the image center as the center of the human body for testing images, and use the bounding box center as the center of the human body. Please refer to the JSON generation code for more details https://github.com/bearpaw/pytorch-pose/blob/master/miscs/gen_lsp.m#L92-L93

Thanks! @bearpaw

How do you compute the head size for the final PCKh? The above code doesn't compute it. Do you use the L2 distance between the neck and head joints?

According to your evaluation code https://github.com/bearpaw/pytorch-pose/blob/master/evaluation/eval_PCKh.py, SC_BIAS = 0.6 is used to scale the pre-computed head size for the MPII data. Do the LSP data also require this?

I find this commented line of code
# pts[:, 0:2] -= 1 # Convert pts to zero based
in both the LSP and MPII dataloader files. I guess that the annotations provided in the original .mat file are one based. The python language is zero based. What do you think of this problem?

Thanks!

So do you figure it out the last question? Does it necessary to minus 1 for annotation?

@hzh8311 I think it doesn't make too much difference whether minus 1 or not. It's only 1 pixel difference on the original resolution. @bearpaw , what do you think?

Please refer to #19 for the discussion of minus 1.