Merge pull request #5007 from priankakariatyml:ios-pose-landmarker-implementation

PiperOrigin-RevId: 591910121
This commit is contained in:
Copybara-Service 2023-12-18 08:54:34 -08:00
commit e2ea358919
2 changed files with 10 additions and 1 deletions

View File

@ -59,6 +59,7 @@ CALCULATORS_AND_GRAPHS = [
"//mediapipe/tasks/cc/vision/image_classifier:image_classifier_graph",
"//mediapipe/tasks/cc/vision/image_segmenter:image_segmenter_graph",
"//mediapipe/tasks/cc/vision/object_detector:object_detector_graph",
"//mediapipe/tasks/cc/vision/pose_landmarker:pose_landmarker_graph",
]
strip_api_include_path_prefix(
@ -106,6 +107,9 @@ strip_api_include_path_prefix(
"//mediapipe/tasks/ios/vision/object_detector:sources/MPPObjectDetector.h",
"//mediapipe/tasks/ios/vision/object_detector:sources/MPPObjectDetectorOptions.h",
"//mediapipe/tasks/ios/vision/object_detector:sources/MPPObjectDetectorResult.h",
"//mediapipe/tasks/ios/vision/pose_landmarker:sources/MPPPoseLandmarker.h",
"//mediapipe/tasks/ios/vision/pose_landmarker:sources/MPPPoseLandmarkerOptions.h",
"//mediapipe/tasks/ios/vision/pose_landmarker:sources/MPPPoseLandmarkerResult.h",
],
)
@ -206,6 +210,9 @@ apple_static_xcframework(
":MPPObjectDetector.h",
":MPPObjectDetectorOptions.h",
":MPPObjectDetectorResult.h",
":MPPPoseLandmarker.h",
":MPPPoseLandmarkerOptions.h",
":MPPPoseLandmarkerResult.h",
],
deps = [
"//mediapipe/tasks/ios/vision/face_detector:MPPFaceDetector",
@ -215,6 +222,7 @@ apple_static_xcframework(
"//mediapipe/tasks/ios/vision/image_classifier:MPPImageClassifier",
"//mediapipe/tasks/ios/vision/image_segmenter:MPPImageSegmenter",
"//mediapipe/tasks/ios/vision/object_detector:MPPObjectDetector",
"//mediapipe/tasks/ios/vision/pose_landmarker:MPPPoseLandmarker",
],
)

View File

@ -36,7 +36,8 @@ using PoseLandmarkerGraphOptionsProto =
optionsProto->MutableExtension(PoseLandmarkerGraphOptionsProto::ext);
poseLandmarkerGraphOptions->Clear();
[self.baseOptions copyToProto:poseLandmarkerGraphOptions->mutable_base_options()];
[self.baseOptions copyToProto:poseLandmarkerGraphOptions->mutable_base_options()
withUseStreamMode:self.runningMode != MPPRunningModeImage];
poseLandmarkerGraphOptions->set_min_tracking_confidence(self.minTrackingConfidence);
PoseLandmarksDetectorGraphOptionsProto *poseLandmarksDetectorGraphOptions =