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

Mask generator #8

Closed
bmquynhlinh opened this issue Mar 29, 2023 · 3 comments
Closed

Mask generator #8

bmquynhlinh opened this issue Mar 29, 2023 · 3 comments

Comments

@bmquynhlinh
Copy link

Hello,
I'm asking about how to generate a mask which shape: .npy contains a 36xHxW array (H and W).

  1. What is H,W in this case?
  2. I tried to extract data from OpenPifPaf but it's only return keypoint, how did you get value for joints? Alternative, I use this script to calculate it:
    keypoints = predictions[0].data for x, y in predictions[0].skeleton: joint_array = (keypoints[x-1]+ keypoints[y-1])/2
@VlSomers
Copy link
Owner

Hi, HxW in this case is the height and width of the human parsing labels array, it can be anything depending on how you generate them (and generally it depends on the output tensor size of the model you used to extract them): all labels will be resized within the BPBreID code so you shouldn't care too much about it.
Regarding the generation of these labels using OpenPifPaf, you need to modify their code in order to output on the disk the pif and paf confidence fields generated by PifPaf encoder. I will try to make my OpenPifPaf fork open source next week so that you can have a look at how I did that, feel free to send me a reminder if you don't receive any news within 10 days.

Let me know if I can do something else to help!

@bmquynhlinh
Copy link
Author

Thank you :D

@VlSomers
Copy link
Owner

The Python script from @samihormi to generate human parsing labels based on PifPaf and MaskRCNN has been released, please have a look at the "Generate human parsing labels" section in the README.

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

2 participants