Fix assertion failure in Hair Segmentation demo

PiperOrigin-RevId: 494004801
This commit is contained in:
Sebastian Schmidt 2022-12-08 15:01:34 -08:00 committed by Copybara-Service
parent b4e1969e43
commit 05535db5f7
2 changed files with 9 additions and 1 deletions

View File

@ -43,6 +43,7 @@ cc_library(
deps = [
"//mediapipe/calculators/core:flow_limiter_calculator",
"//mediapipe/calculators/core:previous_loopback_calculator",
"//mediapipe/calculators/image:color_convert_calculator",
"//mediapipe/calculators/image:image_transformation_calculator",
"//mediapipe/calculators/image:recolor_calculator",
"//mediapipe/calculators/image:set_alpha_calculator",

View File

@ -60,7 +60,14 @@ node {
tag_index: "LOOP"
back_edge: true
}
output_stream: "PREV_LOOP:previous_hair_mask"
output_stream: "PREV_LOOP:previous_hair_mask_rgb"
}
# Converts the 4 channel hair mask to a single channel mask
node {
calculator: "ColorConvertCalculator"
input_stream: "RGB_IN:previous_hair_mask_rgb"
output_stream: "GRAY_OUT:previous_hair_mask"
}
# Embeds the hair mask generated from the previous round of hair segmentation