Pose Recognition

Parses Bodypose model output and augments metadata

Overview

This node parses the output of "Pose Detection" model to extract the human pose keypoints and line segments.

Requires Model Inference Node (Pose Detection) prior to it in order to function properly.

Inputs & Outputs

  • Inputs : 1, Media Format : Raw Video
  • Outputs : 1, Media Format: Raw Video
  • Output Metadata: parsed pose keypoints/segments under nodes.<node_id> and on matching objects.

Properties

PropertyDescriptionTypeDefaultRequired
draw_posesIf enabled, human pose points and body joints connections will be drawn on video.booltrueNo
draw_labelsDisplay body joints labels on video?boolfalseNo
accuracyHigher accuracy allows detecting smaller bodies, typically at a bigger distance from camera, but will also increase the processing time. Options: Low (low); Medium (medium); High (high).enumlowYes

Output Metadata

The fields below are declared by this node's metadata schema; the JSON values are representative examples.

PathTypeDescription
nodes.<node_id>.poses.<pose_id>.rectarrayArray of four numbers containing left, top, width, and height.
nodes.<node_id>.poses.<pose_id>.keypoints.<keypoint_name>.xintegerHorizontal pixel coordinate of this keypoint.
nodes.<node_id>.poses.<pose_id>.keypoints.<keypoint_name>.yintegerVertical pixel coordinate of this keypoint.
nodes.<node_id>.poses.<pose_id>.segmentsarrayArray of keypoint-name pairs that form the pose skeleton.
nodes.<node_id>.poses_countintegerTotal number of poses in the view right now
nodes.<node_id>.typestringIdentifies the node type that produced this metadata.

JSON example

{
    "nodes":{
        "annotate_pose1":{
            "type":"annotate_pose",
            "poses_count":<int>,
            "poses":{
                "<pose_id>":{
                    "keypoints":{
                        "l_ank":{"x":<int>, "y":<int>},
                        "l_ear":{"x":<int>, "y":<int>},
                        "l_elb":{"x":<int>, "y":<int>},
                        "l_eye":{"x":<int>, "y":<int>},
                        "l_hip":{"x":<int>, "y":<int>},
                        "l_knee":{"x":<int>, "y":<int>},
                        "l_sho":{"x":<int>, "y":<int>},
                        "l_wri":{"x":<int>, "y":<int>},
                        "neck":{"x":<int>, "y":<int>},
                        "nose":{"x":<int>, "y":<int>},
                        "r_ank":{"x":<int>, "y":<int>},
                        "r_ear":{"x":<int>, "y":<int>},
                        "r_elb":{"x":<int>, "y":<int>},
                        "r_eye":{"x":<int>, "y":<int>},
                        "r_hip":{"x":<int>, "y":<int>},
                        "r_knee":{"x":<int>, "y":<int>},
                        "r_sho":{"x":<int>, "y":<int>},
                        "r_wri":{"x":<int>, "y":<int>}
                    },
                    "rect":[<int>, <int>, <int>, <int>],
                    "segments":[
                        ["neck", "r_sho"],
                        ["neck", "l_sho"],
                        ["r_sho", "r_elb"],
                        ["r_elb", "r_wri"],
                        ["l_sho", "l_elb"],
                        ["l_elb", "l_wri"],
                        ["neck", "r_hip"],
                        ["r_hip", "r_knee"],
                        ["r_knee", "r_ank"],
                        ["neck", "l_hip"],
                        ["l_hip", "l_knee"],
                        ["l_knee", "l_ank"],
                        ["neck", "nose"],
                        ["nose", "r_eye"],
                        ["r_eye", "r_ear"],
                        ["nose", "l_eye"],
                        ["l_eye", "l_ear"]
                    ]
                }
            }
        }
    }
}

Additional details

The keypoint IDs use abbreviations as follows:

  • l_ank: left ankle
  • l_ear: left ear
  • l_elb: left elbow
  • l_eye: left eye
  • l_hip: left hip
  • l_knee: left knee
  • l_sho: left shoulder
  • l_wri: left wrist
  • neck: neck
  • nose: nose
  • r_ank: right ankle
  • r_ear: right ear
  • r_elb: right elbow
  • r_eye: right eye
  • r_hip: right hip
  • r_knee: right knee
  • r_sho: right shoulder
  • r_wri: right wrist

Object labels and attributes

  • Object labels/classes added: Each detected pose is added as a person object with class 0.
  • Object attribute labels/classes added: None.

Did this page help you?