Separated task options protocol
This commit is contained in:
parent
ee230520da
commit
dea0e21aec
|
@ -25,7 +25,6 @@ objc_library(
|
||||||
"-std=c++17",
|
"-std=c++17",
|
||||||
],
|
],
|
||||||
deps = [
|
deps = [
|
||||||
"//mediapipe/framework:calculator_options_cc_proto",
|
|
||||||
":MPPBaseOptions",
|
":MPPBaseOptions",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
@ -74,3 +73,11 @@ objc_library(
|
||||||
srcs = ["sources/MPPBaseOptions.m"],
|
srcs = ["sources/MPPBaseOptions.m"],
|
||||||
hdrs = ["sources/MPPBaseOptions.h"],
|
hdrs = ["sources/MPPBaseOptions.h"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
objc_library(
|
||||||
|
name = "MPPTaskOptionsProtocol",
|
||||||
|
hdrs = ["sources/MPPTaskOptionsProtocol.h"],
|
||||||
|
deps = [
|
||||||
|
"//mediapipe/framework:calculator_options_cc_proto",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
#include "mediapipe/framework/calculator_options.pb.h"
|
|
||||||
#import "mediapipe/tasks/ios/core/sources/MPPBaseOptions.h"
|
#import "mediapipe/tasks/ios/core/sources/MPPBaseOptions.h"
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
@ -43,16 +42,4 @@ NS_SWIFT_NAME(TaskOptions)
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/**
|
|
||||||
* Any mediapipe task options should confirm to this protocol.
|
|
||||||
*/
|
|
||||||
@protocol MPPTaskOptionsProtocol
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies the iOS Mediapipe task options to an object of mediapipe::CalculatorOptions proto.
|
|
||||||
*/
|
|
||||||
- (void)copyToProto:(mediapipe::CalculatorOptions *)optionsProto;
|
|
||||||
|
|
||||||
@end
|
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
29
mediapipe/tasks/ios/core/sources/MPPTaskOptionsProtocol.h
Normal file
29
mediapipe/tasks/ios/core/sources/MPPTaskOptionsProtocol.h
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
|
||||||
|
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 <Foundation/Foundation.h>
|
||||||
|
#include "mediapipe/framework/calculator_options.pb.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Any mediapipe task options should confirm to this protocol.
|
||||||
|
*/
|
||||||
|
@protocol MPPTaskOptionsProtocol
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copies the iOS Mediapipe task options to an object of mediapipe::CalculatorOptions proto.
|
||||||
|
*/
|
||||||
|
- (void)copyToProto:(mediapipe::CalculatorOptions *)optionsProto;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
|
@ -23,8 +23,8 @@ objc_library(
|
||||||
deps = [
|
deps = [
|
||||||
"//mediapipe/tasks/ios/text/text_classifier:MPPTextClassifierOptions",
|
"//mediapipe/tasks/ios/text/text_classifier:MPPTextClassifierOptions",
|
||||||
"//mediapipe/tasks/ios/core/utils:MPPBaseOptionsHelpers",
|
"//mediapipe/tasks/ios/core/utils:MPPBaseOptionsHelpers",
|
||||||
|
"//mediapipe/tasks/ios/core:MPPTaskOptionsProtocol",
|
||||||
"//mediapipe/tasks/ios/components/processors/utils:MPPClassifierOptionsHelpers",
|
"//mediapipe/tasks/ios/components/processors/utils:MPPClassifierOptionsHelpers",
|
||||||
"//mediapipe/tasks/cc/text/text_classifier/proto:text_classifier_graph_options_cc_proto",
|
"//mediapipe/tasks/cc/text/text_classifier/proto:text_classifier_graph_options_cc_proto",
|
||||||
"//mediapipe/framework:calculator_options_cc_proto",
|
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "mediapipe/framework/calculator_options.pb.h"
|
|
||||||
#import "mediapipe/tasks/ios/text/text_classifier/sources/MPPTextClassifierOptions.h"
|
#import "mediapipe/tasks/ios/text/text_classifier/sources/MPPTextClassifierOptions.h"
|
||||||
|
#import "mediapipe/tasks/ios/core/sources/MPPTaskOptionsProtocol.h"
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user