From c7aecb42ffd58e3d9e11e0fca482da7bbeb3bf3c Mon Sep 17 00:00:00 2001 From: MediaPipe Team Date: Wed, 12 Apr 2023 13:14:16 -0700 Subject: [PATCH] Internal change PiperOrigin-RevId: 523785788 --- .../tasks/cc/vision/pose_landmarker/BUILD | 10 + .../pose_landmarks_detector_graph.cc | 162 +++++++-- .../vision/expected_pose_landmarks.prototxt | 330 +++++++++--------- .../testdata/vision/pose_landmarker.task | Bin 5777682 -> 5777682 bytes third_party/external_files.bzl | 22 +- 5 files changed, 318 insertions(+), 206 deletions(-) diff --git a/mediapipe/tasks/cc/vision/pose_landmarker/BUILD b/mediapipe/tasks/cc/vision/pose_landmarker/BUILD index c5964c648..f763d09eb 100644 --- a/mediapipe/tasks/cc/vision/pose_landmarker/BUILD +++ b/mediapipe/tasks/cc/vision/pose_landmarker/BUILD @@ -28,21 +28,31 @@ cc_library( "//mediapipe/calculators/core:split_proto_list_calculator", "//mediapipe/calculators/core:split_vector_calculator", "//mediapipe/calculators/core:split_vector_calculator_cc_proto", + "//mediapipe/calculators/image:warp_affine_calculator", + "//mediapipe/calculators/image:warp_affine_calculator_cc_proto", + "//mediapipe/calculators/tensor:image_to_tensor_calculator_cc_proto", "//mediapipe/calculators/tensor:inference_calculator", "//mediapipe/calculators/tensor:tensors_to_floats_calculator", "//mediapipe/calculators/tensor:tensors_to_landmarks_calculator", "//mediapipe/calculators/tensor:tensors_to_landmarks_calculator_cc_proto", "//mediapipe/calculators/tensor:tensors_to_segmentation_calculator", "//mediapipe/calculators/tensor:tensors_to_segmentation_calculator_cc_proto", + "//mediapipe/calculators/util:alignment_points_to_rects_calculator", "//mediapipe/calculators/util:detections_to_rects_calculator", + "//mediapipe/calculators/util:detections_to_rects_calculator_cc_proto", + "//mediapipe/calculators/util:inverse_matrix_calculator", + "//mediapipe/calculators/util:landmark_letterbox_removal_calculator", + "//mediapipe/calculators/util:landmark_projection_calculator", "//mediapipe/calculators/util:landmarks_to_detection_calculator", "//mediapipe/calculators/util:rect_transformation_calculator", + "//mediapipe/calculators/util:rect_transformation_calculator_cc_proto", "//mediapipe/calculators/util:refine_landmarks_from_heatmap_calculator", "//mediapipe/calculators/util:refine_landmarks_from_heatmap_calculator_cc_proto", "//mediapipe/calculators/util:thresholding_calculator", "//mediapipe/calculators/util:thresholding_calculator_cc_proto", "//mediapipe/calculators/util:visibility_copy_calculator", "//mediapipe/calculators/util:visibility_copy_calculator_cc_proto", + "//mediapipe/calculators/util:world_landmark_projection_calculator", "//mediapipe/framework:subgraph", "//mediapipe/framework/api2:builder", "//mediapipe/framework/api2:port", diff --git a/mediapipe/tasks/cc/vision/pose_landmarker/pose_landmarks_detector_graph.cc b/mediapipe/tasks/cc/vision/pose_landmarker/pose_landmarks_detector_graph.cc index b53de57db..c71fc2d58 100644 --- a/mediapipe/tasks/cc/vision/pose_landmarker/pose_landmarks_detector_graph.cc +++ b/mediapipe/tasks/cc/vision/pose_landmarker/pose_landmarks_detector_graph.cc @@ -15,8 +15,12 @@ limitations under the License. #include "absl/status/statusor.h" #include "mediapipe/calculators/core/split_vector_calculator.pb.h" +#include "mediapipe/calculators/image/warp_affine_calculator.pb.h" +#include "mediapipe/calculators/tensor/image_to_tensor_calculator.pb.h" #include "mediapipe/calculators/tensor/tensors_to_landmarks_calculator.pb.h" #include "mediapipe/calculators/tensor/tensors_to_segmentation_calculator.pb.h" +#include "mediapipe/calculators/util/detections_to_rects_calculator.pb.h" +#include "mediapipe/calculators/util/rect_transformation_calculator.pb.h" #include "mediapipe/calculators/util/refine_landmarks_from_heatmap_calculator.pb.h" #include "mediapipe/calculators/util/thresholding_calculator.pb.h" #include "mediapipe/calculators/util/visibility_copy_calculator.pb.h" @@ -70,6 +74,9 @@ constexpr char kNormLandmarksFromTag[] = "NORM_LANDMARKS_FROM"; constexpr char kBatchEndTag[] = "BATCH_END"; constexpr char kItemTag[] = "ITEM"; constexpr char kIterableTag[] = "ITERABLE"; +constexpr char kLetterboxPaddingTag[] = "LETTERBOX_PADDING"; +constexpr char kMatrixTag[] = "MATRIX"; +constexpr char kOutputSizeTag[] = "OUTPUT_SIZE"; constexpr int kModelOutputTensorSplitNum = 5; constexpr int kLandmarksNum = 39; @@ -182,6 +189,28 @@ void ConfigureVisibilityCopyCalculator( options->set_copy_presence(true); } +void ConfigureRectTransformationCalculator( + mediapipe::RectTransformationCalculatorOptions* options) { + options->set_scale_x(1.25); + options->set_scale_y(1.25); + options->set_square_long(true); +} + +void ConfigureAlignmentPointsRectsCalculator( + mediapipe::DetectionsToRectsCalculatorOptions* options) { + // Derived from + // mediapipe/modules/pose_landmark/pose_landmarks_to_roi.pbtxt + options->set_rotation_vector_start_keypoint_index(0); + options->set_rotation_vector_end_keypoint_index(1); + options->set_rotation_vector_target_angle_degrees(90); +} + +void ConfigureWarpAffineCalculator( + mediapipe::WarpAffineCalculatorOptions* options) { + options->set_border_mode(mediapipe::WarpAffineCalculatorOptions::BORDER_ZERO); + options->set_gpu_origin(mediapipe::GpuOrigin::TOP_LEFT); +} + // A "mediapipe.tasks.vision.pose_landmarker.SinglePoseLandmarksDetectorGraph" // performs pose landmarks detection. // - Accepts CPU input images and outputs Landmark on CPU. @@ -288,6 +317,8 @@ class SinglePoseLandmarksDetectorGraph : public core::ModelTaskGraph { image_in >> preprocessing.In(kImageTag); pose_rect >> preprocessing.In(kNormRectTag); auto image_size = preprocessing[Output>(kImageSizeTag)]; + auto matrix = preprocessing[Output>(kMatrixTag)]; + auto letterbox_padding = preprocessing.Out(kLetterboxPaddingTag); ASSIGN_OR_RETURN(auto image_tensor_specs, BuildInputImageTensorSpecs(model_resources)); @@ -346,7 +377,7 @@ class SinglePoseLandmarksDetectorGraph : public core::ModelTaskGraph { .GetOptions()); ensured_landmarks_tensors >> tensors_to_landmarks.In(kTensorsTag); - auto landmarks = + auto raw_landmarks = tensors_to_landmarks[Output(kNormLandmarksTag)]; // Decodes the segmentation tensor into a mask image with pixel values in @@ -357,7 +388,8 @@ class SinglePoseLandmarksDetectorGraph : public core::ModelTaskGraph { &tensors_to_segmentation .GetOptions()); ensured_segmentation_tensors >> tensors_to_segmentation.In(kTensorsTag); - auto segmentation_mask = tensors_to_segmentation[Output(kMaskTag)]; + auto raw_segmentation_mask = + tensors_to_segmentation[Output(kMaskTag)]; // Refines landmarks with the heatmap tensor. auto& refine_landmarks_from_heatmap = @@ -366,7 +398,7 @@ class SinglePoseLandmarksDetectorGraph : public core::ModelTaskGraph { &refine_landmarks_from_heatmap.GetOptions< mediapipe::RefineLandmarksFromHeatmapCalculatorOptions>()); ensured_heatmap_tensors >> refine_landmarks_from_heatmap.In(kTensorsTag); - landmarks >> refine_landmarks_from_heatmap.In(kNormLandmarksTag); + raw_landmarks >> refine_landmarks_from_heatmap.In(kNormLandmarksTag); auto landmarks_from_heatmap = refine_landmarks_from_heatmap[Output( kNormLandmarksTag)]; @@ -379,11 +411,10 @@ class SinglePoseLandmarksDetectorGraph : public core::ModelTaskGraph { &split_normalized_landmark_list .GetOptions()); landmarks_from_heatmap >> split_normalized_landmark_list.In(""); - auto normalized_landmarks = split_normalized_landmark_list.Out("")[0] - .Cast(); - auto normalized_auxiliary_landmarks = - split_normalized_landmark_list.Out("")[1] - .Cast(); + auto landmarks = split_normalized_landmark_list.Out("")[0] + .Cast(); + auto auxiliary_landmarks = split_normalized_landmark_list.Out("")[1] + .Cast(); // Decodes the world-landmark tensors into a vector of world landmarks. auto& tensors_to_world_landmarks = @@ -395,7 +426,7 @@ class SinglePoseLandmarksDetectorGraph : public core::ModelTaskGraph { .GetOptions()); ensured_world_landmark_tensors >> tensors_to_world_landmarks.In(kTensorsTag); - auto world_landmarks = + auto raw_world_landmarks = tensors_to_world_landmarks[Output(kLandmarksTag)]; // Keeps only the actual world landmarks. @@ -403,7 +434,7 @@ class SinglePoseLandmarksDetectorGraph : public core::ModelTaskGraph { ConfigureSplitLandmarkListCalculator( &split_landmark_list .GetOptions()); - world_landmarks >> split_landmark_list.In(""); + raw_world_landmarks >> split_landmark_list.In(""); auto split_landmarks = split_landmark_list.Out(0); // Reuses the visibility and presence field in pose landmarks for the world @@ -413,39 +444,104 @@ class SinglePoseLandmarksDetectorGraph : public core::ModelTaskGraph { &visibility_copy .GetOptions()); split_landmarks >> visibility_copy.In(kLandmarksToTag); - normalized_landmarks >> visibility_copy.In(kNormLandmarksFromTag); - auto world_landmarks_with_visibility = + landmarks >> visibility_copy.In(kNormLandmarksFromTag); + auto world_landmarks = visibility_copy[Output(kLandmarksToTag)]; - // Landmarks to Detections. - auto& landmarks_to_detection = + // Each raw landmark needs to pass through LandmarkLetterboxRemoval + + // LandmarkProjection. + + // Landmark letterbox removal for landmarks. + auto& landmark_letterbox_removal = + graph.AddNode("LandmarkLetterboxRemovalCalculator"); + letterbox_padding >> landmark_letterbox_removal.In(kLetterboxPaddingTag); + landmarks >> landmark_letterbox_removal.In(kLandmarksTag); + auto adjusted_landmarks = landmark_letterbox_removal.Out(kLandmarksTag); + + // Projects the landmarks. + auto& landmarks_projection = graph.AddNode("LandmarkProjectionCalculator"); + adjusted_landmarks >> landmarks_projection.In(kNormLandmarksTag); + pose_rect >> landmarks_projection.In(kNormRectTag); + auto projected_landmarks = landmarks_projection.Out(kNormLandmarksTag) + .Cast(); + + // Landmark letterbox removal for auxiliary landmarks. + auto& auxiliary_landmark_letterbox_removal = + graph.AddNode("LandmarkLetterboxRemovalCalculator"); + letterbox_padding >> + auxiliary_landmark_letterbox_removal.In(kLetterboxPaddingTag); + auxiliary_landmarks >> + auxiliary_landmark_letterbox_removal.In(kLandmarksTag); + auto auxiliary_adjusted_landmarks = + auxiliary_landmark_letterbox_removal.Out(kLandmarksTag); + + // Projects the auxiliary landmarks. + auto& auxiliary_landmarks_projection = + graph.AddNode("LandmarkProjectionCalculator"); + auxiliary_adjusted_landmarks >> + auxiliary_landmarks_projection.In(kNormLandmarksTag); + pose_rect >> auxiliary_landmarks_projection.In(kNormRectTag); + auto auxiliary_projected_landmarks = + auxiliary_landmarks_projection.Out(kNormLandmarksTag) + .Cast(); + + // Project world landmarks. + auto& world_landmarks_projection = + graph.AddNode("WorldLandmarkProjectionCalculator"); + world_landmarks >> world_landmarks_projection.In(kLandmarksTag); + pose_rect >> world_landmarks_projection.In(kNormRectTag); + auto world_projected_landmarks = + world_landmarks_projection.Out(kLandmarksTag).Cast(); + + // Calculates the inverse transformation matrix. + auto& inverse_matrix = graph.AddNode("InverseMatrixCalculator"); + matrix >> inverse_matrix.In(kMatrixTag); + auto inverted_matrix = inverse_matrix.Out(kMatrixTag); + + // Projects the segmentation mask from the letterboxed ROI back to the full + // image. + auto& warp_affine = graph.AddNode("WarpAffineCalculator"); + ConfigureWarpAffineCalculator( + &warp_affine.GetOptions()); + image_size >> warp_affine.In(kOutputSizeTag); + inverted_matrix >> warp_affine.In(kMatrixTag); + raw_segmentation_mask >> warp_affine.In(kImageTag); + auto projected_segmentation_mask = warp_affine.Out(kImageTag).Cast(); + + // Calculate region of interest based on auxiliary landmarks, to be used + // in the next frame. Consists of LandmarksToDetection + + // AlignmentPointsRects + RectTransformation. + + auto& auxiliary_landmarks_to_detection = graph.AddNode("LandmarksToDetectionCalculator"); - landmarks >> landmarks_to_detection.In(kNormLandmarksTag); - auto detection = landmarks_to_detection.Out(kDetectionTag); + auxiliary_projected_landmarks >> + auxiliary_landmarks_to_detection.In(kNormLandmarksTag); + auto detection = auxiliary_landmarks_to_detection.Out(kDetectionTag); - // Detections to Rects. - auto& detection_to_rects = graph.AddNode("DetectionsToRectsCalculator"); - image_size >> detection_to_rects.In(kImageSizeTag); - detection >> detection_to_rects.In(kDetectionTag); - auto norm_rect = detection_to_rects.Out(kNormRectTag); + auto& detection_to_rect = graph.AddNode("AlignmentPointsRectsCalculator"); + ConfigureAlignmentPointsRectsCalculator( + &detection_to_rect + .GetOptions()); + detection >> detection_to_rect.In(kDetectionTag); + image_size >> detection_to_rect.In(kImageSizeTag); + auto raw_pose_rects = detection_to_rect.Out(kNormRectTag); - // Expands the pose rectangle so that in the next video frame it's likely to - // still contain the pose even with some motion. - auto& pose_rect_transformation = - graph.AddNode("RectTransformationCalculator"); - image_size >> pose_rect_transformation.In(kImageSizeTag); - norm_rect >> pose_rect_transformation.In(kNormRectTag); - auto pose_rect_next_frame = - pose_rect_transformation[Output("")]; + auto& rect_transformation = graph.AddNode("RectTransformationCalculator"); + ConfigureRectTransformationCalculator( + &rect_transformation + .GetOptions()); + image_size >> rect_transformation.In(kImageSizeTag); + raw_pose_rects >> rect_transformation.In("NORM_RECT"); + auto pose_rect_next_frame = rect_transformation[Output("")]; return {{ - /* pose_landmarks= */ normalized_landmarks, - /* world_pose_landmarks= */ world_landmarks_with_visibility, - /* auxiliary_pose_landmarks= */ normalized_auxiliary_landmarks, + /* pose_landmarks= */ projected_landmarks, + /* world_pose_landmarks= */ world_projected_landmarks, + /* auxiliary_pose_landmarks= */ auxiliary_projected_landmarks, /* pose_rect_next_frame= */ pose_rect_next_frame, /* pose_presence= */ pose_presence, /* pose_presence_score= */ pose_presence_score, - /* segmentation_mask= */ segmentation_mask, + /* segmentation_mask= */ projected_segmentation_mask, }}; } }; diff --git a/mediapipe/tasks/testdata/vision/expected_pose_landmarks.prototxt b/mediapipe/tasks/testdata/vision/expected_pose_landmarks.prototxt index 89841dd1c..072f1078b 100644 --- a/mediapipe/tasks/testdata/vision/expected_pose_landmarks.prototxt +++ b/mediapipe/tasks/testdata/vision/expected_pose_landmarks.prototxt @@ -1,231 +1,231 @@ landmark { - x: 0.47503802 - y: 0.20596696 - z: -0.2717698 - visibility: 0.9999881 - presence: 0.999985 + x: 0.46507242 + y: 0.41610304 + z: -0.14999297 + visibility: 0.99998844 + presence: 0.99998903 } landmark { - x: 0.48141137 - y: 0.18920818 - z: -0.2632932 - visibility: 0.9999653 - presence: 0.9999397 + x: 0.47030905 + y: 0.40309227 + z: -0.14747797 + visibility: 0.9999664 + presence: 0.99995553 } landmark { - x: 0.48735094 - y: 0.18857746 - z: -0.26326385 - visibility: 0.9999536 - presence: 0.9999366 + x: 0.47342995 + y: 0.40156996 + z: -0.14745711 + visibility: 0.9999546 + presence: 0.9999534 } landmark { - x: 0.49283814 - y: 0.187905 - z: -0.26327085 - visibility: 0.9999398 - presence: 0.9999262 + x: 0.47663194 + y: 0.39997125 + z: -0.14746517 + visibility: 0.99994385 + presence: 0.99994576 } landmark { - x: 0.47124237 - y: 0.1904801 - z: -0.24174295 - visibility: 0.9999498 - presence: 0.99994826 + x: 0.46315864 + y: 0.4074311 + z: -0.12709364 + visibility: 0.99994826 + presence: 0.99996126 } landmark { - x: 0.46842983 - y: 0.1906853 - z: -0.24183725 - visibility: 0.9999305 - presence: 0.99995315 + x: 0.46167478 + y: 0.4089059 + z: -0.12713416 + visibility: 0.9999267 + presence: 0.99996483 } landmark { - x: 0.46623105 - y: 0.19083896 - z: -0.24178317 - visibility: 0.9999275 - presence: 0.99995124 + x: 0.45983645 + y: 0.41042596 + z: -0.12708154 + visibility: 0.9999249 + presence: 0.9999635 } landmark { - x: 0.51211923 - y: 0.19381559 - z: -0.17863783 - visibility: 0.99989283 - presence: 0.99994254 + x: 0.48985234 + y: 0.4053322 + z: -0.10685073 + visibility: 0.99990225 + presence: 0.9999591 } landmark { - x: 0.47326156 - y: 0.19597495 - z: -0.07647368 - visibility: 0.9999068 - presence: 0.9999703 + x: 0.46542352 + y: 0.41843837 + z: -0.011494645 + visibility: 0.999894 + presence: 0.9999794 } landmark { - x: 0.48888734 - y: 0.21832445 - z: -0.24005938 - visibility: 0.9999583 - presence: 0.99999404 + x: 0.4757115 + y: 0.42860925 + z: -0.13509856 + visibility: 0.9999609 + presence: 0.9999964 } landmark { - x: 0.4750799 - y: 0.21996267 - z: -0.21063438 - visibility: 0.9999558 - presence: 0.9999944 + x: 0.46715724 + y: 0.4335927 + z: -0.10763592 + visibility: 0.9999547 + presence: 0.99999654 } landmark { - x: 0.58094275 - y: 0.27069643 - z: -0.13522492 - visibility: 0.9999832 - presence: 0.999948 + x: 0.5383015 + y: 0.47349828 + z: -0.09904624 + visibility: 0.99999046 + presence: 0.99997306 } landmark { - x: 0.44552392 - y: 0.27577883 - z: 0.024918541 - visibility: 0.9999881 - presence: 0.9999864 + x: 0.45313644 + y: 0.48936796 + z: 0.06387678 + visibility: 0.9999919 + presence: 0.99999344 } landmark { - x: 0.7083446 - y: 0.2769637 - z: -0.21408014 - visibility: 0.99515605 - presence: 0.9995721 + x: 0.6247076 + y: 0.47583634 + z: -0.16247825 + visibility: 0.9971179 + presence: 0.9997496 } landmark { - x: 0.31485358 - y: 0.25585473 - z: 0.03827352 - visibility: 0.98532397 - presence: 0.99995303 + x: 0.36646777 + y: 0.48342204 + z: 0.08566214 + visibility: 0.98212147 + presence: 0.9999796 } landmark { - x: 0.83101267 - y: 0.26628205 - z: -0.3408214 - visibility: 0.98725593 - presence: 0.99614346 + x: 0.6950672 + y: 0.47276276 + z: -0.23432226 + visibility: 0.99190086 + presence: 0.99751616 } landmark { - x: 0.20504552 - y: 0.24419393 - z: -0.12712422 - visibility: 0.9823162 - presence: 0.9993932 + x: 0.29679844 + y: 0.46896482 + z: -0.020334292 + visibility: 0.9826943 + presence: 0.99966264 } landmark { - x: 0.8703914 - y: 0.2622718 - z: -0.36847484 - visibility: 0.9663167 - presence: 0.99103457 + x: 0.71771 + y: 0.466713 + z: -0.25376678 + visibility: 0.97681385 + presence: 0.9940614 } landmark { - x: 0.16960809 - y: 0.2398484 - z: -0.14768666 - visibility: 0.95874923 - presence: 0.99777645 + x: 0.2762509 + y: 0.46507546 + z: -0.030049918 + visibility: 0.9577505 + presence: 0.9986953 } landmark { - x: 0.8661166 - y: 0.2626395 - z: -0.4128364 - visibility: 0.96738607 - presence: 0.9918098 + x: 0.71468514 + y: 0.46545807 + z: -0.27873537 + visibility: 0.9773756 + presence: 0.99447954 } landmark { - x: 0.16942637 - y: 0.23765557 - z: -0.19633037 - visibility: 0.9609766 - presence: 0.9979639 + x: 0.27898294 + y: 0.45952708 + z: -0.061881505 + visibility: 0.9598176 + presence: 0.9987778 } landmark { - x: 0.851011 - y: 0.2654708 - z: -0.36451888 - visibility: 0.96485573 - presence: 0.9941413 + x: 0.70616376 + y: 0.47313935 + z: -0.2473996 + visibility: 0.97479546 + presence: 0.9961171 } landmark { - x: 0.18291923 - y: 0.24094415 - z: -0.15638204 - visibility: 0.96108276 - presence: 0.9986619 + x: 0.2866556 + y: 0.4661593 + z: -0.039750997 + visibility: 0.96074265 + presence: 0.9992084 } landmark { - x: 0.5391705 - y: 0.50526816 - z: -0.053723037 - visibility: 0.9994941 - presence: 0.9995571 + x: 0.5199628 + y: 0.71132404 + z: -0.05568369 + visibility: 0.9997075 + presence: 0.9997811 } landmark { - x: 0.4622758 - y: 0.4999145 - z: 0.053916093 - visibility: 0.9996294 - presence: 0.9997342 + x: 0.46290728 + y: 0.7031081 + z: 0.05579845 + visibility: 0.99977857 + presence: 0.99986553 } landmark { - x: 0.675301 - y: 0.62948114 - z: -0.17877069 - visibility: 0.9939932 - presence: 0.9988996 + x: 0.60217524 + y: 0.81984437 + z: -0.14303333 + visibility: 0.99511355 + presence: 0.9993449 } landmark { - x: 0.28809914 - y: 0.52877027 - z: -0.1407601 - visibility: 0.99657404 - presence: 0.9995253 + x: 0.36314535 + y: 0.7332305 + z: -0.063036785 + visibility: 0.9963553 + presence: 0.9997341 } landmark { - x: 0.82030344 - y: 0.7374987 - z: 0.007227801 - visibility: 0.98853314 - presence: 0.990724 + x: 0.70064104 + y: 0.93365943 + z: -0.031219501 + visibility: 0.9909759 + presence: 0.9935846 } landmark { - x: 0.2672157 - y: 0.7118606 - z: -0.03558438 - visibility: 0.99250716 - presence: 0.9981616 + x: 0.35170174 + y: 0.9031892 + z: 0.0022715325 + visibility: 0.9929086 + presence: 0.99870515 } landmark { - x: 0.83312243 - y: 0.7519515 - z: 0.018887112 - visibility: 0.9363986 - presence: 0.98826605 + x: 0.70923454 + y: 0.954628 + z: -0.024844522 + visibility: 0.93651295 + presence: 0.99121124 } landmark { - x: 0.28136373 - y: 0.7367118 - z: -0.032466136 - visibility: 0.96477795 - presence: 0.9976307 + x: 0.36733973 + y: 0.93519753 + z: 0.003870454 + visibility: 0.96783006 + presence: 0.99829334 } landmark { - x: 0.8624686 - y: 0.7670486 - z: -0.12530705 - visibility: 0.9578498 - presence: 0.9776664 + x: 0.72855467 + y: 0.96812284 + z: -0.12364431 + visibility: 0.9639738 + presence: 0.98293763 } landmark { - x: 0.20045075 - y: 0.7439542 - z: -0.17505309 - visibility: 0.97366387 - presence: 0.99209917 + x: 0.30121577 + y: 0.94473803 + z: -0.08448716 + visibility: 0.97545445 + presence: 0.99386966 } diff --git a/mediapipe/tasks/testdata/vision/pose_landmarker.task b/mediapipe/tasks/testdata/vision/pose_landmarker.task index d57dd9e0dc643b06d1ce98600e591ebc9f4a4c43..598959b84ff8f8efd34b3ca96136976344bc35ac 100644 GIT binary patch delta 393 zcmX}nxlRIM00iJ47Ii^oQ1QMmSdVqRZ$U-8P{a#Kd<9!eV@#Y_*kM8E3s4(gz$dV# z@GZ1-v~ZHIn_{N;@#!xLjLBuJK-B!^HuC%c!bkWCiwF=kL@iNA*hG*B5%oj^(MW^| zl_NwG(M+@uQKFS-Bie}$qLb(%x``g5m*^wonk$gIrCye!C~EXlI0$f~T# zx@<^7lCmjVvMnjuk+kf}p6ttk97;xxRr8lTe?%aa|+4- KU!`}ako^HHD~3S; delta 379 zcmX}n%Qiv*00q#i8*ZW#Lf(YB9@nMvew0@zl2`hMCcc2REY32oK}P<<>IZy*FEI26 z3>r8l&RTnR2Io{hK0OtIVH9$vH)Qq5VG%x}jqnrgLJLbgoqxZm*^wHL_aY=3=%`cFfl@m5@W&U#gvLK5RmxLr`NtR_rR%K1rWkWV)OSUB?Y1xro z*^_-akc=G4ksM1_a&jW4l9w|n$hlm|rCiCi6zdK5=Kjajf!dv2O8q~nz1yYyFQ}c2 AyZ`_I diff --git a/third_party/external_files.bzl b/third_party/external_files.bzl index 91fbf809f..0d6abdf1e 100644 --- a/third_party/external_files.bzl +++ b/third_party/external_files.bzl @@ -306,8 +306,14 @@ def external_files(): http_file( name = "com_google_mediapipe_expected_pose_landmarks_prototxt", + sha256 = "eed8dfa169b0abee60cde01496599b0bc75d91a82594a1bdf59be2f76f45d7f5", + urls = ["https://storage.googleapis.com/mediapipe-assets/expected_pose_landmarks.prototxt?generation=1681243892338529"], + ) + + http_file( + name = "com_google_mediapipe_expected_pose_landmarks_prototxt_orig", sha256 = "c230e0933e6cb4af69ec21314f3f9930fe13e7bb4bf1dbdb74427e4138c24c1e", - urls = ["https://storage.googleapis.com/mediapipe-assets/expected_pose_landmarks.prototxt?generation=1681240674007127"], + urls = ["https://storage.googleapis.com/mediapipe-assets/expected_pose_landmarks.prototxt.orig?generation=1681243894793518"], ) http_file( @@ -817,7 +823,7 @@ def external_files(): http_file( name = "com_google_mediapipe_ocr_text_jpg", sha256 = "88052e93aa910330433741f5cef140f8f9ec463230a332aef7038b5457b06482", - urls = ["https://storage.googleapis.com/mediapipe-assets/ocr_text.jpg?generation=1681240679268678"], + urls = ["https://storage.googleapis.com/mediapipe-assets/ocr_text.jpg?generation=1681243901191762"], ) http_file( @@ -937,13 +943,13 @@ def external_files(): http_file( name = "com_google_mediapipe_pose_expected_detection_pbtxt", sha256 = "16866c8dd4fbee60f6972630d73baed219b45824c055c7fbc7dc9a91c4b182cc", - urls = ["https://storage.googleapis.com/mediapipe-assets/pose_expected_detection.pbtxt?generation=1681240681879992"], + urls = ["https://storage.googleapis.com/mediapipe-assets/pose_expected_detection.pbtxt?generation=1681243904247231"], ) http_file( name = "com_google_mediapipe_pose_expected_expanded_rect_pbtxt", sha256 = "b0a41d25ed115757606dfc034e9d320a93a52616d92d745150b6a886ddc5a88a", - urls = ["https://storage.googleapis.com/mediapipe-assets/pose_expected_expanded_rect.pbtxt?generation=1681240684183698"], + urls = ["https://storage.googleapis.com/mediapipe-assets/pose_expected_expanded_rect.pbtxt?generation=1681243906782078"], ) http_file( @@ -954,8 +960,8 @@ def external_files(): http_file( name = "com_google_mediapipe_pose_landmarker_task", - sha256 = "c20284c073a891774f894269a14da4cbe4a84cab034757dab587bc19c9522b7a", - urls = ["https://storage.googleapis.com/mediapipe-assets/pose_landmarker.task?generation=1681240686676992"], + sha256 = "fb9cc326c88fc2a4d9a6d355c28520d5deacfbaa375b56243b0141b546080596", + urls = ["https://storage.googleapis.com/mediapipe-assets/pose_landmarker.task?generation=1681243909774681"], ) http_file( @@ -972,8 +978,8 @@ def external_files(): http_file( name = "com_google_mediapipe_pose_landmark_lite_tflite", - sha256 = "13628a7d1c1a0f601ae7202c71ec8edc3ac42db9d15f116c494ff24d1afabdd7", - urls = ["https://storage.googleapis.com/mediapipe-assets/pose_landmark_lite.tflite?generation=1679955090327685"], + sha256 = "1150dc68a713b80660b90ef46ce4e85c1c781bb88b6e3512cc64e6a685ba5588", + urls = ["https://storage.googleapis.com/mediapipe-assets/pose_landmark_lite.tflite?generation=1681243912778143"], ) http_file(