bearpaw / pytorch-pose

A PyTorch toolkit for 2D Human Pose Estimation.
GNU General Public License v3.0
1.1k stars 250 forks source link

Indices used to compute accuracy #79

Closed radvani closed 5 years ago

radvani commented 5 years ago

Thanks so much for this implementation. Quick question, when computing the PCK accuracy during validation and training, the following indices are used:

idx = [1,2,3,4,5,6,11,12,15,16]

These appear to be MPII joint indices, offset by 1. Is there a reason you don't include indices 13 and 14, which would correspond to the shoulders, when computing accuracy here?

bearpaw commented 5 years ago

I followed hg's implementation. It's just a way to help you monitor the training process, nothing more (we have more post processings to do to get the final results, e.g., mapping the coords back to the original image).

The final PCK value should be computed by https://github.com/bearpaw/pytorch-pose/blob/master/evaluation/eval_PCKh.py

radvani commented 5 years ago

Interesting, I wonder why they do that. I'll try to track down the explanation. While it's true the final PCK(h) value is computed via the evaluation step, the PCK value used in training appears to be used to determine the best epoch, e.g. here:

is_best = valid_acc > best_acc
best_acc = max(valid_acc, best_acc)

Thanks again!

bearpaw commented 5 years ago

Yes, I got your point. We can definitely try but maybe we won't see a big difference. Since each joint are getting better "simultaneously"? I don't know just guess :)

radvani commented 5 years ago

I agree it probably won't make a big difference since the PCK accuracy across limbs appears to be correlated. I'll give it a try next time I train. Thanks!