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

error in testModel.ipynb

Open ZongweiZhou1 opened this issue 8 years ago • 3 comments

I think the judgement line 'elif(nA != 0 or nB != 0):' in cell [24] of testModel.ipyb should be 'elif (nA==0 or nB==0):'

or it will lost some flags for empty cell

TypeError Traceback (most recent call last) in () 10 ## all_peaks id 11 ---> 12 partAs = connection_all[k][:,0] 13 ## all_peaks id 14 partBs = connection_all[k][:,1]

TypeError: list indices must be integers, not tuple

ZongweiZhou1 avatar Oct 27 '17 09:10 ZongweiZhou1

@ZongweiZhou1 Thank you. I update the code according to https://github.com/ZheC/Realtime_Multi-Person_Pose_Estimation/blob/master/testing/python/demo.ipynb. But there is still a bug of the second person's link between right ankle and right knee, I don't know how to fix it.

dragonfly90 avatar Oct 27 '17 15:10 dragonfly90

I am totally confused by the 'generateLabelCPM.py'. First, I think it is not necessary to distinguish 'joint_self' and 'joint_others' in the file 'pose_io/annotation'. Does it have some special meanings??

secondly, I dont know how keypoints is sorted in coco2014, but in coco 2017, keypoints is sorted as follow: 0: nose ,
1: left eye 2: right eye 3: left ear 4: right ear 5: left shoulder 6: right shoulder 7: left elbow 8: right elbow 9: left wrist 10: right wrist 11: left hip 12: right hip 13: left knee 14: right knee 15: left ankle 16: right ankle

Then what is this mean in function 'TransformJointsSelf' of 'generateLabelCPM.py':

` COCO_to_ours_1 = [1, 6, 7, 9, 11, 6, 8, 10, 13, 15, 17, 12, 14, 16, 3, 2, 5, 4] COCO_to_ours_2 = [1, 7, 7, 9, 11, 6, 8, 10, 13, 15, 17, 12, 14, 16, 3, 2, 5, 4]

for i in range(18):
    currentdict = {'x': (jo['joints'][COCO_to_ours_1[i] - 1]['x'] + jo['joints'][COCO_to_ours_2[i] - 1]['x']) * 0.5, 'y': (jo['joints'][COCO_to_ours_1[i] - 1]['y'] + jo['joints'][COCO_to_ours_2[i] - 1]['y']) * 0.5}
    newjo['joints'].append(currentdict)

` why 'x = x +x*0.5' for a single point??

Additionally, i am not familiar with 'C', could you tell me what the input and output is of the 'putGaussianMaps' and 'putVecMaps'? in the line 308: heat_map[18][g_y,g_x]=max(1.0-maximum,0.0)
why ? I think the it is the maximum according to the paper, doesnt it?

By the way, I think the scale '368' can be setted to another value, am i right?

ZongweiZhou1 avatar Nov 17 '17 13:11 ZongweiZhou1

Actually, putGaussianMaps and putVecMaps are written in python(in pyx file), you can read it in folder cython, putVecMaps draw several vectors in pafmap(you can find more details in paper), and putGaussianMaps just draw some points around a keypoint.

It's doesn't matter whether it's max or min, for the 18th heatmap not being used by latter.

kohillyang avatar Nov 19 '17 08:11 kohillyang