From bfb68491af291e87a225b34f304431a38878e676 Mon Sep 17 00:00:00 2001 From: Prianka Liz Kariat Date: Fri, 23 Jun 2023 20:13:29 +0530 Subject: [PATCH] Added copying of running mode in NSCopying implementation in iOS tasks --- .../ios/vision/face_detector/sources/MPPFaceDetectorOptions.m | 1 + .../vision/face_landmarker/sources/MPPFaceLandmarkerOptions.m | 1 + .../vision/image_classifier/sources/MPPImageClassifierOptions.m | 1 + .../vision/object_detector/sources/MPPObjectDetectorOptions.m | 1 + 4 files changed, 4 insertions(+) diff --git a/mediapipe/tasks/ios/vision/face_detector/sources/MPPFaceDetectorOptions.m b/mediapipe/tasks/ios/vision/face_detector/sources/MPPFaceDetectorOptions.m index 7d990aa69..9ea57395e 100644 --- a/mediapipe/tasks/ios/vision/face_detector/sources/MPPFaceDetectorOptions.m +++ b/mediapipe/tasks/ios/vision/face_detector/sources/MPPFaceDetectorOptions.m @@ -28,6 +28,7 @@ - (id)copyWithZone:(NSZone *)zone { MPPFaceDetectorOptions *faceDetectorOptions = [super copyWithZone:zone]; + faceDetectorOptions.runningMode = self.runningMode; faceDetectorOptions.minDetectionConfidence = self.minDetectionConfidence; faceDetectorOptions.minSuppressionThreshold = self.minSuppressionThreshold; faceDetectorOptions.faceDetectorLiveStreamDelegate = self.faceDetectorLiveStreamDelegate; diff --git a/mediapipe/tasks/ios/vision/face_landmarker/sources/MPPFaceLandmarkerOptions.m b/mediapipe/tasks/ios/vision/face_landmarker/sources/MPPFaceLandmarkerOptions.m index ebef092f0..47a25589e 100644 --- a/mediapipe/tasks/ios/vision/face_landmarker/sources/MPPFaceLandmarkerOptions.m +++ b/mediapipe/tasks/ios/vision/face_landmarker/sources/MPPFaceLandmarkerOptions.m @@ -33,6 +33,7 @@ - (id)copyWithZone:(NSZone *)zone { MPPFaceLandmarkerOptions *faceLandmarkerOptions = [super copyWithZone:zone]; + faceDetectorOptions.runningMode = self.runningMode; faceLandmarkerOptions.numFaces = self.numFaces; faceLandmarkerOptions.minFaceDetectionConfidence = self.minFaceDetectionConfidence; faceLandmarkerOptions.minFacePresenceConfidence = self.minFacePresenceConfidence; diff --git a/mediapipe/tasks/ios/vision/image_classifier/sources/MPPImageClassifierOptions.m b/mediapipe/tasks/ios/vision/image_classifier/sources/MPPImageClassifierOptions.m index 8d3815ff3..99f08d500 100644 --- a/mediapipe/tasks/ios/vision/image_classifier/sources/MPPImageClassifierOptions.m +++ b/mediapipe/tasks/ios/vision/image_classifier/sources/MPPImageClassifierOptions.m @@ -28,6 +28,7 @@ - (id)copyWithZone:(NSZone *)zone { MPPImageClassifierOptions *imageClassifierOptions = [super copyWithZone:zone]; + imageClassifierOptions.runningMode = self.runningMode; imageClassifierOptions.scoreThreshold = self.scoreThreshold; imageClassifierOptions.maxResults = self.maxResults; imageClassifierOptions.categoryDenylist = self.categoryDenylist; diff --git a/mediapipe/tasks/ios/vision/object_detector/sources/MPPObjectDetectorOptions.m b/mediapipe/tasks/ios/vision/object_detector/sources/MPPObjectDetectorOptions.m index b93a6b30b..bb4605cd8 100644 --- a/mediapipe/tasks/ios/vision/object_detector/sources/MPPObjectDetectorOptions.m +++ b/mediapipe/tasks/ios/vision/object_detector/sources/MPPObjectDetectorOptions.m @@ -28,6 +28,7 @@ - (id)copyWithZone:(NSZone *)zone { MPPObjectDetectorOptions *objectDetectorOptions = [super copyWithZone:zone]; + objectDetectorOptions.runningMode = self.runningMode; objectDetectorOptions.scoreThreshold = self.scoreThreshold; objectDetectorOptions.maxResults = self.maxResults; objectDetectorOptions.categoryDenylist = self.categoryDenylist;