VlSomers / bpbreid

A strong baseline for body part-based person re-identification (check out our WACV23 paper)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shape different between pif and paf

onvungocminh opened this issue · 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.

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.