Closed musab1234 closed 5 years ago
Hi, I think x and y are swapped.
You can try keypoint = keypoint[:,::-1]
after this line
https://github.com/YuliangXiu/MobilePose-pytorch/blob/3a64e58990cfca24b99bb1113d0f6accc2441325/estimator.py#L70
Thanks @Fangyh09 , yeah orientations has been fixed now ( by your code snippet) but skeleton is little bit translated to right.
I think it needs a vertical flip. This image is not good to judge, could you try another image which is not so symmetrical?
i have swapped points from bottom to top and swapped columns too
keypoints = keypoints[:,::-1]
keypoints = keypoints[::-1,:]
by swaping columns result got more better but same issue with other images too.
Yeah, I think the above line is not right. You can try to replace it by:
pose_fun = lambda x: ((((x + 1) * self.output_size - 1) / 2.0-[left_pad, top_pad]) * 1.0 /np.array([new_w, new_h])*np.array([w,h]))
i am running
run_webcam.py
and its giving me correct and accurate output on different images but resulted skeleton is rotated at angle. i think its related topose_fun
lambda function inestimator.py
which is running after image inference. I have tried different models but same result. Currently i am using resnet18. Thank you