matrixify
compare_laplacians
compare_laplacians (p1, p2, figure_index=0, figure_type='flipped_figures', show=False)
get_laplacian_matrix
get_laplacian_matrix (frame, normalized=True, show=False, figure_index=0, figure_type='flipped_figures')
LAPLACIAN: compute the Delaunay triangulation between keypoints, then use the connections to build an adjacency matrix, which is then converted to its (normalized) Laplacian matrix (a single matrix that encapsulates the degree of each node and the connections between the nodes). Then you can subtract a pose’s Laplacian from another’s to get a measure of the degree of similarity or difference between them.
get_pose_matrix
get_pose_matrix (frame, figure_index=0, figure_type='flipped_figures')
compare_poses_cosine
compare_poses_cosine (p1, p2)
normalize_and_compare_poses_cosine
normalize_and_compare_poses_cosine (p1, p2)
Details | |
---|---|
p1 | |
p2 | Uses cosine distance |
normalize_symmetrify_and_compare_poses_cosine
normalize_symmetrify_and_compare_poses_cosine (p1, p2)
symmetrify_pose
symmetrify_pose (frame, figure_index=0, figure_type='figures', y_first=True)
normalize_pose
normalize_pose (frame, figure_index=0, figure_type='figures', norm='l2', y_first=True, flip_x=False, flip_y=False, mirror_coco_17_left_right=False)
get_normalized_coords
get_normalized_coords (frame, figure_index=0, figure_type='figures', norm='l2')
matrixify_pose
matrixify_pose (coords_and_confidence)
DISTANCE MATRIX: compute a pose’s L1-normed inter-keypoint distance matrix. To compare any two poses, we can measure the degree of correlation between their distance matrices via a statistical test, such as the Mantel test. XXX It’s not obvious that normalizing the matrix really makes a difference to the final correlation comparison, but it doesn’t seem to hurt, either… Note that if the pose representation has 17 keypoints, then each pose instance can be represented by a condensed distance matrix (or vector) of 136 elements.