From 1167f370c32907ebd6313ddfbeeeebbd10b66feb Mon Sep 17 00:00:00 2001 From: Devi Tse Date: Sun, 16 Feb 2025 17:28:19 +0800 Subject: [PATCH 1/2] feat: enable missing faceBlendshapes feature for ios --- ios/facelandmarkdetection/FaceLandmarkDetectorHelper.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ios/facelandmarkdetection/FaceLandmarkDetectorHelper.swift b/ios/facelandmarkdetection/FaceLandmarkDetectorHelper.swift index f76bf3e..5d5a817 100644 --- a/ios/facelandmarkdetection/FaceLandmarkDetectorHelper.swift +++ b/ios/facelandmarkdetection/FaceLandmarkDetectorHelper.swift @@ -23,7 +23,7 @@ class FaceLandmarkDetectorHelper: NSObject { private var minTrackingConfidence: Float private var optionsDelegate: Delegate var modelPath: String - + let handle: Int // this is an unfortunate hack : we need to provide the client with the size of the @@ -73,6 +73,7 @@ class FaceLandmarkDetectorHelper: NSObject { faceLandmarkerOptions.minTrackingConfidence = self.minTrackingConfidence faceLandmarkerOptions.baseOptions.modelAssetPath = self.modelPath faceLandmarkerOptions.baseOptions.delegate = self.optionsDelegate + faceLandmarkerOptions.outputFaceBlendshapes = true if runningMode == .liveStream { faceLandmarkerOptions.faceLandmarkerLiveStreamDelegate = self } From 5d1c0255472d41579f24c25a5c880889e26920c7 Mon Sep 17 00:00:00 2001 From: Devi Tse Date: Wed, 12 Mar 2025 11:24:10 +0800 Subject: [PATCH 2/2] chore: bump dependency MediaPipeTasksVision to 0.10.13 which is the minimum version to have face blendshapes --- ReactNativeMediaPipe.podspec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ReactNativeMediaPipe.podspec b/ReactNativeMediaPipe.podspec index 19e8425..9a8004c 100644 --- a/ReactNativeMediaPipe.podspec +++ b/ReactNativeMediaPipe.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| s.source_files = "ios/**/*.{h,m,mm,swift}" - s.dependency "MediaPipeTasksVision", "0.10.12" + s.dependency "MediaPipeTasksVision", "0.10.13" s.dependency "VisionCamera" # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0. @@ -25,7 +25,7 @@ Pod::Spec.new do |s| install_modules_dependencies(s) else s.dependency "React-Core" - + # Don't install the dependencies when we run `pod install` in the old architecture. if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1" @@ -41,5 +41,5 @@ Pod::Spec.new do |s| s.dependency "RCTTypeSafety" s.dependency "ReactCommon/turbomodule/core" end - end + end end