GengDavid/pytorch-cpn

about output result

Tiamo666 opened this issue · 6 comments

Hi, David, Sorry to bother you.
I am a little confused about the output result of key points.
In the pytorch-cpn/256.192.model/test.py file, line 117, you write output
as follows:
v_score[p] = float(r0[p, int(round(y)+1e-10), int(round(x)+1e-10)])
single_result.append(resx)
single_result.append(resy)
single_result.append(1)
I guess the last 1 stands for the confidence or probability, I think it is not
so reasonable that the probability is always 1.
I guess v_score[p] has similar meaning,
why not use v_score[p] instead.

I think you misunderstood the result format. The "1" here represents visibility, which is recommended setting to 1 according to coco website
v_score[p] is used here as score(probability as you said).

Thanks for your clear explanation, I got it.

Ok. I'll close this issue. If you still have any questions about this topic, feel free to re-open it.

Hi, David, I have another question about the output.
resx, resy is whether the absolute coordinate or the relative to bbox.

@Tiamo666 Absolute coordinate.

OK, so I need to do the same preprocess as you did if I want to output the keypoints of my own pictures