posenet-pytorch icon indicating copy to clipboard operation
posenet-pytorch copied to clipboard

Question about keypoint coordinates , and drawing skeleton

Open mohammad-saber opened this issue 5 years ago • 1 comments

Thank you for sharing your great code. I have a few questions. I am new in this field. If you kindly answer my questions, I really appreciate it.

  1. I would like to have keypoint coordinates. Is it stored in the variable "keypoint coordinates". And I noticed that coordinate is [y, x] not [x, y]. Is my understanding correct?

  2. How does program decide which keypoint to draw? I guess, it is decided by comparing its score with "min_part_score=0.25".

  3. There is another parameter "min_confidence=0.1" in function "get_adjacent_keypoints". Is it a threshold to whether draw skeleton?

mohammad-saber avatar Jun 15 '20 06:06 mohammad-saber

I can answer the first question:

The keypoint coordinates are stored in keypoint_coords, with the first index being the pose, and the second being the keypoint. So for example, the keypoints of the 1st skeleton are in keypoint_coords[0,:,:] (list of [y,x] pixel coordinates); and to access the first keypoint of the first pose: keypoint_coords[0,0,:] ([y,x] pixel coordinate).

And yes, in most cases, when representing digital images, the first index in the image array is the y-coordinate, and the second index is the x-coordinate. Also note that the upper left corner is located at (0, 0). See a more detailed explanation here: https://staff.fnwi.uva.nl/r.vandenboomgaard/IPCV20172018/LectureNotes/IP/Images/ImageRepresentation.html

glhr avatar Sep 26 '20 12:09 glhr