Human pose tracking is a task in computer vision that focuses on identifying key body locations, analyzing posture, and categorizing movements. At the heart of this technology is a pre-trained machine-learning model to assess the visual input and recognize landmarks on the body in both image coordinates and 3D world coordinates. The use cases and applications of this technology include but are not limited to Human-Computer Interaction, Sports Analysis, Gaming, Virtual Reality, Augmented Reality, Health, etc.
In this example, the MediaPipe Pose Landmark Detection solution was utilized to detect and track human pose landmarks and produces segmentation masks for humans. Rerun was employed to visualize the output of the Mediapipe solution over time to make it easy to analyze the behavior.
Logging and visualizing with Rerun
The visualizations in this example were created with the following Rerun code.
Timelines
For each processed video frame, all data sent to Rerun is associated with the two timelines time and frame_idx.
The segmentation result is logged through a combination of two archetypes. The segmentation image itself is logged as an SegmentationImage and contains the id for each pixel. The color is determined by the AnnotationContext which is logged with timeless=True as it should apply to the whole sequence.
Logging the body pose landmarks involves specifying connections between the points, extracting pose landmark points and logging them to the Rerun SDK.
The 2D and 3D points are logged through a combination of two archetypes. First, a timeless ClassDescription is logged, that contains the information which maps keypoint ids to labels and how to connect the keypoints. Defining these connections automatically renders lines between them. Mediapipe provides the POSE_CONNECTIONS variable which contains the list of (from, to) landmark indices that define the connections. Second, the actual keypoint positions are logged in 2D and 3D as Points2D and Points3D archetypes, respectively.
Visualize streams of multimodal data. Fast, easy to use, and simple to integrate. Built in Rust using egui.
Build time aware visualizations of multimodal data
Use the Rerun SDK (available for C++, Python and Rust) to log data like images, tensors, point clouds, and text. Logs are streamed to the Rerun Viewer for live visualization or to file for later use.
importrerunasrr# pip install rerun-sdkrr.init("rerun_example_app")
rr.connect() # Connect to a remote viewer# rr.spawn() # Spawn a child process with a viewer and connect# rr.save("recording.rrd") # Stream all logs to disk# Associate subsequent data with 42 on the “frame” timelinerr.set_time_sequence("frame", 42)
# Log colored 3D points to the entity at `path/to/points`rr.log("path/to/points", rr.Points3D(positions, colors=colors