From bb93b775f4b418d8e9fd5062d51c9cb679517d14 Mon Sep 17 00:00:00 2001 From: Prianka Liz Kariat Date: Fri, 15 Sep 2023 14:05:59 +0530 Subject: [PATCH] Added iOS face stylizer options --- .../tasks/ios/vision/face_stylizer/BUILD | 9 +++++++ .../sources/MPPFaceStylizerOptions.h | 27 +++++++++++++++++++ .../sources/MPPFaceStylizerOptions.m | 25 +++++++++++++++++ 3 files changed, 61 insertions(+) create mode 100644 mediapipe/tasks/ios/vision/face_stylizer/sources/MPPFaceStylizerOptions.h create mode 100644 mediapipe/tasks/ios/vision/face_stylizer/sources/MPPFaceStylizerOptions.m diff --git a/mediapipe/tasks/ios/vision/face_stylizer/BUILD b/mediapipe/tasks/ios/vision/face_stylizer/BUILD index 1f0a25ac4..b98a4de93 100644 --- a/mediapipe/tasks/ios/vision/face_stylizer/BUILD +++ b/mediapipe/tasks/ios/vision/face_stylizer/BUILD @@ -26,3 +26,12 @@ objc_library( ], ) +objc_library( + name = "MPPFaceStylizerOptions", + srcs = ["sources/MPPFaceStylizerOptions.m"], + hdrs = ["sources/MPPFaceStylizerOptions.h"], + deps = [ + "//mediapipe/tasks/ios/core:MPPTaskOptions", + ], +) + diff --git a/mediapipe/tasks/ios/vision/face_stylizer/sources/MPPFaceStylizerOptions.h b/mediapipe/tasks/ios/vision/face_stylizer/sources/MPPFaceStylizerOptions.h new file mode 100644 index 000000000..a62e10d8c --- /dev/null +++ b/mediapipe/tasks/ios/vision/face_stylizer/sources/MPPFaceStylizerOptions.h @@ -0,0 +1,27 @@ +// Copyright 2023 The MediaPipe Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import + +#import "mediapipe/tasks/ios/core/sources/MPPTaskOptions.h" + +NS_ASSUME_NONNULL_BEGIN + +/** Options for setting up a `FaceStylizer`. */ +NS_SWIFT_NAME(FaceStylizerOptions) +@interface MPPFaceStylizerOptions : MPPTaskOptions + +@end + +NS_ASSUME_NONNULL_END diff --git a/mediapipe/tasks/ios/vision/face_stylizer/sources/MPPFaceStylizerOptions.m b/mediapipe/tasks/ios/vision/face_stylizer/sources/MPPFaceStylizerOptions.m new file mode 100644 index 000000000..cf57be6ea --- /dev/null +++ b/mediapipe/tasks/ios/vision/face_stylizer/sources/MPPFaceStylizerOptions.m @@ -0,0 +1,25 @@ +// Copyright 2023 The MediaPipe Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import "mediapipe/tasks/ios/vision/face_stylizer/sources/MPPFaceStylizerOptions.h" + +@implementation MPPFaceStylizerOptions + +- (id)copyWithZone:(NSZone *)zone { + MPPFaceStylizerOptions *faceStylizerOptions = [super copyWithZone:zone]; + + return faceStylizerOptions; +} + +@end