bpbreid icon indicating copy to clipboard operation
bpbreid copied to clipboard

Shape different between pif and paf

Open onvungocminh opened this issue 11 months ago • 1 comments

Hi authors, Thanks for sharing your code. I trained the model. Every thing works normally. I want to generate human parsing masks. I got the error when concatenating the confidence scores for keypoints and connections. The size of pif is (17, 5, 17, 9) and the size of paf is (19, 9, 17, 9). Is it normal that I get different shape of pif and paf. How could I concatenate their confidence score? Hope to receive your advice. Thank you in advance.

onvungocminh avatar Feb 27 '24 11:02 onvungocminh

Hi @onvungocminh, usually the confidence score is the first value from the second dimension, if you just keep the first value of that second dimension with [:, 0], you should get two arrays of size (17, 1, 17, 9) and (19, 1, 17, 9). Please make sure by reading the PifPaf paper and the PifPaf code (or by visualizing some examples) that this is the first value that contains confidence, don't take my above suggestion as granted :-) Also please have a look at the human parsing generation code to see how this was implemented.

VlSomers avatar Feb 27 '24 12:02 VlSomers