trt_pose icon indicating copy to clipboard operation
trt_pose copied to clipboard

How to know the peak's body part

Open luzhangyi319 opened this issue 5 years ago • 1 comments

Is there a way to know what body part a peak point belongs to? I want to know which points are belong to left hand, right hand or left foot etc. Thanks.

luzhangyi319 avatar Jan 16 '20 20:01 luzhangyi319

parts = trt_pose.coco.coco_category_to_parts(human_pose)

And this in function draw_object to add the text on the image

part = parts[j]
peak = normalized_peaks[0][j][k]
x = round(float(peak[1]) * width)
y = round(float(peak[0]) * height)
cv2.circle(image, (x, y), 3, color, 2)
cv2.putText(image, part, (x + 5, y + 5), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 0, 255), 1, cv2.LINE_AA)

Adnaram avatar Jan 30 '20 14:01 Adnaram