Updated copyright notice
This commit is contained in:
parent
781f7adf26
commit
4a7a3b342b
|
@ -1,30 +1,30 @@
|
||||||
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
|
// Copyright 2022 The MediaPipe 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.
|
||||||
|
|
||||||
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>
|
#import <Foundation/Foundation.h>
|
||||||
#include "mediapipe/tasks/cc/common.h"
|
#include "mediapipe/tasks/cc/common.h"
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/** Error domain of TensorFlow Lite Support related errors. */
|
/** Error domain of Mediapipe Task related errors. */
|
||||||
extern NSString *const MPPTasksErrorDomain;
|
extern NSString *const MPPTasksErrorDomain;
|
||||||
|
|
||||||
/** Helper utility for the all tasks which encapsulates common functionality. */
|
/** Helper utility for the all tasks which encapsulates common functionality. */
|
||||||
@interface MPPCommonUtils : NSObject
|
@interface MPPCommonUtils : NSObject
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and saves an NSError in the Tensorflow Lite Task Library domain, with the given code and
|
* Creates and saves an NSError in the Mediapipe task library domain, with the given code and
|
||||||
* description.
|
* description.
|
||||||
*
|
*
|
||||||
* @param code Error code.
|
* @param code Error code.
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
#include "mediapipe/tasks/cc/common.h"
|
#include "mediapipe/tasks/cc/common.h"
|
||||||
|
|
||||||
/** Error domain of TensorFlow Lite Support related errors. */
|
/** Error domain of MediaPipe task library errors. */
|
||||||
NSString *const MPPTasksErrorDomain = @"org.mediapipe.tasks";
|
NSString *const MPPTasksErrorDomain = @"org.mediapipe.tasks";
|
||||||
|
|
||||||
@implementation MPPCommonUtils
|
@implementation MPPCommonUtils
|
||||||
|
@ -69,11 +69,11 @@ NSString *const MPPTasksErrorDomain = @"org.mediapipe.tasks";
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
// Payload of absl::Status created by the Media Pipe task library stores an appropriate value of
|
// Payload of absl::Status created by the Media Pipe task library stores an appropriate value of
|
||||||
// the enum MPPiteSupportStatus. The integer value corresponding to the MPPiteSupportStatus enum
|
// the enum MediaPipeTasksStatus. The integer value corresponding to the MediaPipeTasksStatus enum
|
||||||
// stored in the payload is extracted here to later map to the appropriate error code to be
|
// stored in the payload is extracted here to later map to the appropriate error code to be
|
||||||
// returned. In cases where the enum is not stored in (payload is NULL or the payload string
|
// returned. In cases where the enum is not stored in (payload is NULL or the payload string
|
||||||
// cannot be converted to an integer), we set the error code value to be 1
|
// cannot be converted to an integer), we set the error code value to be 1
|
||||||
// (MPPSupportErrorCodeUnspecifiedError of MPPSupportErrorCode used in the iOS library to signify
|
// (MPPTasksErrorCodeError of MPPTasksErrorCode used in the iOS library to signify
|
||||||
// any errors not falling into other categories.) Since payload is of type absl::Cord that can be
|
// any errors not falling into other categories.) Since payload is of type absl::Cord that can be
|
||||||
// type cast into an absl::optional<std::string>, we use the std::stoi function to convert it into
|
// type cast into an absl::optional<std::string>, we use the std::stoi function to convert it into
|
||||||
// an integer code if possible.
|
// an integer code if possible.
|
||||||
|
@ -81,7 +81,7 @@ NSString *const MPPTasksErrorDomain = @"org.mediapipe.tasks";
|
||||||
NSUInteger errorCode;
|
NSUInteger errorCode;
|
||||||
try {
|
try {
|
||||||
// Try converting payload to integer if payload is not empty. Otherwise convert a string
|
// Try converting payload to integer if payload is not empty. Otherwise convert a string
|
||||||
// signifying generic error code MPPSupportErrorCodeUnspecifiedError to integer.
|
// signifying generic error code MPPTasksErrorCodeError to integer.
|
||||||
errorCode =
|
errorCode =
|
||||||
(NSUInteger)std::stoi(static_cast<absl::optional<std::string>>(
|
(NSUInteger)std::stoi(static_cast<absl::optional<std::string>>(
|
||||||
status.GetPayload(mediapipe::tasks::kMediaPipeTasksPayload))
|
status.GetPayload(mediapipe::tasks::kMediaPipeTasksPayload))
|
||||||
|
@ -92,12 +92,12 @@ NSString *const MPPTasksErrorDomain = @"org.mediapipe.tasks";
|
||||||
}
|
}
|
||||||
|
|
||||||
// If errorCode is outside the range of enum values possible or is
|
// If errorCode is outside the range of enum values possible or is
|
||||||
// TFLSupportErrorCodeUnspecifiedError, we try to map the absl::Status::code() to assign
|
// MPPTasksErrorCodeError, we try to map the absl::Status::code() to assign
|
||||||
// appropriate TFLSupportErrorCode or TFLSupportErrorCodeUnspecifiedError in default cases. Note:
|
// appropriate MPPTasksErrorCode in default cases. Note:
|
||||||
// The mapping to absl::Status::code() is done to generate a more specific error code than
|
// The mapping to absl::Status::code() is done to generate a more specific error code than
|
||||||
// TFLSupportErrorCodeUnspecifiedError in cases when the payload can't be mapped to
|
// MPPTasksErrorCodeError in cases when the payload can't be mapped to
|
||||||
// TfLiteSupportStatus. This can happen when absl::Status returned by TfLite are in turn returned
|
// MPPTasksErrorCode. This can happen when absl::Status returned by TFLite library are in turn returned
|
||||||
// without moodification by TfLite Support Methods.
|
// without modification by Mediapipe cc library methods.
|
||||||
if (errorCode > MPPTasksErrorCodeLast || errorCode <= MPPTasksErrorCodeFirst) {
|
if (errorCode > MPPTasksErrorCodeLast || errorCode <= MPPTasksErrorCodeFirst) {
|
||||||
switch (status.code()) {
|
switch (status.code()) {
|
||||||
case absl::StatusCode::kInternal:
|
case absl::StatusCode::kInternal:
|
||||||
|
@ -116,11 +116,11 @@ NSString *const MPPTasksErrorDomain = @"org.mediapipe.tasks";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Creates the NSEror with the appropriate error
|
// Creates the NSEror with the appropriate error
|
||||||
// TFLSupportErrorCode and message. TFLSupportErrorCode has a one to one
|
// MPPTasksErrorCode and message. MPPTasksErrorCode has a one to one
|
||||||
// mapping with TfLiteSupportStatus starting from the value 1(TFLSupportErrorCodeUnspecifiedError)
|
// mapping with MediaPipeTasksStatus starting from the value 1(MPPTasksErrorCodeError)
|
||||||
// and hence will be correctly initialized if directly cast from the integer code derived from
|
// and hence will be correctly initialized if directly cast from the integer code derived from
|
||||||
// TfLiteSupportStatus stored in its payload. TFLSupportErrorCode omits kOk = 0 of
|
// MediaPipeTasksStatus stored in its payload. MPPTasksErrorCode omits kOk = 0 of
|
||||||
// TfLiteSupportStatus.
|
// MediaPipeTasksStatusx.
|
||||||
//
|
//
|
||||||
// Stores a string including absl status code and message(if non empty) as the
|
// Stores a string including absl status code and message(if non empty) as the
|
||||||
// error message See
|
// error message See
|
||||||
|
|
|
@ -1,17 +1,16 @@
|
||||||
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
|
// Copyright 2022 The MediaPipe Authors. All Rights Reserved.
|
||||||
|
//
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
Unless required by applicable law or agreed to in writing, software
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
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.
|
||||||
==============================================================================*/
|
|
||||||
|
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
|
// Copyright 2022 The MediaPipe 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.
|
||||||
|
|
||||||
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/common/utils/sources/NSString+Helpers.h"
|
#import "mediapipe/tasks/ios/common/utils/sources/NSString+Helpers.h"
|
||||||
|
|
||||||
@implementation NSString (Helpers)
|
@implementation NSString (Helpers)
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
|
// Copyright 2022 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.
|
||||||
|
|
||||||
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>
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
|
// Copyright 2022 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.
|
||||||
|
|
||||||
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/components/containers/sources/MPPCategory.h"
|
#import "mediapipe/tasks/ios/components/containers/sources/MPPCategory.h"
|
||||||
|
|
||||||
@implementation MPPCategory
|
@implementation MPPCategory
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
|
// Copyright 2022 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.
|
||||||
|
|
||||||
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>
|
#import <Foundation/Foundation.h>
|
||||||
#import "mediapipe/tasks/ios/components/containers/sources/MPPCategory.h"
|
#import "mediapipe/tasks/ios/components/containers/sources/MPPCategory.h"
|
||||||
#import "mediapipe/tasks/ios/core/sources/MPPTaskResult.h"
|
#import "mediapipe/tasks/ios/core/sources/MPPTaskResult.h"
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
|
// Copyright 2022 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.
|
||||||
|
|
||||||
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/components/containers/sources/MPPClassificationResult.h"
|
#import "mediapipe/tasks/ios/components/containers/sources/MPPClassificationResult.h"
|
||||||
|
|
||||||
@implementation MPPClassifications
|
@implementation MPPClassifications
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
|
// Copyright 2022 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.
|
||||||
|
|
||||||
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>
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
|
// Copyright 2022 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.
|
||||||
|
|
||||||
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/components/processors/sources/MPPClassifierOptions.h"
|
#import "mediapipe/tasks/ios/components/processors/sources/MPPClassifierOptions.h"
|
||||||
|
|
||||||
@implementation MPPClassifierOptions
|
@implementation MPPClassifierOptions
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
|
// Copyright 2022 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.
|
||||||
|
|
||||||
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.
|
|
||||||
==============================================================================*/
|
|
||||||
#include "mediapipe/tasks/cc/components/processors/proto/classifier_options.pb.h"
|
#include "mediapipe/tasks/cc/components/processors/proto/classifier_options.pb.h"
|
||||||
#import "mediapipe/tasks/ios/components/processors/sources/MPPClassifierOptions.h"
|
#import "mediapipe/tasks/ios/components/processors/sources/MPPClassifierOptions.h"
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
|
// Copyright 2022 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.
|
||||||
|
|
||||||
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/common/utils/sources/NSString+Helpers.h"
|
#import "mediapipe/tasks/ios/common/utils/sources/NSString+Helpers.h"
|
||||||
#import "mediapipe/tasks/ios/components/processors/utils/sources/MPPClassifierOptions+Helpers.h"
|
#import "mediapipe/tasks/ios/components/processors/utils/sources/MPPClassifierOptions+Helpers.h"
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,17 @@
|
||||||
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
|
// Copyright 2022 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.
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
You may obtain a copy of the License at
|
// you may not use this file except in compliance with the License.
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
// You may obtain a copy of the License at
|
||||||
Unless required by applicable law or agreed to in writing, software
|
//
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
//
|
||||||
See the License for the specific language governing permissions and
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
limitations under the License.
|
// 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>
|
#import <Foundation/Foundation.h>
|
||||||
#include "mediapipe/framework/calculator.pb.h"
|
#include "mediapipe/framework/calculator.pb.h"
|
||||||
#import "mediapipe/tasks/ios/core/sources/MPPTaskOptions.h"
|
#import "mediapipe/tasks/ios/core/sources/MPPTaskOptions.h"
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
|
// Copyright 2022 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.
|
||||||
|
|
||||||
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/core/sources/MPPTaskInfo.h"
|
#import "mediapipe/tasks/ios/core/sources/MPPTaskInfo.h"
|
||||||
#import "mediapipe/tasks/ios/common/sources/MPPCommon.h"
|
#import "mediapipe/tasks/ios/common/sources/MPPCommon.h"
|
||||||
#import "mediapipe/tasks/ios/common/utils/sources/MPPCommonUtils.h"
|
#import "mediapipe/tasks/ios/common/utils/sources/MPPCommonUtils.h"
|
||||||
|
@ -24,9 +24,9 @@
|
||||||
namespace {
|
namespace {
|
||||||
using CalculatorGraphConfig = ::mediapipe::CalculatorGraphConfig;
|
using CalculatorGraphConfig = ::mediapipe::CalculatorGraphConfig;
|
||||||
using Node = ::mediapipe::CalculatorGraphConfig::Node;
|
using Node = ::mediapipe::CalculatorGraphConfig::Node;
|
||||||
using InputStreamInfo = ::mediapipe::InputStreamInfo;
|
using ::mediapipe::InputStreamInfo;
|
||||||
using CalculatorOptions = ::mediapipe::CalculatorOptions;
|
using ::mediapipe::CalculatorOptions;
|
||||||
using FlowLimiterCalculatorOptions = ::mediapipe::FlowLimiterCalculatorOptions;
|
using ::mediapipe::FlowLimiterCalculatorOptions;
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
@implementation MPPTaskInfo
|
@implementation MPPTaskInfo
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
|
// Copyright 2022 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.
|
||||||
|
|
||||||
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>
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
#include "mediapipe/framework/calculator.pb.h"
|
#include "mediapipe/framework/calculator.pb.h"
|
||||||
|
@ -21,15 +21,15 @@
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base class of the user-facing iOS mediapipe text task api classes.
|
* The base class of the user-facing iOS mediapipe task api classes.
|
||||||
*/
|
*/
|
||||||
@interface MPPTaskManager : NSObject
|
@interface MPPTaskManager : NSObject
|
||||||
/**
|
/**
|
||||||
* Initializes a new `MPPBaseTextTaskApi` with the mediapipe text task graph config proto.
|
* Initializes a new `MPPTaskManager` with the mediapipe task graph config proto.
|
||||||
*
|
*
|
||||||
* @param graphConfig A mediapipe text task graph config proto.
|
* @param graphConfig A mediapipe task graph config proto.
|
||||||
*
|
*
|
||||||
* @return An instance of `MPPBaseTextTaskApi` initialized to the given graph config proto.
|
* @return An instance of `MPPTaskManager` initialized to the given graph config proto.
|
||||||
*/
|
*/
|
||||||
- (instancetype)initWithCalculatorGraphConfig:(mediapipe::CalculatorGraphConfig)graphConfig
|
- (instancetype)initWithCalculatorGraphConfig:(mediapipe::CalculatorGraphConfig)graphConfig
|
||||||
error:(NSError **)error;
|
error:(NSError **)error;
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
|
// Copyright 2022 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.
|
||||||
|
|
||||||
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/core/sources/MPPTaskManager.h"
|
#import "mediapipe/tasks/ios/core/sources/MPPTaskManager.h"
|
||||||
#import "mediapipe/tasks/ios/common/utils/sources/MPPCommonUtils.h"
|
#import "mediapipe/tasks/ios/common/utils/sources/MPPCommonUtils.h"
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
|
// Copyright 2022 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.
|
||||||
|
|
||||||
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.
|
|
||||||
==============================================================================*/
|
|
||||||
#include "mediapipe/tasks/cc/core/proto/base_options.pb.h"
|
#include "mediapipe/tasks/cc/core/proto/base_options.pb.h"
|
||||||
#import "mediapipe/tasks/ios/core/sources/MPPBaseOptions.h"
|
#import "mediapipe/tasks/ios/core/sources/MPPBaseOptions.h"
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
|
// Copyright 2022 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.
|
||||||
|
|
||||||
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/core/utils/sources/MPPBaseOptions+Helpers.h"
|
#import "mediapipe/tasks/ios/core/utils/sources/MPPBaseOptions+Helpers.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user