Files
mediapipe/mediapipe/modules/pose_landmark/pose_landmark_upper_body_gpu.pbtxt
T
MediaPipe Teamandchuoling 2b58cceec9 Project import generated by Copybara.
GitOrigin-RevId: d8caa66de45839696f5bd0786ad3bfbcb9cff632
2020-12-09 22:43:33 -05:00

92 lines
2.9 KiB
Protocol Buffer Text Format

# MediaPipe graph to detect/predict pose landmarks. (GPU input, and inference is
# executed on GPU.) This graph tries to skip pose detection as much as possible
# by using previously detected/predicted landmarks for new images.
#
# It is required that "pose_detection.tflite" is available at
# "mediapipe/modules/pose_detection/pose_detection.tflite"
# path during execution.
#
# It is required that "pose_landmark_upper_body.tflite" is available at
# "mediapipe/modules/pose_landmark/pose_landmark_upper_body.tflite"
# path during execution.
#
# EXAMPLE:
# node {
# calculator: "PoseLandmarkUpperBodyGpu"
# input_side_packet: "SMOOTH_LANDMARKS:smooth_landmarks"
# input_stream: "IMAGE:image"
# output_stream: "LANDMARKS:pose_landmarks"
# }
type: "PoseLandmarkUpperBodyGpu"
# GPU image. (GpuBuffer)
input_stream: "IMAGE:image"
# Whether to filter landmarks across different input images to reduce jitter.
# If unspecified, functions as set to false. (bool)
input_side_packet: "SMOOTH_LANDMARKS:smooth_landmarks"
# Pose landmarks within the given ROI. (NormalizedLandmarkList)
# We have 25 (upper-body) landmarks (see pose_landmark_upper_body_topology.svg).
# 0 - nose
# 1 - left eye (inner)
# 2 - left eye
# 3 - left eye (outer)
# 4 - right eye (inner)
# 5 - right eye
# 6 - right eye (outer)
# 7 - left ear
# 8 - right ear
# 9 - mouth (left)
# 10 - mouth (right)
# 11 - left shoulder
# 12 - right shoulder
# 13 - left elbow
# 14 - right elbow
# 15 - left wrist
# 16 - right wrist
# 17 - left pinky
# 18 - right pinky
# 19 - left index
# 20 - right index
# 21 - left thumb
# 22 - right thumb
# 23 - left hip
# 24 - right hip
#
# NOTE: if a pose is not present within the given ROI, for this particular
# timestamp there will not be an output packet in the LANDMARKS stream. However,
# the MediaPipe framework will internally inform the downstream calculators of
# the absence of this packet so that they don't wait for it unnecessarily.
output_stream: "LANDMARKS:pose_landmarks"
# Extra outputs (for debugging, for instance).
# Detected poses. (Detection)
output_stream: "DETECTION:pose_detection"
# Regions of interest calculated based on landmarks. (NormalizedRect)
output_stream: "ROI_FROM_LANDMARKS:pose_rect_from_landmarks"
# Regions of interest calculated based on pose detections. (NormalizedRect)
output_stream: "ROI_FROM_DETECTION:pose_rect_from_detection"
node {
calculator: "ConstantSidePacketCalculator"
output_side_packet: "PACKET:upper_body_only"
options: {
[mediapipe.ConstantSidePacketCalculatorOptions.ext]: {
packet { bool_value: true }
}
}
}
node {
calculator: "PoseLandmarkGpu"
input_side_packet: "UPPER_BODY_ONLY:upper_body_only"
input_side_packet: "SMOOTH_LANDMARKS:smooth_landmarks"
input_stream: "IMAGE:image"
output_stream: "LANDMARKS:pose_landmarks"
output_stream: "DETECTION:pose_detection"
output_stream: "ROI_FROM_LANDMARKS:pose_rect_from_landmarks"
output_stream: "ROI_FROM_DETECTION:pose_rect_from_detection"
}