25 lines
738 B
Plaintext
25 lines
738 B
Plaintext
|
# MediaPipe subgraph that smoothes face landmarks.
|
||
|
|
||
|
type: "FaceLandmarksSmoothing"
|
||
|
|
||
|
input_stream: "NORM_LANDMARKS:landmarks"
|
||
|
input_stream: "IMAGE_SIZE:input_image_size"
|
||
|
output_stream: "NORM_FILTERED_LANDMARKS:filtered_landmarks"
|
||
|
|
||
|
# Applies smoothing to a face landmark list. The filter options were handpicked
|
||
|
# to achieve better visual results.
|
||
|
node {
|
||
|
calculator: "LandmarksSmoothingCalculator"
|
||
|
input_stream: "NORM_LANDMARKS:landmarks"
|
||
|
input_stream: "IMAGE_SIZE:input_image_size"
|
||
|
output_stream: "NORM_FILTERED_LANDMARKS:filtered_landmarks"
|
||
|
node_options: {
|
||
|
[type.googleapis.com/mediapipe.LandmarksSmoothingCalculatorOptions] {
|
||
|
velocity_filter: {
|
||
|
window_size: 5
|
||
|
velocity_scale: 20.0
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|