45 lines
1.6 KiB
Protocol Buffer Text Format
45 lines
1.6 KiB
Protocol Buffer Text Format
# MediaPipe graph to detect/predict face landmarks on CPU.
|
|
|
|
type: "FaceLandmarkFrontCpuImage"
|
|
|
|
# Input image. (Image)
|
|
input_stream: "IMAGE:image"
|
|
|
|
# Max number of faces to detect/track. (int)
|
|
input_side_packet: "NUM_FACES:num_faces"
|
|
|
|
# Collection of detected/predicted faces, each represented as a list of 468 face
|
|
# landmarks. (std::vector<NormalizedLandmarkList>)
|
|
# NOTE: there will not be an output packet in the LANDMARKS stream for this
|
|
# particular timestamp if none of faces detected. 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:multi_face_landmarks"
|
|
|
|
# Extra outputs (for debugging, for instance).
|
|
# Detected faces. (std::vector<Detection>)
|
|
output_stream: "DETECTIONS:face_detections"
|
|
# Regions of interest calculated based on landmarks.
|
|
# (std::vector<NormalizedRect>)
|
|
output_stream: "ROIS_FROM_LANDMARKS:face_rects_from_landmarks"
|
|
# Regions of interest calculated based on face detections.
|
|
# (std::vector<NormalizedRect>)
|
|
output_stream: "ROIS_FROM_DETECTIONS:face_rects_from_detections"
|
|
|
|
# Converts Image to ImageFrame for FaceLandmarkFrontCpu to consume.
|
|
node {
|
|
calculator: "FromImageCalculator"
|
|
input_stream: "IMAGE:image"
|
|
output_stream: "IMAGE_CPU:image_frame"
|
|
}
|
|
|
|
node {
|
|
calculator: "FaceLandmarkFrontCpu"
|
|
input_stream: "IMAGE:image_frame"
|
|
input_side_packet: "NUM_FACES:num_faces"
|
|
output_stream: "LANDMARKS:multi_face_landmarks"
|
|
output_stream: "DETECTIONS:face_detections"
|
|
output_stream: "ROIS_FROM_LANDMARKS:face_rects_from_landmarks"
|
|
output_stream: "ROIS_FROM_DETECTIONS:face_rects_from_detections"
|
|
}
|