The Pose class represents a detected human pose in an image. It encapsulates information about the pose's keypoints, confidence score, bounding box, and unique ID. Additionally, it provides methods for managing pose-related data, such as drawing the pose on an image, updating its ID, and applying smoothing to its keypoints.
class Pose:
The Pose class is designed to store and manage information about a single detected pose.
These are shared across all instances of the Pose class:
num_kpts:
num_kpts = 18
kpt_names:
kpt_names = ['nose', 'neck', 'r_sho', 'r_elb', 'r_wri', 'l_sho', 'l_elb', 'l_wri',
'r_hip', 'r_knee', 'r_ank', 'l_hip', 'l_knee', 'l_ank',
'r_eye', 'l_eye', 'r_ear', 'l_ear']
sigmas and vars:
sigmas = np.array([...], dtype=np.float32) / 10.0
vars = (sigmas * 2) ** 2
sigmas: Standard deviations for each keypoint, used for similarity calculations.vars: Variances derived from sigmas.last_id:
last_id = -1
color:
color = [0, 224, 255]
These are specific to each pose instance:
keypoints:
(18, 2) representing the coordinates of the pose's keypoints.1 indicates that a keypoint is not detected.confidence:
bbox:
get_bbox method.id: