visualize
Tools to visualize detected/corrected poses and their matrix representations
viz_dist_matrices
viz_dist_matrices (p1, p2, figure_type='flipped_figures')
draw_figure
draw_figure (point_weights=None, show=True)
Scale keypoint radii by how much they moved in a video
overlay_video
overlay_video (video_file, pose_data, plot_type='pose', source_figure='figures', show_axis=False, savedir='', start_frame=0)
Set savedir to a folder where a whole bunch of images from the video, with pose overlays drawn on them, will be stored. These can be turned into a video (poses_video.mp4 or similar) later using this command: !ffmpeg -y -framerate \(FPS -pattern_type glob -i 'savedir/*.png' -strict '-2' -c:v libx264 -vf "fps=\)FPS” -pix_fmt yuv420p poses_video.mp4 Note that both occurrences of $FPS should be replaced with the framerate of the video, which can be obtained from get_video_stats(video_filename)
overlay_poses
overlay_poses (pil_image, figures_frame, show=False, plot_type='pose', source_figure='figures', show_axis=False, savepath='')
excerpt_pose
excerpt_pose (video_file, frame_poses, figure_index=0, show=False, plot_type='pose', source_figure='figures', flip_figures=False, margin=0.2, width=None, height=None, show_axis=True)
fig2img
fig2img (fig2, w=8, h=8, dpi=72)
plot_delaunay
plot_delaunay (figure, image=None, show=True, show_axis=True)
plot_poses
plot_poses (detections, image=None, show=True, savepath='', show_axis=True)