last-one / Pytorch_Realtime_Multi-Person_Pose_Estimation

Pytorch version of Realtime Multi-Person Pose Estimation project
MIT License
216 stars 70 forks source link

the limbs are not visible after training the model #31

Open r11alaa opened 6 years ago

r11alaa commented 6 years ago

hello @last-one , please I need some help I have trained the openpose using this code but when I tried to test the trained model I had the key points of the human body but not the limb connections.

1- I have used this because some loading errors: model = pose_estimation.PoseModel(num_point=19, num_vector=19) state_dict = torch.load(args.model)['state_dict'] from collections import OrderedDict new_state_dict = OrderedDict() for k, v in state_dict.items(): name = k[7:] new_state_dict[name] = v state_dict = model.state_dict() state_dict.update(new_state_dict) model.load_state_dict(state_dict) model = model.cuda() model.eval() 2- for the limb sequence I have used this code limbSeq = [[3,4], [4,5], [6,7], [7,8], [9,10], [10,11], [12,13], [13,14], [1,2], [2,9], [2,12], [2,3], [2,6], \ [3,17],[6,18],[1,16],[1,15],[16,18],[15,17]]

mapIdx = [[19,20],[21,22],[23,24],[25,26],[27,28],[29,30],[31,32],[33,34],[35,36],[37,38],[39,40], \ [41,42],[43,44],[45,46],[47,48],[49,50],[51,52],[53,54],[55,56]] 3- in the for loop over the parts: for part in range(1,19):

the resulting image: result

please If any one can help