Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluation for specific keypoints for Pose estimation: for example only head, ears, and so on[SOLVED] #995

Open
Dipankar1997161 opened this issue Jun 21, 2022 · 1 comment

Comments

@Dipankar1997161
Copy link

Hello @xingyizhou ,

I used my own dataset which consists of 13 keypoints ( eyes, ears are excluded)
I checked the coco_hp.py and it has 17 key points. I made the necessary changes in every file, however, the flip_idx is giving me error as it is not able to reshape into 13 keypoints during EVALUATION.
Error states: Required tensor shape 13, loaded 17

So is it possible to test only the desired number of keypoints ( not all 17 ) or do I have to retrain the model om.13 keypoints first to match the Tensor shape??

I hope to hear from you or your team @xingyizhou

@Dipankar1997161 Dipankar1997161 changed the title Question regarding Human Pose estimation Evaluation for specific keypoints for Pose estimation: for example only heads, ears, and so on Jun 24, 2022
@Dipankar1997161 Dipankar1997161 changed the title Evaluation for specific keypoints for Pose estimation: for example only heads, ears, and so on Evaluation for specific keypoints for Pose estimation: for example only heads, ears, and so on[SOLVED] Jun 24, 2022
@Dipankar1997161
Copy link
Author

I recently solved this and evaluated only the 13 key points leaving behind the eyes and the ears as per my application.

Just open the cocoeval.py under pycocotools, then head over to the computeOKS function, there you will encounter 2 sets of keypoints, ground truth keypoints, and detection keypoints as a NumPy array. Make sure to do proper slicing for that 51 array size python lists.

For example: if you wish to only check the mAP for nose, the slicing would be as follows:

g= np.array(gt['keypoints'][0:3])

Similarly, do it for dt array.

Also, set the sigma values of those unwanted key points to 0. You are all set!

Enjoy :)

@Dipankar1997161 Dipankar1997161 changed the title Evaluation for specific keypoints for Pose estimation: for example only heads, ears, and so on[SOLVED] Evaluation for specific keypoints for Pose estimation: for example only head, ears, and so on[SOLVED] Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant