Pytorch_Realtime_Multi-Person_Pose_Estimation icon indicating copy to clipboard operation
Pytorch_Realtime_Multi-Person_Pose_Estimation copied to clipboard

What is mapIdx in test_pose.py ?

Open ghost opened this issue 6 years ago • 11 comments

Hi,

I use my datasets which has 21 key-points ( include background ) and 19 vector. Does mapIdx's length equal number of keypoints ?

If I use datasets have different number keypoints, where should I change code in test_pose.py or train_pose.py ?

ghost avatar Dec 17 '17 06:12 ghost

Yes. The test and train scripts should be changed. I have mentioned something in README.

last-one avatar Dec 17 '17 07:12 last-one

Thank you!

Sorry, I have another question. Why do you use 46 which has line 127 "heat_weight = 46 * 46 * 19 / 2.0" in train_pose.py ? what is 46 ?

ghost avatar Dec 19 '17 02:12 ghost

The shape of feature (x) and the gt (y), which will be used to calculate the loss, is N * 46 * 46 (if input size is 368, 46 = 368 / 8, the receptive field of the feature is 8 in the network), and caffe's L2 loss is sum((x - y)^2) / batch_size, which is N in here. But pytorch's L2 loss is sum((x - y)^2) / the number of elements, which is N * 46 * 46 in here.

So, for comparing with origin code, the loss multiplies by 46*46. And the value varies from your input size and your network structure. If you don't change the input size and network structure, you can use 46.

last-one avatar Dec 19 '17 02:12 last-one

Thank you

Is Input size height and weight of original image or resized image ?

ghost avatar Dec 19 '17 03:12 ghost

resized image

last-one avatar Dec 19 '17 03:12 last-one

I acknowledge your kindness.

ghost avatar Dec 19 '17 03:12 ghost

Hi You said that mapIdx's length equals number of keypoints, but there is lin169 'candA = all_peaks[limbSeq[k][0]-1]' in test_pose.py. So, I think that mapIdx's length equals number of limbs.

My number of keypoints is 21 and number of limbs is 19.

ghost avatar Jan 11 '18 08:01 ghost

Yes. The mapIdx's length equals to the number of limbs. "You said that mapIdx's length equals number of keypoints", could you tell me where I said? And I will fix it.

last-one avatar Jan 11 '18 08:01 last-one

Thank you! I'm sorry, I misunderstood.

And, when a part isn't seen because of the oclusion, peaks is none (peaks = []). So, all_peaks's number is less than usual. What should I change part in test_pose.py ?

ghost avatar Jan 11 '18 09:01 ghost

@tugumi911 Hi, may I ask you have you figured out the meaning of mapidx?

hellojialee avatar Jan 14 '18 12:01 hellojialee

Sorry, I can't completely understand it.

ghost avatar Jan 14 '18 21:01 ghost