From 84e1c93ffbd6c43c84d229e5235e81159c5e8a25 Mon Sep 17 00:00:00 2001 From: Prianka Liz Kariat Date: Thu, 2 Feb 2023 17:22:56 +0530 Subject: [PATCH 001/107] Added MPPCosineSimilarity --- mediapipe/tasks/ios/components/utils/BUILD | 33 +++++++ .../utils/sources/MPPCosineSimilarity.h | 48 ++++++++++ .../utils/sources/MPPCosineSimilarity.mm | 89 +++++++++++++++++++ 3 files changed, 170 insertions(+) create mode 100644 mediapipe/tasks/ios/components/utils/BUILD create mode 100644 mediapipe/tasks/ios/components/utils/sources/MPPCosineSimilarity.h create mode 100644 mediapipe/tasks/ios/components/utils/sources/MPPCosineSimilarity.mm diff --git a/mediapipe/tasks/ios/components/utils/BUILD b/mediapipe/tasks/ios/components/utils/BUILD new file mode 100644 index 00000000..c9f82d1d --- /dev/null +++ b/mediapipe/tasks/ios/components/utils/BUILD @@ -0,0 +1,33 @@ +# Copyright 2023 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. + +package(default_visibility = ["//mediapipe/tasks:internal"]) + +licenses(["notice"]) + +objc_library( + name = "MPPCosineSimilarity", + srcs = ["sources/MPPCosineSimilarity.mm"], + hdrs = ["sources/MPPCosineSimilarity.h"], + copts = [ + "-ObjC++", + "-std=c++17", + "-x objective-c++", + ], + deps = [ + "//mediapipe/tasks/ios/common:MPPCommon", + "//mediapipe/tasks/ios/common/utils:MPPCommonUtils", + "//mediapipe/tasks/ios/components/containers:MPPEmbedding", + ] +) diff --git a/mediapipe/tasks/ios/components/utils/sources/MPPCosineSimilarity.h b/mediapipe/tasks/ios/components/utils/sources/MPPCosineSimilarity.h new file mode 100644 index 00000000..864baf16 --- /dev/null +++ b/mediapipe/tasks/ios/components/utils/sources/MPPCosineSimilarity.h @@ -0,0 +1,48 @@ +// 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. + +#import + +#import "mediapipe/tasks/ios/components/containers/sources/MPPEmbedding.h" + +NS_ASSUME_NONNULL_BEGIN + +/** Utility class for computing cosine similarity between `MPPEmbedding` objects. */ +NS_SWIFT_NAME(CosineSimilarity) + +@interface MPPCosineSimilarity : NSObject + +- (instancetype)init NS_UNAVAILABLE; + ++ (instancetype)new NS_UNAVAILABLE; + +/** Utility function to compute[cosine similarity](https://en.wikipedia.org/wiki/Cosine_similarity) + * between two `MPPEmbedding` objects. + * + * @param embedding1 One of the two `MPPEmbedding`s between whom cosine similarity is to be + * computed. + * @param embedding2 One of the two `MPPEmbedding`s between whom cosine similarity is to be + * computed. + * @param error An optional error parameter populated when there is an error in calculating cosine + * similarity between two embeddings. + * + * @return An `NSNumber` which holds the cosine similarity of type `double`. + */ ++ (nullable NSNumber *)computeBetweenEmbedding1:(MPPEmbedding *)embedding1 + andEmbedding2:(MPPEmbedding *)embedding2 + error:(NSError **)error; + +@end + +NS_ASSUME_NONNULL_END diff --git a/mediapipe/tasks/ios/components/utils/sources/MPPCosineSimilarity.mm b/mediapipe/tasks/ios/components/utils/sources/MPPCosineSimilarity.mm new file mode 100644 index 00000000..dfbc54e0 --- /dev/null +++ b/mediapipe/tasks/ios/components/utils/sources/MPPCosineSimilarity.mm @@ -0,0 +1,89 @@ +// 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. + +#import "mediapipe/tasks/ios/components/utils/sources/MPPCosineSimilarity.h" + +#import "mediapipe/tasks/ios/common/sources/MPPCommon.h" +#import "mediapipe/tasks/ios/common/utils/sources/MPPCommonUtils.h" + +#include + +@implementation MPPCosineSimilarity + ++ (nullable NSNumber *)computeBetweenVector1:(NSArray *)u + andVector2:(NSArray *)v + isFloat:(BOOL)isFloat + error:(NSError **)error { + if (u.count != v.count) { + [MPPCommonUtils + createCustomError:error + withCode:MPPTasksErrorCodeInvalidArgumentError + description:[NSString stringWithFormat:@"Cannot compute cosine similarity between " + @"embeddings of different sizes (%d vs %d)", + u.count, v.count]]; + return nil; + } + + __block double dotProduct = 0.0; + __block double normU = 0.0; + __block double normV = 0.0; + + [u enumerateObjectsUsingBlock:^(NSNumber *num, NSUInteger idx, BOOL *stop) { + double uVal = 0.0; + double vVal = 0.0; + + if (isFloat) { + uVal = num.floatValue; + vVal = v[idx].floatValue; + } else { + uVal = num.charValue; + vVal = v[idx].charValue; + } + + dotProduct += uVal * vVal; + normU += uVal * uVal; + normV += vVal * vVal; + }]; + + return [NSNumber numberWithDouble:dotProduct / sqrt(normU * normV)]; +} + ++ (nullable NSNumber *)computeBetweenEmbedding1:(MPPEmbedding *)embedding1 + andEmbedding2:(MPPEmbedding *)embedding2 + error:(NSError **)error { + BOOL isFloat; + + if (embedding1.floatEmbedding && embedding2.floatEmbedding) { + return [MPPCosineSimilarity computeBetweenVector1:embedding1.floatEmbedding + andVector2:embedding2.floatEmbedding + isFloat:YES + error:error]; + } + + if (embedding1.quantizedEmbedding && embedding2.quantizedEmbedding) { + return [MPPCosineSimilarity computeBetweenVector1:embedding1.quantizedEmbedding + andVector2:embedding2.quantizedEmbedding + isFloat:NO + error:error]; + } + + [MPPCommonUtils + createCustomError:error + withCode:MPPTasksErrorCodeInvalidArgumentError + description: + @"Cannot compute cosine similarity between quantized and float embeddings."]; + return nil; +} + +@end From 867520af1c0c56d3a02987e110a733f6aaeca263 Mon Sep 17 00:00:00 2001 From: Prianka Liz Kariat Date: Thu, 2 Feb 2023 17:29:51 +0530 Subject: [PATCH 002/107] Added cosine similarity to MPPTextEmbedder --- mediapipe/tasks/ios/text/text_embedder/BUILD | 1 + .../text_embedder/sources/MPPTextEmbedder.h | 21 +++++++++++++++++-- .../text_embedder/sources/MPPTextEmbedder.mm | 9 ++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/mediapipe/tasks/ios/text/text_embedder/BUILD b/mediapipe/tasks/ios/text/text_embedder/BUILD index 21226b01..b02b1a9b 100644 --- a/mediapipe/tasks/ios/text/text_embedder/BUILD +++ b/mediapipe/tasks/ios/text/text_embedder/BUILD @@ -49,6 +49,7 @@ objc_library( "//mediapipe/tasks/cc/text/text_embedder:text_embedder_graph", "//mediapipe/tasks/ios/common/utils:MPPCommonUtils", "//mediapipe/tasks/ios/common/utils:NSStringHelpers", + "//mediapipe/tasks/ios/components/utils:MPPCosineSimilarity", "//mediapipe/tasks/ios/core:MPPTaskInfo", "//mediapipe/tasks/ios/core:MPPTaskOptions", "//mediapipe/tasks/ios/core:MPPTextPacketCreator", diff --git a/mediapipe/tasks/ios/text/text_embedder/sources/MPPTextEmbedder.h b/mediapipe/tasks/ios/text/text_embedder/sources/MPPTextEmbedder.h index a45ab674..ba5958a7 100644 --- a/mediapipe/tasks/ios/text/text_embedder/sources/MPPTextEmbedder.h +++ b/mediapipe/tasks/ios/text/text_embedder/sources/MPPTextEmbedder.h @@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN * Metadata is required for models with int32 input tensors because it contains the input process * unit for the model's Tokenizer. No metadata is required for models with string input tensors. * - * Input tensors + * Input tensors: * - Three input tensors `kTfLiteInt32` of shape `[batch_size x bert_max_seq_len]` * representing the input ids, mask ids, and segment ids. This input signature requires * a Bert Tokenizer process unit in the model metadata. @@ -62,7 +62,7 @@ NS_SWIFT_NAME(TextEmbedder) * Creates a new instance of `MPPTextEmbedder` from the given `MPPTextEmbedderOptions`. * * @param options The options of type `MPPTextEmbedderOptions` to use for configuring the - * `MPPTextEmbedder. + * `MPPTextEmbedder`. * @param error An optional error parameter populated when there is an error in initializing the * text embedder. * @@ -86,6 +86,23 @@ NS_SWIFT_NAME(TextEmbedder) - (instancetype)init NS_UNAVAILABLE; +/** Utility function to compute[cosine similarity](https://en.wikipedia.org/wiki/Cosine_similarity) + * between two `MPPEmbedding` objects. + * + * @param embedding1 One of the two `MPPEmbedding`s between whom cosine similarity is to be + * computed. + * @param embedding2 One of the two `MPPEmbedding`s between whom cosine similarity is to be + * computed. + * @param error An optional error parameter populated when there is an error in calculating cosine + * similarity between two embeddings. + * + * @return An `NSNumber` which holds the cosine similarity of type `double`. + */ ++ (nullable NSNumber *)cosineSimilarityBetweenEmbedding1:(MPPEmbedding *)embedding1 + andEmbedding2:(MPPEmbedding *)embedding2 + error:(NSError **)error + NS_SWIFT_NAME(cosineSimilarity(embedding1: embedding2:)); + + (instancetype)new NS_UNAVAILABLE; @end diff --git a/mediapipe/tasks/ios/text/text_embedder/sources/MPPTextEmbedder.mm b/mediapipe/tasks/ios/text/text_embedder/sources/MPPTextEmbedder.mm index a9c811cd..62eb882d 100644 --- a/mediapipe/tasks/ios/text/text_embedder/sources/MPPTextEmbedder.mm +++ b/mediapipe/tasks/ios/text/text_embedder/sources/MPPTextEmbedder.mm @@ -16,6 +16,7 @@ #import "mediapipe/tasks/ios/common/utils/sources/MPPCommonUtils.h" #import "mediapipe/tasks/ios/common/utils/sources/NSString+Helpers.h" +#import "mediapipe/tasks/ios/components/utils/sources/MPPCosineSimilarity.h" #import "mediapipe/tasks/ios/core/sources/MPPTaskInfo.h" #import "mediapipe/tasks/ios/core/sources/MPPTextPacketCreator.h" #import "mediapipe/tasks/ios/text/core/sources/MPPTextTaskRunner.h" @@ -93,4 +94,12 @@ static NSString *const kTaskGraphName = @"mediapipe.tasks.text.text_embedder.Tex .value()[kEmbeddingsOutStreamName.cppString]]; } ++ (nullable NSNumber *)cosineSimilarityBetweenEmbedding1:(MPPEmbedding *)embedding1 + andEmbedding2:(MPPEmbedding *)embedding2 + error:(NSError **)error { + return [MPPCosineSimilarity computeBetweenEmbedding1:embedding1 + andEmbedding2:embedding2 + error:error]; +} + @end From 474e994a5f95e8190ab1be93c20eec493a81edbe Mon Sep 17 00:00:00 2001 From: Prianka Liz Kariat Date: Thu, 2 Feb 2023 17:30:05 +0530 Subject: [PATCH 003/107] Added text embedder objective c tests --- .../tasks/ios/test/text/text_embedder/BUILD | 55 +++++++ .../text/text_embedder/MPPTextEmbedderTests.m | 142 ++++++++++++++++++ 2 files changed, 197 insertions(+) create mode 100644 mediapipe/tasks/ios/test/text/text_embedder/BUILD create mode 100644 mediapipe/tasks/ios/test/text/text_embedder/MPPTextEmbedderTests.m diff --git a/mediapipe/tasks/ios/test/text/text_embedder/BUILD b/mediapipe/tasks/ios/test/text/text_embedder/BUILD new file mode 100644 index 00000000..04359cf9 --- /dev/null +++ b/mediapipe/tasks/ios/test/text/text_embedder/BUILD @@ -0,0 +1,55 @@ +load( + "@build_bazel_rules_apple//apple:ios.bzl", + "ios_unit_test", +) +load( + "@build_bazel_rules_swift//swift:swift.bzl", + "swift_library", +) +load( + "//mediapipe/tasks:ios/ios.bzl", + "MPP_TASK_MINIMUM_OS_VERSION", +) +load( + "@org_tensorflow//tensorflow/lite:special_rules.bzl", + "tflite_ios_lab_runner", +) + +package(default_visibility = ["//mediapipe/tasks:internal"]) + +licenses(["notice"]) + +# Default tags for filtering iOS targets. Targets are restricted to Apple platforms. +TFL_DEFAULT_TAGS = [ + "apple", +] + +# Following sanitizer tests are not supported by iOS test targets. +TFL_DISABLED_SANITIZER_TAGS = [ + "noasan", + "nomsan", + "notsan", +] + +objc_library( + name = "MPPTextEmbedderObjcTestLibrary", + testonly = 1, + srcs = ["MPPTextEmbedderTests.m"], + data = [ + "//mediapipe/tasks/testdata/text:mobilebert_embedding_model", + "//mediapipe/tasks/testdata/text:regex_embedding_with_metadata", + ], + deps = [ + "//mediapipe/tasks/ios/common:MPPCommon", + "//mediapipe/tasks/ios/text/text_embedder:MPPTextEmbedder", + ], +) + +ios_unit_test( + name = "MPPTextEmbedderObjcTest", + minimum_os_version = MPP_TASK_MINIMUM_OS_VERSION, + runner = tflite_ios_lab_runner("IOS_LATEST"), + deps = [ + ":MPPTextEmbedderObjcTestLibrary", + ], +) diff --git a/mediapipe/tasks/ios/test/text/text_embedder/MPPTextEmbedderTests.m b/mediapipe/tasks/ios/test/text/text_embedder/MPPTextEmbedderTests.m new file mode 100644 index 00000000..c58c5229 --- /dev/null +++ b/mediapipe/tasks/ios/test/text/text_embedder/MPPTextEmbedderTests.m @@ -0,0 +1,142 @@ +// 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/common/sources/MPPCommon.h" +#import "mediapipe/tasks/ios/text/text_embedder/sources/MPPTextEmbedder.h" + +static NSString *const kBertTextEmbedderModelName = @"mobilebert_embedding_with_metadata"; +static NSString *const kRegexTextEmbedderModelName = @"regex_one_embedding_with_metadata"; +static NSString *const kText1 = @"it's a charming and often affecting journey"; +static NSString *const kText2 = @"what a great and fantastic trip"; +static NSString *const kExpectedErrorDomain = @"com.google.mediapipe.tasks"; +static const float kFloatDiffTolerance = 1e-4; +static const float kDoubleDiffTolerance = 1e-4; + +#define AssertEqualErrors(error, expectedError) \ + XCTAssertNotNil(error); \ + XCTAssertEqualObjects(error.domain, expectedError.domain); \ + XCTAssertEqual(error.code, expectedError.code); \ + XCTAssertNotEqual( \ + [error.localizedDescription rangeOfString:expectedError.localizedDescription].location, \ + NSNotFound) + +#define AssertTextEmbedderResultHasOneEmbedding(textEmbedderResult) \ + XCTAssertNotNil(textEmbedderResult); \ + XCTAssertNotNil(textEmbedderResult.embeddingResult); \ + XCTAssertEqual(textEmbedderResult.embeddingResult.embeddings.count, 1); + +#define AssertEmbeddingIsFloat(embedding) \ + XCTAssertNotNil(embedding.floatEmbedding); \ + XCTAssertNil(embedding.quantizedEmbedding); + +#define AssertFloatEmbeddingHasExpectedValues(floatEmbedding, expectedLength, expectedFirstValue) \ + XCTAssertEqual(floatEmbedding.count, expectedLength); \ + XCTAssertEqualWithAccuracy(floatEmbedding[0].floatValue, expectedFirstValue, kFloatDiffTolerance); + +@interface MPPTextEmbedderTests : XCTestCase +@end + +@implementation MPPTextEmbedderTests + +- (NSString *)filePathWithName:(NSString *)fileName extension:(NSString *)extension { + NSString *filePath = [[NSBundle bundleForClass:self.class] pathForResource:fileName + ofType:extension]; + return filePath; +} + +- (MPPTextEmbedder *)textEmbedderFromModelFileWithName:(NSString *)modelName { + NSString *modelPath = [self filePathWithName:modelName extension:@"tflite"]; + + NSError *error = nil; + MPPTextEmbedder *textEmbedder = [[MPPTextEmbedder alloc] initWithModelPath:modelPath + error:&error]; + + XCTAssertNotNil(textEmbedder); + + return textEmbedder; +} + +- (NSArray *)assertFloatEmbeddingResultsOfEmbedText:(NSString *)text + usingTextEmbedder:(MPPTextEmbedder *)textEmbedder + hasCount:(NSUInteger)embeddingCount + firstValue:(float)firstValue { + MPPTextEmbedderResult *embedderResult = [textEmbedder embedText:text error:nil]; + AssertTextEmbedderResultHasOneEmbedding(embedderResult); + AssertEmbeddingIsFloat(embedderResult.embeddingResult.embeddings[0]); + AssertFloatEmbeddingHasExpectedValues(embedderResult.embeddingResult.embeddings[0].floatEmbedding, + embeddingCount, firstValue); + return embedderResult.embeddingResult.embeddings[0]; +} + +- (void)testCreateTextEmbedderFailsWithMissingModelPath { + NSString *modelPath = [self filePathWithName:@"" extension:@""]; + + NSError *error = nil; + MPPTextEmbedder *textEmbedder = [[MPPTextEmbedder alloc] initWithModelPath:modelPath + error:&error]; + XCTAssertNil(textEmbedder); + + NSError *expectedError = [NSError + errorWithDomain:kExpectedErrorDomain + code:MPPTasksErrorCodeInvalidArgumentError + userInfo:@{ + NSLocalizedDescriptionKey : + @"INVALID_ARGUMENT: ExternalFile must specify at least one of 'file_content', " + @"'file_name', 'file_pointer_meta' or 'file_descriptor_meta'." + }]; + AssertEqualErrors(error, expectedError); +} + +- (void)testEmbedWithBertSucceeds { + MPPTextEmbedder *textEmbedder = + [self textEmbedderFromModelFileWithName:kBertTextEmbedderModelName]; + + MPPEmbedding *embedding1 = [self assertFloatEmbeddingResultsOfEmbedText:kText1 + usingTextEmbedder:textEmbedder + hasCount:512 + firstValue:20.057026f]; + + MPPEmbedding *embedding2 = [self assertFloatEmbeddingResultsOfEmbedText:kText2 + usingTextEmbedder:textEmbedder + hasCount:512 + firstValue:21.254150f]; + NSNumber *cosineSimilarity = [MPPTextEmbedder cosineSimilarityBetweenEmbedding1:embedding1 + andEmbedding2:embedding2 + error:nil]; + XCTAssertEqualWithAccuracy(cosineSimilarity.doubleValue, 0.96386, kDoubleDiffTolerance); +} + +- (void)testEmbedWithRegexSucceeds { + MPPTextEmbedder *textEmbedder = + [self textEmbedderFromModelFileWithName:kRegexTextEmbedderModelName]; + + MPPEmbedding *embedding1 = [self assertFloatEmbeddingResultsOfEmbedText:kText1 + usingTextEmbedder:textEmbedder + hasCount:16 + firstValue:0.030935612f]; + + MPPEmbedding *embedding2 = [self assertFloatEmbeddingResultsOfEmbedText:kText2 + usingTextEmbedder:textEmbedder + hasCount:16 + firstValue:0.0312863f]; + + NSNumber *cosineSimilarity = [MPPTextEmbedder cosineSimilarityBetweenEmbedding1:embedding1 + andEmbedding2:embedding2 + error:nil]; + XCTAssertEqualWithAccuracy(cosineSimilarity.doubleValue, 0.999937f, kDoubleDiffTolerance); +} + +@end From d6259189954f86869e3f666e750e2f18c2d7e818 Mon Sep 17 00:00:00 2001 From: Prianka Liz Kariat Date: Thu, 2 Feb 2023 18:36:55 +0530 Subject: [PATCH 004/107] Added swift tests for text embedder --- .../tasks/ios/test/text/text_embedder/BUILD | 25 ++++ .../text_embedder/TextEmbedderTests.swift | 114 ++++++++++++++++++ .../text_embedder/sources/MPPTextEmbedder.h | 4 +- 3 files changed, 141 insertions(+), 2 deletions(-) create mode 100644 mediapipe/tasks/ios/test/text/text_embedder/TextEmbedderTests.swift diff --git a/mediapipe/tasks/ios/test/text/text_embedder/BUILD b/mediapipe/tasks/ios/test/text/text_embedder/BUILD index 04359cf9..d4b0ac6d 100644 --- a/mediapipe/tasks/ios/test/text/text_embedder/BUILD +++ b/mediapipe/tasks/ios/test/text/text_embedder/BUILD @@ -53,3 +53,28 @@ ios_unit_test( ":MPPTextEmbedderObjcTestLibrary", ], ) + +swift_library( + name = "MPPTextEmbedderSwiftTestLibrary", + testonly = 1, + srcs = ["TextEmbedderTests.swift"], + data = [ + "//mediapipe/tasks/testdata/text:mobilebert_embedding_model", + "//mediapipe/tasks/testdata/text:regex_embedding_with_metadata", + ], + tags = TFL_DEFAULT_TAGS, + deps = [ + "//mediapipe/tasks/ios/common:MPPCommon", + "//mediapipe/tasks/ios/text/text_embedder:MPPTextEmbedder", + ], +) + +ios_unit_test( + name = "MPPTextEmbedderSwiftTest", + minimum_os_version = MPP_TASK_MINIMUM_OS_VERSION, + runner = tflite_ios_lab_runner("IOS_LATEST"), + tags = TFL_DEFAULT_TAGS + TFL_DISABLED_SANITIZER_TAGS, + deps = [ + ":MPPTextEmbedderSwiftTestLibrary", + ], +) diff --git a/mediapipe/tasks/ios/test/text/text_embedder/TextEmbedderTests.swift b/mediapipe/tasks/ios/test/text/text_embedder/TextEmbedderTests.swift new file mode 100644 index 00000000..bd7f6d5d --- /dev/null +++ b/mediapipe/tasks/ios/test/text/text_embedder/TextEmbedderTests.swift @@ -0,0 +1,114 @@ +// 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 MPPCommon +import XCTest + +@testable import MPPTextEmbedder + +class TextEmbedderTests: XCTestCase { + + static let bundle = Bundle(for: TextEmbedderTests.self) + + static let bertModelPath = bundle.path( + forResource: "mobilebert_embedding_with_metadata", + ofType: "tflite") + + static let text1 = "it's a charming and often affecting journey" + + static let text2 = "what a great and fantastic trip" + + static let floatDiffTolerance: Float = 1e-4 + + static let doubleDiffTolerance: Double = 1e-4 + + func assertEqualErrorDescriptions( + _ error: Error, expectedLocalizedDescription: String + ) { + XCTAssertEqual( + error.localizedDescription, + expectedLocalizedDescription) + } + + func assertTextEmbedderResultHasOneEmbedding( + _ textEmbedderResult: TextEmbedderResult + ) { + XCTAssertEqual(textEmbedderResult.embeddingResult.embeddings.count, 1) + } + + func assertEmbeddingIsFloat( + _ embedding: Embedding + ) { + XCTAssertNil(embedding.quantizedEmbedding) + XCTAssertNotNil(embedding.floatEmbedding) + } + + func assertEmbedding( + _ floatEmbedding: [NSNumber], + hasCount embeddingCount: Int, + hasFirstValue firstValue: Float + ) { + XCTAssertEqual(floatEmbedding.count, embeddingCount); + XCTAssertEqual( + floatEmbedding[0].floatValue, + firstValue, accuracy: + TextEmbedderTests.floatDiffTolerance); + } + + func assertFloatEmbeddingResultsForEmbed( + text: String, + using textEmbedder: TextEmbedder, + hasCount embeddingCount: Int, + hasFirstValue firstValue: Float + ) throws -> Embedding { + let textEmbedderResult = + try XCTUnwrap( + textEmbedder.embed(text: text)) + assertTextEmbedderResultHasOneEmbedding(textEmbedderResult) + assertEmbeddingIsFloat(textEmbedderResult.embeddingResult.embeddings[0]) + assertEmbedding( + textEmbedderResult.embeddingResult.embeddings[0].floatEmbedding!, + hasCount: embeddingCount, + hasFirstValue: firstValue) + + return textEmbedderResult.embeddingResult.embeddings[0] + } + + func testEmbedWithBertSucceeds() throws { + + let modelPath = try XCTUnwrap(TextEmbedderTests.bertModelPath) + let textEmbedder = try XCTUnwrap(TextEmbedder(modelPath: modelPath)) + + let embedding1 = try assertFloatEmbeddingResultsForEmbed( + text: TextEmbedderTests.text1, + using: textEmbedder, + hasCount: 512, + hasFirstValue: 20.057026) + + let embedding2 = try assertFloatEmbeddingResultsForEmbed( + text: TextEmbedderTests.text2, + using: textEmbedder, + hasCount: 512, + hasFirstValue: 21.254150) + + let cosineSimilarity = try XCTUnwrap(TextEmbedder.cosineSimilarity( + embedding1: embedding1, + embedding2: embedding2)) + + XCTAssertEqual( + cosineSimilarity.doubleValue, + 0.96386, + accuracy: TextEmbedderTests.doubleDiffTolerance) + } +} diff --git a/mediapipe/tasks/ios/text/text_embedder/sources/MPPTextEmbedder.h b/mediapipe/tasks/ios/text/text_embedder/sources/MPPTextEmbedder.h index ba5958a7..3eecd686 100644 --- a/mediapipe/tasks/ios/text/text_embedder/sources/MPPTextEmbedder.h +++ b/mediapipe/tasks/ios/text/text_embedder/sources/MPPTextEmbedder.h @@ -100,8 +100,8 @@ NS_SWIFT_NAME(TextEmbedder) */ + (nullable NSNumber *)cosineSimilarityBetweenEmbedding1:(MPPEmbedding *)embedding1 andEmbedding2:(MPPEmbedding *)embedding2 - error:(NSError **)error - NS_SWIFT_NAME(cosineSimilarity(embedding1: embedding2:)); + error:(NSError **)error NS_SWIFT_NAME(cosineSimilarity(embedding1:embedding2:)); + // NS_SWIFT_NAME(cosineSimilarity(embedding1: embedding2:)); + (instancetype)new NS_UNAVAILABLE; From 20002f191a78378ee0711efdf419558110ea0724 Mon Sep 17 00:00:00 2001 From: Prianka Liz Kariat Date: Thu, 2 Feb 2023 18:38:19 +0530 Subject: [PATCH 005/107] Changed documentation --- .../tasks/ios/components/utils/sources/MPPCosineSimilarity.h | 2 +- .../tasks/ios/components/utils/sources/MPPCosineSimilarity.mm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mediapipe/tasks/ios/components/utils/sources/MPPCosineSimilarity.h b/mediapipe/tasks/ios/components/utils/sources/MPPCosineSimilarity.h index 864baf16..9e47960c 100644 --- a/mediapipe/tasks/ios/components/utils/sources/MPPCosineSimilarity.h +++ b/mediapipe/tasks/ios/components/utils/sources/MPPCosineSimilarity.h @@ -1,4 +1,4 @@ -// Copyright 2022 The MediaPipe Authors. All Rights Reserved. +// Copyright 2023 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. diff --git a/mediapipe/tasks/ios/components/utils/sources/MPPCosineSimilarity.mm b/mediapipe/tasks/ios/components/utils/sources/MPPCosineSimilarity.mm index dfbc54e0..bc90ce95 100644 --- a/mediapipe/tasks/ios/components/utils/sources/MPPCosineSimilarity.mm +++ b/mediapipe/tasks/ios/components/utils/sources/MPPCosineSimilarity.mm @@ -1,4 +1,4 @@ -// Copyright 2022 The MediaPipe Authors. All Rights Reserved. +// Copyright 2023 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. From 6ca1efdd55415e330f1d6b4f3303a0494814caee Mon Sep 17 00:00:00 2001 From: Prianka Liz Kariat Date: Fri, 3 Feb 2023 12:48:06 +0530 Subject: [PATCH 006/107] Updated MPPTextEmbedder Documentation --- .../tasks/ios/text/text_embedder/sources/MPPTextEmbedder.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mediapipe/tasks/ios/text/text_embedder/sources/MPPTextEmbedder.h b/mediapipe/tasks/ios/text/text_embedder/sources/MPPTextEmbedder.h index 3eecd686..61a7dd4d 100644 --- a/mediapipe/tasks/ios/text/text_embedder/sources/MPPTextEmbedder.h +++ b/mediapipe/tasks/ios/text/text_embedder/sources/MPPTextEmbedder.h @@ -86,7 +86,8 @@ NS_SWIFT_NAME(TextEmbedder) - (instancetype)init NS_UNAVAILABLE; -/** Utility function to compute[cosine similarity](https://en.wikipedia.org/wiki/Cosine_similarity) +/** + * Utility function to compute[cosine similarity](https://en.wikipedia.org/wiki/Cosine_similarity) * between two `MPPEmbedding` objects. * * @param embedding1 One of the two `MPPEmbedding`s between whom cosine similarity is to be From a512e6b5f511bc56653543a2a03bb2515dbf92cf Mon Sep 17 00:00:00 2001 From: Prianka Liz Kariat Date: Fri, 3 Feb 2023 12:49:00 +0530 Subject: [PATCH 007/107] Updated MPPTextEmbedder Documentation --- mediapipe/tasks/ios/text/text_embedder/sources/MPPTextEmbedder.h | 1 - 1 file changed, 1 deletion(-) diff --git a/mediapipe/tasks/ios/text/text_embedder/sources/MPPTextEmbedder.h b/mediapipe/tasks/ios/text/text_embedder/sources/MPPTextEmbedder.h index 61a7dd4d..f60e88ba 100644 --- a/mediapipe/tasks/ios/text/text_embedder/sources/MPPTextEmbedder.h +++ b/mediapipe/tasks/ios/text/text_embedder/sources/MPPTextEmbedder.h @@ -102,7 +102,6 @@ NS_SWIFT_NAME(TextEmbedder) + (nullable NSNumber *)cosineSimilarityBetweenEmbedding1:(MPPEmbedding *)embedding1 andEmbedding2:(MPPEmbedding *)embedding2 error:(NSError **)error NS_SWIFT_NAME(cosineSimilarity(embedding1:embedding2:)); - // NS_SWIFT_NAME(cosineSimilarity(embedding1: embedding2:)); + (instancetype)new NS_UNAVAILABLE; From b5b10e7681a80bd1ee1860e8adad667c80c15b0f Mon Sep 17 00:00:00 2001 From: Prianka Liz Kariat Date: Fri, 3 Feb 2023 13:10:13 +0530 Subject: [PATCH 008/107] Added iOS test for different themes in text embedder --- .../text/text_embedder/MPPTextEmbedderTests.m | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/mediapipe/tasks/ios/test/text/text_embedder/MPPTextEmbedderTests.m b/mediapipe/tasks/ios/test/text/text_embedder/MPPTextEmbedderTests.m index c58c5229..36e0ef8c 100644 --- a/mediapipe/tasks/ios/test/text/text_embedder/MPPTextEmbedderTests.m +++ b/mediapipe/tasks/ios/test/text/text_embedder/MPPTextEmbedderTests.m @@ -139,4 +139,31 @@ static const float kDoubleDiffTolerance = 1e-4; XCTAssertEqualWithAccuracy(cosineSimilarity.doubleValue, 0.999937f, kDoubleDiffTolerance); } +- (void)testEmbedWithBertAndDifferentThemesSucceeds { + MPPTextEmbedder *textEmbedder = + [self textEmbedderFromModelFileWithName:kBertTextEmbedderModelName]; + + MPPEmbedding *embedding1 = + [self assertFloatEmbeddingResultsOfEmbedText: + @"When you go to this restaurant, they hold the pancake upside-down before they " + @"hand it to you. It's a great gimmick." + usingTextEmbedder:textEmbedder + hasCount:512 + firstValue:42.0832]; + + MPPEmbedding *embedding2 = + [self assertFloatEmbeddingResultsOfEmbedText: + @"Let's make a plan to steal the declaration of independence." + usingTextEmbedder:textEmbedder + hasCount:512 + firstValue:50.8856]; + + NSNumber *cosineSimilarity = [MPPTextEmbedder cosineSimilarityBetweenEmbedding1:embedding1 + andEmbedding2:embedding2 + error:nil]; + + // TODO: The similarity should likely be lower + XCTAssertEqualWithAccuracy(cosineSimilarity.doubleValue, 0.963203f, kDoubleDiffTolerance); +} + @end From 3b55fb9f6a86d7dfbf9c2119543f2addc00a751f Mon Sep 17 00:00:00 2001 From: Prianka Liz Kariat Date: Fri, 3 Feb 2023 13:42:32 +0530 Subject: [PATCH 009/107] Added iOS test for quantized embedding --- .../text/text_embedder/MPPTextEmbedderTests.m | 103 +++++++++++++++--- 1 file changed, 89 insertions(+), 14 deletions(-) diff --git a/mediapipe/tasks/ios/test/text/text_embedder/MPPTextEmbedderTests.m b/mediapipe/tasks/ios/test/text/text_embedder/MPPTextEmbedderTests.m index 36e0ef8c..0468c9b8 100644 --- a/mediapipe/tasks/ios/test/text/text_embedder/MPPTextEmbedderTests.m +++ b/mediapipe/tasks/ios/test/text/text_embedder/MPPTextEmbedderTests.m @@ -23,7 +23,7 @@ static NSString *const kText1 = @"it's a charming and often affecting journey"; static NSString *const kText2 = @"what a great and fantastic trip"; static NSString *const kExpectedErrorDomain = @"com.google.mediapipe.tasks"; static const float kFloatDiffTolerance = 1e-4; -static const float kDoubleDiffTolerance = 1e-4; +static const float kSimilarityDiffTolerance = 1e-4; #define AssertEqualErrors(error, expectedError) \ XCTAssertNotNil(error); \ @@ -38,13 +38,24 @@ static const float kDoubleDiffTolerance = 1e-4; XCTAssertNotNil(textEmbedderResult.embeddingResult); \ XCTAssertEqual(textEmbedderResult.embeddingResult.embeddings.count, 1); -#define AssertEmbeddingIsFloat(embedding) \ - XCTAssertNotNil(embedding.floatEmbedding); \ - XCTAssertNil(embedding.quantizedEmbedding); +#define AssertEmbeddingType(embedding, quantized) \ + if (quantized) { \ + XCTAssertNil(embedding.floatEmbedding); \ + XCTAssertNotNil(embedding.quantizedEmbedding); \ + } \ + else { \ + XCTAssertNotNil(embedding.floatEmbedding); \ + XCTAssertNil(embedding.quantizedEmbedding);\ + } -#define AssertFloatEmbeddingHasExpectedValues(floatEmbedding, expectedLength, expectedFirstValue) \ - XCTAssertEqual(floatEmbedding.count, expectedLength); \ - XCTAssertEqualWithAccuracy(floatEmbedding[0].floatValue, expectedFirstValue, kFloatDiffTolerance); +#define AssertEmbeddingHasExpectedValues(embedding, expectedLength, expectedFirstValue, quantize) \ + XCTAssertEqual(embedding.count, expectedLength); \ + if (quantize) { \ + XCTAssertEqual(embedding[0].charValue, expectedFirstValue); \ + } \ + else { \ + XCTAssertEqualWithAccuracy(embedding[0].floatValue, expectedFirstValue, kFloatDiffTolerance); \ + } \ @interface MPPTextEmbedderTests : XCTestCase @end @@ -69,15 +80,55 @@ static const float kDoubleDiffTolerance = 1e-4; return textEmbedder; } +- (MPPTextEmbedderOptions *)textEmbedderOptionsWithModelName:(NSString *)modelName { + NSString *modelPath = [self filePathWithName:modelName extension:@"tflite"]; + MPPTextEmbedderOptions *textEmbedderOptions = [[MPPTextEmbedderOptions alloc] init]; + textEmbedderOptions.baseOptions.modelAssetPath = modelPath; + + return textEmbedderOptions; +} + - (NSArray *)assertFloatEmbeddingResultsOfEmbedText:(NSString *)text usingTextEmbedder:(MPPTextEmbedder *)textEmbedder hasCount:(NSUInteger)embeddingCount firstValue:(float)firstValue { MPPTextEmbedderResult *embedderResult = [textEmbedder embedText:text error:nil]; AssertTextEmbedderResultHasOneEmbedding(embedderResult); - AssertEmbeddingIsFloat(embedderResult.embeddingResult.embeddings[0]); - AssertFloatEmbeddingHasExpectedValues(embedderResult.embeddingResult.embeddings[0].floatEmbedding, - embeddingCount, firstValue); + + AssertEmbeddingType( + embedderResult.embeddingResult.embeddings[0], // embedding + NO // quantized + ); + + AssertEmbeddingHasExpectedValues( + embedderResult.embeddingResult.embeddings[0].floatEmbedding, // embedding + embeddingCount, // expectedLength + firstValue, // expectedFirstValue + NO // quantize + ); + + return embedderResult.embeddingResult.embeddings[0]; +} + +- (NSArray*)assertQuantizedEmbeddingResultsOfEmbedText:(NSString *)text + usingTextEmbedder:(MPPTextEmbedder *)textEmbedder + hasCount:(NSUInteger)embeddingCount + firstValue:(char)firstValue { + MPPTextEmbedderResult *embedderResult = [textEmbedder embedText:text error:nil]; + AssertTextEmbedderResultHasOneEmbedding(embedderResult); + + AssertEmbeddingType( + embedderResult.embeddingResult.embeddings[0], // embedding + YES // quantized + ); + + AssertEmbeddingHasExpectedValues( + embedderResult.embeddingResult.embeddings[0].quantizedEmbedding, // embedding + embeddingCount, // expectedLength + firstValue, // expectedFirstValue + YES // quantize + ); + return embedderResult.embeddingResult.embeddings[0]; } @@ -97,7 +148,10 @@ static const float kDoubleDiffTolerance = 1e-4; @"INVALID_ARGUMENT: ExternalFile must specify at least one of 'file_content', " @"'file_name', 'file_pointer_meta' or 'file_descriptor_meta'." }]; - AssertEqualErrors(error, expectedError); + AssertEqualErrors( + error, // error + expectedError // expectedError + ); } - (void)testEmbedWithBertSucceeds { @@ -116,7 +170,7 @@ static const float kDoubleDiffTolerance = 1e-4; NSNumber *cosineSimilarity = [MPPTextEmbedder cosineSimilarityBetweenEmbedding1:embedding1 andEmbedding2:embedding2 error:nil]; - XCTAssertEqualWithAccuracy(cosineSimilarity.doubleValue, 0.96386, kDoubleDiffTolerance); + XCTAssertEqualWithAccuracy(cosineSimilarity.doubleValue, 0.96386, kSimilarityDiffTolerance); } - (void)testEmbedWithRegexSucceeds { @@ -136,7 +190,7 @@ static const float kDoubleDiffTolerance = 1e-4; NSNumber *cosineSimilarity = [MPPTextEmbedder cosineSimilarityBetweenEmbedding1:embedding1 andEmbedding2:embedding2 error:nil]; - XCTAssertEqualWithAccuracy(cosineSimilarity.doubleValue, 0.999937f, kDoubleDiffTolerance); + XCTAssertEqualWithAccuracy(cosineSimilarity.doubleValue, 0.999937f, kSimilarityDiffTolerance); } - (void)testEmbedWithBertAndDifferentThemesSucceeds { @@ -163,7 +217,28 @@ static const float kDoubleDiffTolerance = 1e-4; error:nil]; // TODO: The similarity should likely be lower - XCTAssertEqualWithAccuracy(cosineSimilarity.doubleValue, 0.963203f, kDoubleDiffTolerance); + XCTAssertEqualWithAccuracy(cosineSimilarity.doubleValue, 0.963203f, kSimilarityDiffTolerance); +} + +- (void)testEmbedWithQuantizeSucceeds { + MPPTextEmbedderOptions *options = + [self textEmbedderOptionsWithModelName:kBertTextEmbedderModelName]; + options.quantize = YES; + + MPPTextEmbedder *textEmbedder = [[MPPTextEmbedder alloc] initWithOptions:options error:nil]; + XCTAssertNotNil(textEmbedder); + + MPPEmbedding *embedding1 = [self assertQuantizedEmbeddingResultsOfEmbedText:@"it's a charming and often affecting journey" + usingTextEmbedder:textEmbedder + hasCount:512 + firstValue:127]; + + MPPEmbedding *embedding2 = [self assertQuantizedEmbeddingResultsOfEmbedText:@"what a great and fantastic trip" + usingTextEmbedder:textEmbedder + hasCount:512 + firstValue:127]; + NSNumber *cosineSimilarity = [MPPTextEmbedder cosineSimilarityBetweenEmbedding1:embedding1 andEmbedding2:embedding2 error:nil]; + XCTAssertEqualWithAccuracy(cosineSimilarity.doubleValue, 0.864113, kSimilarityDiffTolerance); } @end From 9af30f98a293a702e5c6a3363e4ecf547dff2aa9 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 14:32:38 +0530 Subject: [PATCH 010/107] Create build.yaml --- .github/ISSUE_TEMPLATE/build.yaml | 103 ++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/build.yaml diff --git a/.github/ISSUE_TEMPLATE/build.yaml b/.github/ISSUE_TEMPLATE/build.yaml new file mode 100644 index 00000000..7f4e92e9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/build.yaml @@ -0,0 +1,103 @@ +name: MediaPipe Issue Template +description: Use this template to report build/install issue +body: + - type: input + id: os + attributes: + label: OS Platform and Distribution: + description: + placeholder: e.g. Linux Ubuntu 16.04, Android 11, iOS 14.4 + validations: + required: true + - type: input + id: compilerversion + attributes: + label: Compiler version: + description: + placeholder: e.g. gcc/g++ 8 /Apple clang version 12.0.0 + validations: + required: false + - type: input + id: programminglang + attributes: + label: Programming Language and version: + description: + placeholder: e.g. C++ 14, Python 3.6, Java + validations: + required: true + - type: input + id: virtualenv + attributes: + label: Installed using virtualenv? pip? Conda?: + description: + placeholder: if python + validations: + required: false + - type: input + id: mediapipever + attributes: + label: MediaPipe version: + description: + placeholder: https://github.com/google/mediapipe/releases + validations: + required: false + - type: input + id: bazelver + attributes: + label: Bazel version: + description: + placeholder: e.g. 5.0, 5.1 etc. + validations: + required: false + - type: input + id: xcodeversion + attributes: + label: XCode and Tulsi versions : + description: + placeholder: if iOS + validations: + required: false + - type: input + id: sdkndkversion + attributes: + label: Android SDK and NDK versions : + description: + placeholder: if android + validations: + required: false + - type: input + id: androidaar + attributes: + label: Android [AAR] https://google.github.io/mediapipe/getting_started/android_archive_library.html : + description: + placeholder: if android + validations: + required: false + - type: input + id: opencvversion + attributes: + label: OpenCV version : + description: + placeholder: if running on desktop + validations: + required: false + - type: textarea + id: what-happened + attributes: + label: Describe the problem : + description: Provide the exact sequence of commands / steps that you executed before running into the problem(https://google.github.io/mediapipe/getting_started/getting_started.html) : + placeholder: Tell us what you see! + value: "A bug happened!" + render: shell + validations: + required: true + - type: textarea + id: code-to-reproduce + attributes: + label: Complete Logs : + description: Include Complete Log information or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached: + placeholder: Tell us what you see! + value: + render: shell + validations: + required: true From 90c5dc19d1e5c96428ee7c8036e6c9e061897c6e Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 14:33:47 +0530 Subject: [PATCH 011/107] Update build.yaml --- .github/ISSUE_TEMPLATE/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/build.yaml b/.github/ISSUE_TEMPLATE/build.yaml index 7f4e92e9..6f5357e8 100644 --- a/.github/ISSUE_TEMPLATE/build.yaml +++ b/.github/ISSUE_TEMPLATE/build.yaml @@ -4,7 +4,7 @@ body: - type: input id: os attributes: - label: OS Platform and Distribution: + label: OS Platform and Distribution description: placeholder: e.g. Linux Ubuntu 16.04, Android 11, iOS 14.4 validations: From a235621b16a52abedff1390d1b9dc49f3bd6bddf Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 14:34:41 +0530 Subject: [PATCH 012/107] Update build.yaml --- .github/ISSUE_TEMPLATE/build.yaml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/build.yaml b/.github/ISSUE_TEMPLATE/build.yaml index 6f5357e8..7689f0a1 100644 --- a/.github/ISSUE_TEMPLATE/build.yaml +++ b/.github/ISSUE_TEMPLATE/build.yaml @@ -12,7 +12,7 @@ body: - type: input id: compilerversion attributes: - label: Compiler version: + label: Compiler version description: placeholder: e.g. gcc/g++ 8 /Apple clang version 12.0.0 validations: @@ -20,7 +20,7 @@ body: - type: input id: programminglang attributes: - label: Programming Language and version: + label: Programming Language and version description: placeholder: e.g. C++ 14, Python 3.6, Java validations: @@ -28,7 +28,7 @@ body: - type: input id: virtualenv attributes: - label: Installed using virtualenv? pip? Conda?: + label: Installed using virtualenv? pip? Conda? description: placeholder: if python validations: @@ -36,7 +36,7 @@ body: - type: input id: mediapipever attributes: - label: MediaPipe version: + label: MediaPipe version description: placeholder: https://github.com/google/mediapipe/releases validations: @@ -44,7 +44,7 @@ body: - type: input id: bazelver attributes: - label: Bazel version: + label: Bazel version description: placeholder: e.g. 5.0, 5.1 etc. validations: @@ -52,7 +52,7 @@ body: - type: input id: xcodeversion attributes: - label: XCode and Tulsi versions : + label: XCode and Tulsi versions description: placeholder: if iOS validations: @@ -60,7 +60,7 @@ body: - type: input id: sdkndkversion attributes: - label: Android SDK and NDK versions : + label: Android SDK and NDK versions description: placeholder: if android validations: @@ -68,7 +68,7 @@ body: - type: input id: androidaar attributes: - label: Android [AAR] https://google.github.io/mediapipe/getting_started/android_archive_library.html : + label: Android [AAR] https://google.github.io/mediapipe/getting_started/android_archive_library.html description: placeholder: if android validations: @@ -76,7 +76,7 @@ body: - type: input id: opencvversion attributes: - label: OpenCV version : + label: OpenCV version description: placeholder: if running on desktop validations: @@ -84,7 +84,7 @@ body: - type: textarea id: what-happened attributes: - label: Describe the problem : + label: Describe the problem description: Provide the exact sequence of commands / steps that you executed before running into the problem(https://google.github.io/mediapipe/getting_started/getting_started.html) : placeholder: Tell us what you see! value: "A bug happened!" @@ -94,7 +94,7 @@ body: - type: textarea id: code-to-reproduce attributes: - label: Complete Logs : + label: Complete Logs description: Include Complete Log information or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached: placeholder: Tell us what you see! value: From 76685b2213292b6aa6bf8a74e6f51b5799af0a50 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 14:35:05 +0530 Subject: [PATCH 013/107] Update build.yaml --- .github/ISSUE_TEMPLATE/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/build.yaml b/.github/ISSUE_TEMPLATE/build.yaml index 7689f0a1..014cfdf1 100644 --- a/.github/ISSUE_TEMPLATE/build.yaml +++ b/.github/ISSUE_TEMPLATE/build.yaml @@ -85,7 +85,7 @@ body: id: what-happened attributes: label: Describe the problem - description: Provide the exact sequence of commands / steps that you executed before running into the problem(https://google.github.io/mediapipe/getting_started/getting_started.html) : + description: Provide the exact sequence of commands / steps that you executed before running into the problem(https://google.github.io/mediapipe/getting_started/getting_started.html) placeholder: Tell us what you see! value: "A bug happened!" render: shell From 01a740db5fc4af1d4597c9f7462ab8fe40f0e901 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 14:36:16 +0530 Subject: [PATCH 014/107] Update build.yaml --- .github/ISSUE_TEMPLATE/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/build.yaml b/.github/ISSUE_TEMPLATE/build.yaml index 014cfdf1..9b606f47 100644 --- a/.github/ISSUE_TEMPLATE/build.yaml +++ b/.github/ISSUE_TEMPLATE/build.yaml @@ -95,7 +95,7 @@ body: id: code-to-reproduce attributes: label: Complete Logs - description: Include Complete Log information or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached: + description: Include Complete Log information or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached placeholder: Tell us what you see! value: render: shell From b75c7dedfcebe22bf190aa2dc8660c4a436c389e Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 14:41:13 +0530 Subject: [PATCH 015/107] Update build.yaml --- .github/ISSUE_TEMPLATE/build.yaml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/build.yaml b/.github/ISSUE_TEMPLATE/build.yaml index 9b606f47..559b851f 100644 --- a/.github/ISSUE_TEMPLATE/build.yaml +++ b/.github/ISSUE_TEMPLATE/build.yaml @@ -28,17 +28,17 @@ body: - type: input id: virtualenv attributes: - label: Installed using virtualenv? pip? Conda? + label: Installed using virtualenv? pip? Conda?(if python) description: - placeholder: if python + placeholder: validations: required: false - type: input id: mediapipever attributes: - label: MediaPipe version + label: MediaPipe version(https://github.com/google/mediapipe/releases) description: - placeholder: https://github.com/google/mediapipe/releases + placeholder: validations: required: false - type: input @@ -52,40 +52,40 @@ body: - type: input id: xcodeversion attributes: - label: XCode and Tulsi versions + label: XCode and Tulsi versions(if iOS) description: - placeholder: if iOS + placeholder: validations: required: false - type: input id: sdkndkversion attributes: - label: Android SDK and NDK versions + label: Android SDK and NDK versions(if abdroid) description: - placeholder: if android + placeholder: validations: required: false - type: input id: androidaar attributes: - label: Android [AAR] https://google.github.io/mediapipe/getting_started/android_archive_library.html + label: Android [AAR](https://google.github.io/mediapipe/getting_started/android_archive_library.html)(if android) description: - placeholder: if android + placeholder: validations: required: false - type: input id: opencvversion attributes: - label: OpenCV version + label: OpenCV version(if running on desktop) description: - placeholder: if running on desktop + placeholder: validations: required: false - type: textarea id: what-happened attributes: label: Describe the problem - description: Provide the exact sequence of commands / steps that you executed before running into the problem(https://google.github.io/mediapipe/getting_started/getting_started.html) + description: Provide the exact sequence of commands / steps that you executed before running into the [problem](https://google.github.io/mediapipe/getting_started/getting_started.html) placeholder: Tell us what you see! value: "A bug happened!" render: shell From 598624d2012537e7f17859873cc40d41e8c4edd9 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 14:43:29 +0530 Subject: [PATCH 016/107] Update build.yaml --- .github/ISSUE_TEMPLATE/build.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/build.yaml b/.github/ISSUE_TEMPLATE/build.yaml index 559b851f..9aa626dc 100644 --- a/.github/ISSUE_TEMPLATE/build.yaml +++ b/.github/ISSUE_TEMPLATE/build.yaml @@ -36,9 +36,9 @@ body: - type: input id: mediapipever attributes: - label: MediaPipe version(https://github.com/google/mediapipe/releases) + label: MediaPipe version description: - placeholder: + placeholder: e.g. 0.8.11, 0.9.1 validations: required: false - type: input @@ -46,7 +46,7 @@ body: attributes: label: Bazel version description: - placeholder: e.g. 5.0, 5.1 etc. + placeholder: e.g. 5.0, 5.1 validations: required: false - type: input @@ -68,7 +68,7 @@ body: - type: input id: androidaar attributes: - label: Android [AAR](https://google.github.io/mediapipe/getting_started/android_archive_library.html)(if android) + label: Android [AAR](https://google.github.io/mediapipe/getting_started/android_archive_library.html) (if android) description: placeholder: validations: From 43a97637dba66e24c3ec28c8955b548e4e50c1db Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 14:47:37 +0530 Subject: [PATCH 017/107] Update build.yaml --- .github/ISSUE_TEMPLATE/build.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/build.yaml b/.github/ISSUE_TEMPLATE/build.yaml index 9aa626dc..d98b7a77 100644 --- a/.github/ISSUE_TEMPLATE/build.yaml +++ b/.github/ISSUE_TEMPLATE/build.yaml @@ -65,12 +65,13 @@ body: placeholder: validations: required: false - - type: input + - type: dropdown id: androidaar attributes: - label: Android [AAR](https://google.github.io/mediapipe/getting_started/android_archive_library.html) (if android) - description: - placeholder: + label: Android AAR(if android) + options: + - Yes + - No validations: required: false - type: input From daa21167734f6837f0447eab9042fbe4b5c0c0de Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 14:48:52 +0530 Subject: [PATCH 018/107] Update build.yaml --- .github/ISSUE_TEMPLATE/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/build.yaml b/.github/ISSUE_TEMPLATE/build.yaml index d98b7a77..26a669a1 100644 --- a/.github/ISSUE_TEMPLATE/build.yaml +++ b/.github/ISSUE_TEMPLATE/build.yaml @@ -73,7 +73,7 @@ body: - Yes - No validations: - required: false + required: true - type: input id: opencvversion attributes: From 78502bb5fd2c4bbfa338a265ff9257ba524b76ad Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 14:49:37 +0530 Subject: [PATCH 019/107] Update build.yaml --- .github/ISSUE_TEMPLATE/build.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/build.yaml b/.github/ISSUE_TEMPLATE/build.yaml index 26a669a1..15ce1c30 100644 --- a/.github/ISSUE_TEMPLATE/build.yaml +++ b/.github/ISSUE_TEMPLATE/build.yaml @@ -70,10 +70,10 @@ body: attributes: label: Android AAR(if android) options: - - Yes - - No + - 'Yes' + - 'No' validations: - required: true + required: false - type: input id: opencvversion attributes: From d554f92d71736df0b9c631cf8eeb2dd7b0f7296a Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 14:53:50 +0530 Subject: [PATCH 020/107] Update build.yaml --- .github/ISSUE_TEMPLATE/build.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/build.yaml b/.github/ISSUE_TEMPLATE/build.yaml index 15ce1c30..dd8cd567 100644 --- a/.github/ISSUE_TEMPLATE/build.yaml +++ b/.github/ISSUE_TEMPLATE/build.yaml @@ -1,5 +1,6 @@ -name: MediaPipe Issue Template +name: Build/Install Issue description: Use this template to report build/install issue +label: 'type:build/install' body: - type: input id: os From 6a90f8b27e325b5c7130e27e7c974c44391df86a Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 14:55:36 +0530 Subject: [PATCH 021/107] Update build.yaml --- .github/ISSUE_TEMPLATE/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/build.yaml b/.github/ISSUE_TEMPLATE/build.yaml index dd8cd567..be01ff5d 100644 --- a/.github/ISSUE_TEMPLATE/build.yaml +++ b/.github/ISSUE_TEMPLATE/build.yaml @@ -1,6 +1,6 @@ name: Build/Install Issue description: Use this template to report build/install issue -label: 'type:build/install' +labels: 'type:build/install' body: - type: input id: os From be42a73f4378316df58afa2a5ffc42314448b34f Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 14:56:44 +0530 Subject: [PATCH 022/107] Update build.yaml --- .github/ISSUE_TEMPLATE/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/build.yaml b/.github/ISSUE_TEMPLATE/build.yaml index be01ff5d..01653a7e 100644 --- a/.github/ISSUE_TEMPLATE/build.yaml +++ b/.github/ISSUE_TEMPLATE/build.yaml @@ -1,6 +1,6 @@ name: Build/Install Issue description: Use this template to report build/install issue -labels: 'type:build/install' +labels: 'type:tasks' body: - type: input id: os From f7b035b15e460f21ab8e3ed09cdd47a5bbff3690 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 14:57:28 +0530 Subject: [PATCH 023/107] Update build.yaml --- .github/ISSUE_TEMPLATE/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/build.yaml b/.github/ISSUE_TEMPLATE/build.yaml index 01653a7e..02f6910c 100644 --- a/.github/ISSUE_TEMPLATE/build.yaml +++ b/.github/ISSUE_TEMPLATE/build.yaml @@ -1,6 +1,6 @@ name: Build/Install Issue description: Use this template to report build/install issue -labels: 'type:tasks' +labels: 'type:task' body: - type: input id: os From 1b0923c3d7d150b1234ba1abad71a42e37cd661a Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 14:59:10 +0530 Subject: [PATCH 024/107] Delete 00-build-installation-issue.md --- .../00-build-installation-issue.md | 27 ------------------- 1 file changed, 27 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/00-build-installation-issue.md diff --git a/.github/ISSUE_TEMPLATE/00-build-installation-issue.md b/.github/ISSUE_TEMPLATE/00-build-installation-issue.md deleted file mode 100644 index f4300e42..00000000 --- a/.github/ISSUE_TEMPLATE/00-build-installation-issue.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: "Build/Installation Issue" -about: Use this template for build/installation issues -labels: type:build/install - ---- -Please make sure that this is a build/installation issue and also refer to the [troubleshooting](https://google.github.io/mediapipe/getting_started/troubleshooting.html) documentation before raising any issues. - -**System information** (Please provide as much relevant information as possible) -- OS Platform and Distribution (e.g. Linux Ubuntu 16.04, Android 11, iOS 14.4): -- Compiler version (e.g. gcc/g++ 8 /Apple clang version 12.0.0): -- Programming Language and version ( e.g. C++ 14, Python 3.6, Java ): -- Installed using virtualenv? pip? Conda? (if python): -- [MediaPipe version](https://github.com/google/mediapipe/releases): -- Bazel version: -- XCode and Tulsi versions (if iOS): -- Android SDK and NDK versions (if android): -- Android [AAR](https://google.github.io/mediapipe/getting_started/android_archive_library.html) ( if android): -- OpenCV version (if running on desktop): - -**Describe the problem**: - - -**[Provide the exact sequence of commands / steps that you executed before running into the problem](https://google.github.io/mediapipe/getting_started/getting_started.html):** - -**Complete Logs:** -Include Complete Log information or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached: From 2c84077859122afbb75b513dfa33a1d774e86e83 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 15:02:07 +0530 Subject: [PATCH 025/107] Update build.yaml --- .github/ISSUE_TEMPLATE/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/build.yaml b/.github/ISSUE_TEMPLATE/build.yaml index 02f6910c..40b6d4bb 100644 --- a/.github/ISSUE_TEMPLATE/build.yaml +++ b/.github/ISSUE_TEMPLATE/build.yaml @@ -1,6 +1,6 @@ name: Build/Install Issue description: Use this template to report build/install issue -labels: 'type:task' +labels: 'type:build/install' body: - type: input id: os @@ -61,7 +61,7 @@ body: - type: input id: sdkndkversion attributes: - label: Android SDK and NDK versions(if abdroid) + label: Android SDK and NDK versions(if android) description: placeholder: validations: From 0f7743db1bba47510e0374343063e02cb19e6815 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 15:07:33 +0530 Subject: [PATCH 026/107] Update build.yaml --- .github/ISSUE_TEMPLATE/build.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/build.yaml b/.github/ISSUE_TEMPLATE/build.yaml index 40b6d4bb..71900bc8 100644 --- a/.github/ISSUE_TEMPLATE/build.yaml +++ b/.github/ISSUE_TEMPLATE/build.yaml @@ -2,6 +2,9 @@ name: Build/Install Issue description: Use this template to report build/install issue labels: 'type:build/install' body: + - type: markdown + attributes: + value: "Please make sure that this is a build/installation issue and also refer to the [troubleshooting](https://google.github.io/mediapipe/getting_started/troubleshooting.html) documentation before raising any issues." - type: input id: os attributes: From eea62dca15c8a141b6e017a85ded3df7446444a7 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 15:24:47 +0530 Subject: [PATCH 027/107] Update build.yaml --- .github/ISSUE_TEMPLATE/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/build.yaml b/.github/ISSUE_TEMPLATE/build.yaml index 71900bc8..5a17a231 100644 --- a/.github/ISSUE_TEMPLATE/build.yaml +++ b/.github/ISSUE_TEMPLATE/build.yaml @@ -4,7 +4,7 @@ labels: 'type:build/install' body: - type: markdown attributes: - value: "Please make sure that this is a build/installation issue and also refer to the [troubleshooting](https://google.github.io/mediapipe/getting_started/troubleshooting.html) documentation before raising any issues." + value: Please make sure that this is a build/installation issue and also refer to the [troubleshooting](https://google.github.io/mediapipe/getting_started/troubleshooting.html) documentation before raising any issues. - type: input id: os attributes: From 4ca9b2d43adbd4da43df580303307a573ab7fcd5 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 15:25:23 +0530 Subject: [PATCH 028/107] Update build.yaml --- .github/ISSUE_TEMPLATE/build.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/build.yaml b/.github/ISSUE_TEMPLATE/build.yaml index 5a17a231..bbf1c843 100644 --- a/.github/ISSUE_TEMPLATE/build.yaml +++ b/.github/ISSUE_TEMPLATE/build.yaml @@ -3,6 +3,7 @@ description: Use this template to report build/install issue labels: 'type:build/install' body: - type: markdown + id: link attributes: value: Please make sure that this is a build/installation issue and also refer to the [troubleshooting](https://google.github.io/mediapipe/getting_started/troubleshooting.html) documentation before raising any issues. - type: input From 182dfeb4e990115327da2fc1f815eef78a97f3ca Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 15:25:44 +0530 Subject: [PATCH 029/107] Update build.yaml --- .github/ISSUE_TEMPLATE/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/build.yaml b/.github/ISSUE_TEMPLATE/build.yaml index bbf1c843..2b68d800 100644 --- a/.github/ISSUE_TEMPLATE/build.yaml +++ b/.github/ISSUE_TEMPLATE/build.yaml @@ -4,8 +4,8 @@ labels: 'type:build/install' body: - type: markdown id: link - attributes: - value: Please make sure that this is a build/installation issue and also refer to the [troubleshooting](https://google.github.io/mediapipe/getting_started/troubleshooting.html) documentation before raising any issues. + attributes: + value: Please make sure that this is a build/installation issue and also refer to the [troubleshooting](https://google.github.io/mediapipe/getting_started/troubleshooting.html) documentation before raising any issues. - type: input id: os attributes: From dd10c54ed5fec1a427e7fda184dc0259c97ec570 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 15:45:51 +0530 Subject: [PATCH 030/107] Create model_maker_issue_template.yaml --- .../model_maker_issue_template.yaml | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/model_maker_issue_template.yaml diff --git a/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml b/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml new file mode 100644 index 00000000..aa814028 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml @@ -0,0 +1,80 @@ +name: Model Maker Issue +description: Use this template for assistance with using MediaPipe Model Maker (developers.google.com/mediapipe/solutions) to create custom on-device ML solutions. +labels: 'type:modelmaker' +body: + - type: markdown + id: link + attributes: + value: Please make sure that this is a [Model Maker](https://developers.google.com/mediapipe/solutions) issue. + - type: dropdown + id: customcode + attributes: + label: Have I written custom code (as opposed to using a stock example script provided in MediaPipe) + options: + - 'Yes' + - 'No' + validations: + required: false + - type: input + id: os + attributes: + label: OS Platform and Distribution + description: + placeholder: e.g. Linux Ubuntu 16.04, Android 11, iOS 14.4 + validations: + required: true + - type: input + id: pythonver + attributes: + label: Python Version + description: + placeholder: e.g. 3.7, 3.8 + validations: + required: true + - type: input + id: modelmakerver + attributes: + label: [MediaPipe Model Maker version](https://pypi.org/project/mediapipe-model-maker/) + description: + placeholder: + validations: + required: false + - type: input + id: taskname + attributes: + label: Task name (e.g. Image classification, Gesture recognition etc.) + description: + placeholder: + validations: + required: true + - type: textarea + id: current + attributes: + label: Describe the actual behavior + render: shell + validations: + required: true + - type: textarea + id: expected + attributes: + label: Describe the expected behaviour + render: shell + validations: + required: true + - type: textarea + id: what-happened + attributes: + label: Standalone code/steps you may have used to try to get what you need + description: If there is a problem, provide a reproducible test case that is the bare minimum necessary to generate the problem. If possible, please share a link to Colab, GitHub repo link or anything that we can use to reproduce the problem: + render: shell + validations: + required: true + - type: textarea + id: other_info + attributes: + label: Other info / Complete Logs + description: Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full
traceback. Large logs and files should be attached: + value: + render: shell + validations: + required: false From 79e39e6d52df1819c501b84bb362ef98610e865a Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 15:47:37 +0530 Subject: [PATCH 031/107] Update model_maker_issue_template.yaml --- .github/ISSUE_TEMPLATE/model_maker_issue_template.yaml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml b/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml index aa814028..0e37f30a 100644 --- a/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml @@ -19,15 +19,13 @@ body: id: os attributes: label: OS Platform and Distribution - description: placeholder: e.g. Linux Ubuntu 16.04, Android 11, iOS 14.4 validations: required: true - type: input id: pythonver attributes: - label: Python Version - description: + label: Python Version placeholder: e.g. 3.7, 3.8 validations: required: true @@ -35,16 +33,12 @@ body: id: modelmakerver attributes: label: [MediaPipe Model Maker version](https://pypi.org/project/mediapipe-model-maker/) - description: - placeholder: validations: required: false - type: input id: taskname attributes: - label: Task name (e.g. Image classification, Gesture recognition etc.) - description: - placeholder: + label: Task name (e.g. Image classification, Gesture recognition etc.) validations: required: true - type: textarea From d0486ec9fdfe5316407343c1264b10742abe9c73 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 15:48:18 +0530 Subject: [PATCH 032/107] Update model_maker_issue_template.yaml --- .github/ISSUE_TEMPLATE/model_maker_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml b/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml index 0e37f30a..6c40ff51 100644 --- a/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml @@ -32,7 +32,7 @@ body: - type: input id: modelmakerver attributes: - label: [MediaPipe Model Maker version](https://pypi.org/project/mediapipe-model-maker/) + label: MediaPipe Model Maker version validations: required: false - type: input From 96936cf6b2615f5b2a1d45a3596a809706ae3a92 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 15:50:00 +0530 Subject: [PATCH 033/107] Update model_maker_issue_template.yaml --- .github/ISSUE_TEMPLATE/model_maker_issue_template.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml b/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml index 6c40ff51..e0522516 100644 --- a/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml @@ -3,7 +3,6 @@ description: Use this template for assistance with using MediaPipe Model Maker ( labels: 'type:modelmaker' body: - type: markdown - id: link attributes: value: Please make sure that this is a [Model Maker](https://developers.google.com/mediapipe/solutions) issue. - type: dropdown From 8c60e412b2912ef6e6ac19b45fc7ef4b1142e56f Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 15:51:37 +0530 Subject: [PATCH 034/107] Update model_maker_issue_template.yaml --- .github/ISSUE_TEMPLATE/model_maker_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml b/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml index e0522516..9501ee68 100644 --- a/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml @@ -4,7 +4,7 @@ labels: 'type:modelmaker' body: - type: markdown attributes: - value: Please make sure that this is a [Model Maker](https://developers.google.com/mediapipe/solutions) issue. + value: Please make sure that this is a [Model Maker](https://developers.google.com/mediapipe/solutions) issue - type: dropdown id: customcode attributes: From 9de43a83f6f053deeb3dec78788119a1313493f8 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 15:53:24 +0530 Subject: [PATCH 035/107] Update model_maker_issue_template.yaml --- .github/ISSUE_TEMPLATE/model_maker_issue_template.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml b/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml index 9501ee68..a9f85983 100644 --- a/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml @@ -3,6 +3,7 @@ description: Use this template for assistance with using MediaPipe Model Maker ( labels: 'type:modelmaker' body: - type: markdown + id: linkmodel attributes: value: Please make sure that this is a [Model Maker](https://developers.google.com/mediapipe/solutions) issue - type: dropdown From 79b747969ed720da10b12a1e9306beede594d0fc Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 15:58:48 +0530 Subject: [PATCH 036/107] Update model_maker_issue_template.yaml --- .../model_maker_issue_template.yaml | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml b/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml index a9f85983..cd4621b1 100644 --- a/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml @@ -35,39 +35,39 @@ body: label: MediaPipe Model Maker version validations: required: false - - type: input - id: taskname + - type: input + id: taskname attributes: label: Task name (e.g. Image classification, Gesture recognition etc.) validations: required: true - - type: textarea - id: current - attributes: + - type: textarea + id: current + attributes: label: Describe the actual behavior render: shell - validations: - required: true - - type: textarea - id: expected - attributes: + validations: + required: true + - type: textarea + id: expected + attributes: label: Describe the expected behaviour render: shell - validations: - required: true - - type: textarea - id: what-happened - attributes: + validations: + required: true + - type: textarea + id: what-happened + attributes: label: Standalone code/steps you may have used to try to get what you need - description: If there is a problem, provide a reproducible test case that is the bare minimum necessary to generate the problem. If possible, please share a link to Colab, GitHub repo link or anything that we can use to reproduce the problem: + description: If there is a problem, provide a reproducible test case that is the bare minimum necessary to generate the problem. If possible, please share a link to Colab, GitHub repo link or anything that we can use to reproduce the problem render: shell - validations: + validations: required: true - type: textarea id: other_info attributes: label: Other info / Complete Logs - description: Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full
traceback. Large logs and files should be attached: + description: Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full
traceback. Large logs and files should be attached value: render: shell validations: From d01901f15684381ac2afda5e443b30cba631e7a5 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 15:59:15 +0530 Subject: [PATCH 037/107] Update model_maker_issue_template.yaml --- .github/ISSUE_TEMPLATE/model_maker_issue_template.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml b/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml index cd4621b1..15b841be 100644 --- a/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml @@ -68,7 +68,6 @@ body: attributes: label: Other info / Complete Logs description: Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full
traceback. Large logs and files should be attached - value: render: shell validations: required: false From 93ef2f69fbdd2f41deec495dff002d457be0234a Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 16:00:21 +0530 Subject: [PATCH 038/107] Update model_maker_issue_template.yaml --- .github/ISSUE_TEMPLATE/model_maker_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml b/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml index 15b841be..69a61e7c 100644 --- a/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml @@ -67,7 +67,7 @@ body: id: other_info attributes: label: Other info / Complete Logs - description: Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full
traceback. Large logs and files should be attached + description: Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached render: shell validations: required: false From 434c1143ae3643bfd65411eba634752293c9aec0 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 16:01:18 +0530 Subject: [PATCH 039/107] Update and rename model_maker_issue_template.yaml to model_maker_issue_template1.yaml --- ...ker_issue_template.yaml => model_maker_issue_template1.yaml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/ISSUE_TEMPLATE/{model_maker_issue_template.yaml => model_maker_issue_template1.yaml} (99%) diff --git a/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml b/.github/ISSUE_TEMPLATE/model_maker_issue_template1.yaml similarity index 99% rename from .github/ISSUE_TEMPLATE/model_maker_issue_template.yaml rename to .github/ISSUE_TEMPLATE/model_maker_issue_template1.yaml index 69a61e7c..32a4bb92 100644 --- a/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/model_maker_issue_template1.yaml @@ -16,7 +16,7 @@ body: validations: required: false - type: input - id: os + id: os_model attributes: label: OS Platform and Distribution placeholder: e.g. Linux Ubuntu 16.04, Android 11, iOS 14.4 From ca6e4cb7a544c1765e482139f8e4093dd2ecfd0f Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 16:01:56 +0530 Subject: [PATCH 040/107] Update model_maker_issue_template1.yaml --- .github/ISSUE_TEMPLATE/model_maker_issue_template1.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/model_maker_issue_template1.yaml b/.github/ISSUE_TEMPLATE/model_maker_issue_template1.yaml index 32a4bb92..e518d029 100644 --- a/.github/ISSUE_TEMPLATE/model_maker_issue_template1.yaml +++ b/.github/ISSUE_TEMPLATE/model_maker_issue_template1.yaml @@ -42,21 +42,21 @@ body: validations: required: true - type: textarea - id: current + id: current_model attributes: label: Describe the actual behavior render: shell validations: required: true - type: textarea - id: expected + id: expected_model attributes: label: Describe the expected behaviour render: shell validations: required: true - type: textarea - id: what-happened + id: what-happened_model attributes: label: Standalone code/steps you may have used to try to get what you need description: If there is a problem, provide a reproducible test case that is the bare minimum necessary to generate the problem. If possible, please share a link to Colab, GitHub repo link or anything that we can use to reproduce the problem From 4139ce76e085e322e26f4c8ea1fdd84d859b0b74 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 16:03:01 +0530 Subject: [PATCH 041/107] Update model_maker_issue_template1.yaml --- .github/ISSUE_TEMPLATE/model_maker_issue_template1.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/model_maker_issue_template1.yaml b/.github/ISSUE_TEMPLATE/model_maker_issue_template1.yaml index e518d029..19e400db 100644 --- a/.github/ISSUE_TEMPLATE/model_maker_issue_template1.yaml +++ b/.github/ISSUE_TEMPLATE/model_maker_issue_template1.yaml @@ -7,7 +7,7 @@ body: attributes: value: Please make sure that this is a [Model Maker](https://developers.google.com/mediapipe/solutions) issue - type: dropdown - id: customcode + id: customcode_model attributes: label: Have I written custom code (as opposed to using a stock example script provided in MediaPipe) options: From e5a6d3ec3b545bd143bd29b6727fc2f893c16ae8 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 16:05:33 +0530 Subject: [PATCH 042/107] Update model_maker_issue_template1.yaml --- .github/ISSUE_TEMPLATE/model_maker_issue_template1.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/model_maker_issue_template1.yaml b/.github/ISSUE_TEMPLATE/model_maker_issue_template1.yaml index 19e400db..cd585229 100644 --- a/.github/ISSUE_TEMPLATE/model_maker_issue_template1.yaml +++ b/.github/ISSUE_TEMPLATE/model_maker_issue_template1.yaml @@ -1,4 +1,4 @@ -name: Model Maker Issue +name: Model Maker Issues description: Use this template for assistance with using MediaPipe Model Maker (developers.google.com/mediapipe/solutions) to create custom on-device ML solutions. labels: 'type:modelmaker' body: From f197652c3a9c6efe7a13ce6d4fa41e605b28100e Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 16:16:25 +0530 Subject: [PATCH 043/107] Create task_issue_template.yaml --- .../ISSUE_TEMPLATE/task_issue_template.yaml | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/task_issue_template.yaml diff --git a/.github/ISSUE_TEMPLATE/task_issue_template.yaml b/.github/ISSUE_TEMPLATE/task_issue_template.yaml new file mode 100644 index 00000000..bf05a14a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/task_issue_template.yaml @@ -0,0 +1,72 @@ +name: Task Issues Template +description: Use this template for assistance with using MediaPipe Tasks (developers.google.com/mediapipe/solutions) to deploy on-device ML solutions (e.g. gesture recognition etc.) on supported platforms +labels: 'type:task' +body: + - type: markdown + id: linkmodel + attributes: + value: Please make sure that this is a [Tasks](https://developers.google.com/mediapipe/solutions) issue. + - type: dropdown + id: customcode_model + attributes: + label: Have I written custom code (as opposed to using a stock example script provided in MediaPipe) + options: + - 'Yes' + - 'No' + validations: + required: false + - type: input + id: os_model + attributes: + label: OS Platform and Distribution + placeholder: e.g. Linux Ubuntu 16.04, Android 11, iOS 14.4 + validations: + required: true + - type: input + id: task-sdk-version + attributes: + label: MediaPipe Tasks SDK version + validations: + required: false + - type: input + id: taskname + attributes: + label: Task name (e.g. Image classification, Gesture recognition etc.) + validations: + required: true + - type: input + id: programminglang + attributes: + label: Programming Language and version (e.g. C++, Python, Java) + validations: + required: true + - type: textarea + id: current_model + attributes: + label: Describe the actual behavior + render: shell + validations: + required: true + - type: textarea + id: expected_model + attributes: + label: Describe the expected behaviour + render: shell + validations: + required: true + - type: textarea + id: what-happened_model + attributes: + label: Standalone code/steps you may have used to try to get what you need + description: If there is a problem, provide a reproducible test case that is the bare minimum necessary to generate the problem. If possible, please share a link to Colab, GitHub repo link or anything that we can use to reproduce the problem + render: shell + validations: + required: true + - type: textarea + id: other_info + attributes: + label: Other info / Complete Logs + description: Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached + render: shell + validations: + required: false From 14d51d28aff17ed51a694783d504e0f4e5b86f5e Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 16:18:54 +0530 Subject: [PATCH 044/107] Update task_issue_template.yaml --- .github/ISSUE_TEMPLATE/task_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/task_issue_template.yaml b/.github/ISSUE_TEMPLATE/task_issue_template.yaml index bf05a14a..30bc11be 100644 --- a/.github/ISSUE_TEMPLATE/task_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/task_issue_template.yaml @@ -1,4 +1,4 @@ -name: Task Issues Template +name: Task Issue description: Use this template for assistance with using MediaPipe Tasks (developers.google.com/mediapipe/solutions) to deploy on-device ML solutions (e.g. gesture recognition etc.) on supported platforms labels: 'type:task' body: From 23cf1ee8c3fd443bc7cb9de4dd754b582ab64eb1 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 16:32:03 +0530 Subject: [PATCH 045/107] Create Solution(Legacy_issue_template.yaml --- .../Solution(Legacy_issue_template.yaml | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/Solution(Legacy_issue_template.yaml diff --git a/.github/ISSUE_TEMPLATE/Solution(Legacy_issue_template.yaml b/.github/ISSUE_TEMPLATE/Solution(Legacy_issue_template.yaml new file mode 100644 index 00000000..a8832574 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Solution(Legacy_issue_template.yaml @@ -0,0 +1,78 @@ +name: Solution(Legacy) Issue +description: Use this template for assistance with a specific Mediapipe solution (google.github.io/mediapipe/solutions) such as "Pose", including inference model usage/training, solution-specific calculators etc. +labels: 'type:support' +body: + - type: markdown + id: linkmodel + attributes: + value: Please make sure that this is a [solution](https://google.github.io/mediapipe/solutions/solutions.html) issue. + - type: dropdown + id: customcode_model + attributes: + label: Have I written custom code (as opposed to using a stock example script provided in MediaPipe) + options: + - 'Yes' + - 'No' + validations: + required: false + - type: input + id: os_model + attributes: + label: OS Platform and Distribution + placeholder: e.g. Linux Ubuntu 16.04, Android 11, iOS 14.4 + validations: + required: false + - type: input + id: mediapipe_version + attributes: + label: MediaPipe version + validations: + required: false + - type: input + id: bazel_version + attributes: + label: Bazel version + validations: + required: false + - type: input + id: solution + attributes: + label: Solution (e.g. C++, Python, Java) + validations: + required: false + - type: input + id: programminglang + attributes: + label: Programming Language and version (e.g. C++, Python, Java) + validations: + required: false + - type: textarea + id: current_model + attributes: + label: Describe the actual behavior + render: shell + validations: + required: true + - type: textarea + id: expected_model + attributes: + label: Describe the expected behaviour + render: shell + validations: + required: false + - type: textarea + id: what-happened_model + attributes: + label: Standalone code/steps you may have used to try to get what you need + description: If there is a problem, provide a reproducible test case that is the bare minimum necessary to generate the problem. If possible, please share a link to Colab, GitHub repo link or anything that we can use to reproduce the problem + render: shell + validations: + required: false + - type: textarea + id: other_info + attributes: + label: Other info / Complete Logs + description: Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached + render: shell + validations: + required: false From 22e05fc16ac0f20906a5be51af95c1da87987984 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 16:35:23 +0530 Subject: [PATCH 046/107] Update and rename Solution(Legacy_issue_template.yaml to Solution(Legacy_issue_template).yaml --- ...template.yaml => Solution(Legacy_issue_template).yaml} | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) rename .github/ISSUE_TEMPLATE/{Solution(Legacy_issue_template.yaml => Solution(Legacy_issue_template).yaml} (92%) diff --git a/.github/ISSUE_TEMPLATE/Solution(Legacy_issue_template.yaml b/.github/ISSUE_TEMPLATE/Solution(Legacy_issue_template).yaml similarity index 92% rename from .github/ISSUE_TEMPLATE/Solution(Legacy_issue_template.yaml rename to .github/ISSUE_TEMPLATE/Solution(Legacy_issue_template).yaml index a8832574..5d4928ce 100644 --- a/.github/ISSUE_TEMPLATE/Solution(Legacy_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/Solution(Legacy_issue_template).yaml @@ -37,13 +37,15 @@ body: - type: input id: solution attributes: - label: Solution (e.g. C++, Python, Java) + label: Solution + placeholder: e.g. FaceMesh, Pose, Holistic validations: required: false - type: input id: programminglang attributes: - label: Programming Language and version (e.g. C++, Python, Java) + label: Programming Language and version + placeholder: e.g. C++, Python, Java validations: required: false - type: textarea @@ -52,7 +54,7 @@ body: label: Describe the actual behavior render: shell validations: - required: true + required: false - type: textarea id: expected_model attributes: From 147890fc3328d8bf431fa498a8448b1453534c73 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 16:42:58 +0530 Subject: [PATCH 047/107] Create studio_issue_template.yaml --- .../ISSUE_TEMPLATE/studio_issue_template.yaml | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/studio_issue_template.yaml diff --git a/.github/ISSUE_TEMPLATE/studio_issue_template.yaml b/.github/ISSUE_TEMPLATE/studio_issue_template.yaml new file mode 100644 index 00000000..8f2a7b7a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/studio_issue_template.yaml @@ -0,0 +1,65 @@ +name: Studio Issue +description: Use this template for assistance with the MediaPipe Studio application. If this doesn’t look right, choose a different type. +labels: 'type:support' +body: + - type: markdown + id: linkmodel + attributes: + value: Please make sure that this is a MediaPipe Studio issue. + - type: dropdown + id: customcode_model + attributes: + label: Have I written custom code (as opposed to using a stock example script provided in MediaPipe) + options: + - 'Yes' + - 'No' + validations: + required: false + - type: input + id: browserver + attributes: + label: Browser and Version + validations: + required: false + - type: input + id: hardware + attributes: + label: Any microphone or camera hardware + validations: + required: false + - type: input + id: url + attributes: + label: URL that shows the problem + validations: + required: false + - type: textarea + id: current_model + attributes: + label: Describe the actual behavior + render: shell + validations: + required: false + - type: textarea + id: expected_model + attributes: + label: Describe the expected behaviour + render: shell + validations: + required: false + - type: textarea + id: what-happened_model + attributes: + label: Standalone code/steps you may have used to try to get what you need + description: If there is a problem, provide a reproducible test case that is the bare minimum necessary to generate the problem. If possible, please share a link to Colab, GitHub repo link or anything that we can use to reproduce the problem + render: shell + validations: + required: false + - type: textarea + id: other_info + attributes: + label: Other info / Complete Logs + description: Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached + render: shell + validations: + required: false From 0de00354201ee13eba122d548d6d5b9148b5c00f Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 16:43:14 +0530 Subject: [PATCH 048/107] Update studio_issue_template.yaml --- .github/ISSUE_TEMPLATE/studio_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/studio_issue_template.yaml b/.github/ISSUE_TEMPLATE/studio_issue_template.yaml index 8f2a7b7a..0834e698 100644 --- a/.github/ISSUE_TEMPLATE/studio_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/studio_issue_template.yaml @@ -1,4 +1,4 @@ -name: Studio Issue +name: Studio Issues description: Use this template for assistance with the MediaPipe Studio application. If this doesn’t look right, choose a different type. labels: 'type:support' body: From c851c6e5dcaae3aadd614f68d1dcffa2bf752507 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 16:46:13 +0530 Subject: [PATCH 049/107] Update studio_issue_template.yaml --- .github/ISSUE_TEMPLATE/studio_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/studio_issue_template.yaml b/.github/ISSUE_TEMPLATE/studio_issue_template.yaml index 0834e698..1478d71e 100644 --- a/.github/ISSUE_TEMPLATE/studio_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/studio_issue_template.yaml @@ -14,7 +14,7 @@ body: - 'Yes' - 'No' validations: - required: false + required: false - type: input id: browserver attributes: From 3a10b7c44bdca032a04635252d277f66d89f82bc Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 16:48:30 +0530 Subject: [PATCH 050/107] Update studio_issue_template.yaml --- .github/ISSUE_TEMPLATE/studio_issue_template.yaml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/studio_issue_template.yaml b/.github/ISSUE_TEMPLATE/studio_issue_template.yaml index 1478d71e..363751f1 100644 --- a/.github/ISSUE_TEMPLATE/studio_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/studio_issue_template.yaml @@ -6,15 +6,13 @@ body: id: linkmodel attributes: value: Please make sure that this is a MediaPipe Studio issue. - - type: dropdown - id: customcode_model + - type: input + id: os_model attributes: - label: Have I written custom code (as opposed to using a stock example script provided in MediaPipe) - options: - - 'Yes' - - 'No' + label: OS Platform and Distribution + placeholder: e.g. Linux Ubuntu 16.04, Android 11, iOS 14.4 validations: - required: false + required: true - type: input id: browserver attributes: From 388c74683944912365669d6095a09a54cf3f4dbe Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 16:48:50 +0530 Subject: [PATCH 051/107] Update studio_issue_template.yaml --- .github/ISSUE_TEMPLATE/studio_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/studio_issue_template.yaml b/.github/ISSUE_TEMPLATE/studio_issue_template.yaml index 363751f1..2d5c1f1e 100644 --- a/.github/ISSUE_TEMPLATE/studio_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/studio_issue_template.yaml @@ -12,7 +12,7 @@ body: label: OS Platform and Distribution placeholder: e.g. Linux Ubuntu 16.04, Android 11, iOS 14.4 validations: - required: true + required: false - type: input id: browserver attributes: From 810cef8daca47b4eeda3b1e608f65ce9e0f2fdc4 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 17:08:29 +0530 Subject: [PATCH 052/107] Create bug_issue_template.yaml --- .../ISSUE_TEMPLATE/bug_issue_template.yaml | 112 ++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_issue_template.yaml diff --git a/.github/ISSUE_TEMPLATE/bug_issue_template.yaml b/.github/ISSUE_TEMPLATE/bug_issue_template.yaml new file mode 100644 index 00000000..a722ac86 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_issue_template.yaml @@ -0,0 +1,112 @@ +name: Bug Issue +description: Use this template for reporting a bug. If this doesn’t look right, choose a different type. +labels: 'type:bug' +body: + - type: markdown + id: link + attributes: + value: Please make sure that this is a bug and also refer to the [troubleshooting](https://google.github.io/mediapipe/getting_started/troubleshooting.html), FAQ documentation before raising any issues. + - type: dropdown + id: customcode_model + attributes: + label: Have I written custom code (as opposed to using a stock example script provided in MediaPipe) + options: + - 'Yes' + - 'No' + validations: + required: false + - type: input + id: os + attributes: + label: OS Platform and Distribution + description: + placeholder: e.g. Linux Ubuntu 16.04, Android 11, iOS 14.4 + validations: + required: true + - type: input + id: mobile_device + attributes: + label: Mobile device if the issue happens on mobile device + description: + placeholder: e.g. iPhone 8, Pixel 2, Samsung Galaxy + validations: + required: false + - type: input + id: browser_version + attributes: + label: Browser and version if the issue happens on browser + placeholder: e.g. Google Chrome, Safari + validations: + required: false + - type: input + id: programminglang + attributes: + label: Programming Language and version + placeholder: e.g. C++, Python, Java + validations: + required: true + - type: input + id: mediapipever + attributes: + label: MediaPipe version + description: + placeholder: e.g. 0.8.11, 0.9.1 + validations: + required: false + - type: input + id: bazelver + attributes: + label: Bazel version + description: + placeholder: e.g. 5.0, 5.1 + validations: + required: false + - type: input + id: solution + attributes: + label: Solution + placeholder: e.g. FaceMesh, Pose, Holistic + validations: + required: true + - type: input + id: sdkndkversion + attributes: + label: Android Studio, NDK, SDK versions (if issue is related to building in Android environment) + validations: + required: false + - type: input + id: xcode_ver + attributes: + label: Xcode & Tulsi version (if issue is related to building for iOS): + validations: + required: false + - type: textarea + id: current_model + attributes: + label: Describe the actual behavior + render: shell + validations: + required: true + - type: textarea + id: expected_model + attributes: + label: Describe the expected behaviour + render: shell + validations: + required: true + - type: textarea + id: what-happened_model + attributes: + label: Standalone code/steps you may have used to try to get what you need + description: If there is a problem, provide a reproducible test case that is the bare minimum necessary to generate the problem. If possible, please share a link to Colab, GitHub repo link or anything that we can use to reproduce the problem + render: shell + validations: + required: true + - type: textarea + id: other_info + attributes: + label: Other info / Complete Logs + description: Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached + render: shell + validations: + required: false From e29a54221a9e5711923eb4733254552fea8f69d5 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 17:09:14 +0530 Subject: [PATCH 053/107] Update bug_issue_template.yaml --- .github/ISSUE_TEMPLATE/bug_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_issue_template.yaml b/.github/ISSUE_TEMPLATE/bug_issue_template.yaml index a722ac86..445bafd2 100644 --- a/.github/ISSUE_TEMPLATE/bug_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/bug_issue_template.yaml @@ -77,7 +77,7 @@ body: - type: input id: xcode_ver attributes: - label: Xcode & Tulsi version (if issue is related to building for iOS): + label: Xcode & Tulsi version (if issue is related to building for iOS) validations: required: false - type: textarea From b129978f896da59375fc0a01e3b1aea8294d7f99 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 17:09:24 +0530 Subject: [PATCH 054/107] Update bug_issue_template.yaml --- .github/ISSUE_TEMPLATE/bug_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_issue_template.yaml b/.github/ISSUE_TEMPLATE/bug_issue_template.yaml index 445bafd2..f009f6a4 100644 --- a/.github/ISSUE_TEMPLATE/bug_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/bug_issue_template.yaml @@ -1,4 +1,4 @@ -name: Bug Issue +name: Bug Issues description: Use this template for reporting a bug. If this doesn’t look right, choose a different type. labels: 'type:bug' body: From e055fdb62b565c26da6279b669a0667249fc249d Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 17:22:34 +0530 Subject: [PATCH 055/107] Create feature_request_issue_template.yaml --- .github/feature_request_issue_template.yaml | 57 +++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/feature_request_issue_template.yaml diff --git a/.github/feature_request_issue_template.yaml b/.github/feature_request_issue_template.yaml new file mode 100644 index 00000000..be15e41c --- /dev/null +++ b/.github/feature_request_issue_template.yaml @@ -0,0 +1,57 @@ +name: Feature Request Issues +description: Use this template for raising a feature request. If this doesn’t look right, choose a different type. +labels: 'type:feature' +body: + - type: markdown + id: linkmodel + attributes: + value: Please make sure that this is a feature request. + - type: input + id: solution + attributes: + label: MediaPipe Solution (you are using) + validations: + required: false + - type: input + id: pgmlang + attributes: + label: Programming language + placeholder: C++/typescript/Python/Objective C/Android Java + validations: + required: false + - type: dropdown + id: willingcon + attributes: + label: Are you willing to contribute it + options: + - 'Yes' + - 'No' + validations: + required: false + - type: textarea + id: behaviour + attributes: + label: Describe the feature and the current behaviour/state: + render: shell + validations: + required: true + - type: textarea + id: api_change + attributes: + label: Will this change the current api? How? + render: shell + validations: + required: false + - type: textarea + id: benifit + attributes: + label: Who will benefit with this feature? + validations: + required: false + - type: textarea + id: use_case + attributes: + label: Please specify the use cases for this feature: + render: shell + validations: + required: true From 4071d149f20460b1a50dac6c62136f3e301fb3bf Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 17:24:28 +0530 Subject: [PATCH 056/107] Create feature_request_issue_template.yaml --- .../feature_request_issue_template.yaml | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/feature_request_issue_template.yaml diff --git a/.github/ISSUE_TEMPLATE/feature_request_issue_template.yaml b/.github/ISSUE_TEMPLATE/feature_request_issue_template.yaml new file mode 100644 index 00000000..be15e41c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request_issue_template.yaml @@ -0,0 +1,57 @@ +name: Feature Request Issues +description: Use this template for raising a feature request. If this doesn’t look right, choose a different type. +labels: 'type:feature' +body: + - type: markdown + id: linkmodel + attributes: + value: Please make sure that this is a feature request. + - type: input + id: solution + attributes: + label: MediaPipe Solution (you are using) + validations: + required: false + - type: input + id: pgmlang + attributes: + label: Programming language + placeholder: C++/typescript/Python/Objective C/Android Java + validations: + required: false + - type: dropdown + id: willingcon + attributes: + label: Are you willing to contribute it + options: + - 'Yes' + - 'No' + validations: + required: false + - type: textarea + id: behaviour + attributes: + label: Describe the feature and the current behaviour/state: + render: shell + validations: + required: true + - type: textarea + id: api_change + attributes: + label: Will this change the current api? How? + render: shell + validations: + required: false + - type: textarea + id: benifit + attributes: + label: Who will benefit with this feature? + validations: + required: false + - type: textarea + id: use_case + attributes: + label: Please specify the use cases for this feature: + render: shell + validations: + required: true From 5c83bdde7aabf5a3c2584ab69a7c1fc464fc9dde Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 17:25:02 +0530 Subject: [PATCH 057/107] Delete feature_request_issue_template.yaml --- .github/feature_request_issue_template.yaml | 57 --------------------- 1 file changed, 57 deletions(-) delete mode 100644 .github/feature_request_issue_template.yaml diff --git a/.github/feature_request_issue_template.yaml b/.github/feature_request_issue_template.yaml deleted file mode 100644 index be15e41c..00000000 --- a/.github/feature_request_issue_template.yaml +++ /dev/null @@ -1,57 +0,0 @@ -name: Feature Request Issues -description: Use this template for raising a feature request. If this doesn’t look right, choose a different type. -labels: 'type:feature' -body: - - type: markdown - id: linkmodel - attributes: - value: Please make sure that this is a feature request. - - type: input - id: solution - attributes: - label: MediaPipe Solution (you are using) - validations: - required: false - - type: input - id: pgmlang - attributes: - label: Programming language - placeholder: C++/typescript/Python/Objective C/Android Java - validations: - required: false - - type: dropdown - id: willingcon - attributes: - label: Are you willing to contribute it - options: - - 'Yes' - - 'No' - validations: - required: false - - type: textarea - id: behaviour - attributes: - label: Describe the feature and the current behaviour/state: - render: shell - validations: - required: true - - type: textarea - id: api_change - attributes: - label: Will this change the current api? How? - render: shell - validations: - required: false - - type: textarea - id: benifit - attributes: - label: Who will benefit with this feature? - validations: - required: false - - type: textarea - id: use_case - attributes: - label: Please specify the use cases for this feature: - render: shell - validations: - required: true From fecb4f64fce9eb93bfcc9c99b9ad1a22cee04bc8 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 17:26:43 +0530 Subject: [PATCH 058/107] Update feature_request_issue_template.yaml --- .github/ISSUE_TEMPLATE/feature_request_issue_template.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request_issue_template.yaml b/.github/ISSUE_TEMPLATE/feature_request_issue_template.yaml index be15e41c..5e77ef44 100644 --- a/.github/ISSUE_TEMPLATE/feature_request_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request_issue_template.yaml @@ -12,9 +12,9 @@ body: label: MediaPipe Solution (you are using) validations: required: false - - type: input - id: pgmlang - attributes: + - type: input + id: pgmlang + attributes: label: Programming language placeholder: C++/typescript/Python/Objective C/Android Java validations: From 9ed873c93bb3a37b1638baa7bcecdb40f92efc03 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 17:29:50 +0530 Subject: [PATCH 059/107] Update feature_request_issue_template.yaml --- .github/ISSUE_TEMPLATE/feature_request_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request_issue_template.yaml b/.github/ISSUE_TEMPLATE/feature_request_issue_template.yaml index 5e77ef44..048bc005 100644 --- a/.github/ISSUE_TEMPLATE/feature_request_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request_issue_template.yaml @@ -31,7 +31,7 @@ body: - type: textarea id: behaviour attributes: - label: Describe the feature and the current behaviour/state: + label: Describe the feature and the current behaviour/state render: shell validations: required: true From 5b595b5f30983addb68a9d3e27417faea887fe94 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 17:30:07 +0530 Subject: [PATCH 060/107] Update feature_request_issue_template.yaml --- .github/ISSUE_TEMPLATE/feature_request_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request_issue_template.yaml b/.github/ISSUE_TEMPLATE/feature_request_issue_template.yaml index 048bc005..38863d75 100644 --- a/.github/ISSUE_TEMPLATE/feature_request_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request_issue_template.yaml @@ -51,7 +51,7 @@ body: - type: textarea id: use_case attributes: - label: Please specify the use cases for this feature: + label: Please specify the use cases for this feature render: shell validations: required: true From eecfefbcb550381d20112be3858a5db5a6b4e317 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 17:32:17 +0530 Subject: [PATCH 061/107] Update feature_request_issue_template.yaml --- .../ISSUE_TEMPLATE/feature_request_issue_template.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request_issue_template.yaml b/.github/ISSUE_TEMPLATE/feature_request_issue_template.yaml index 38863d75..fdbece8d 100644 --- a/.github/ISSUE_TEMPLATE/feature_request_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request_issue_template.yaml @@ -54,4 +54,11 @@ body: label: Please specify the use cases for this feature render: shell validations: - required: true + required: true + - type: textarea + id: info_other + attributes: + label: Any Other info: + render: shell + validations: + required: false From 508a7cbfa5c0dfba78c2ea56b5fca4a4296387de Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 17:32:28 +0530 Subject: [PATCH 062/107] Update feature_request_issue_template.yaml --- .github/ISSUE_TEMPLATE/feature_request_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request_issue_template.yaml b/.github/ISSUE_TEMPLATE/feature_request_issue_template.yaml index fdbece8d..e34515de 100644 --- a/.github/ISSUE_TEMPLATE/feature_request_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request_issue_template.yaml @@ -58,7 +58,7 @@ body: - type: textarea id: info_other attributes: - label: Any Other info: + label: Any Other info render: shell validations: required: false From 61515655d1e557d9f211ecf78706a9feb412de9a Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 17:49:48 +0530 Subject: [PATCH 063/107] Create Documentation_issue_template.yaml --- .../Documentation_issue_template.yaml | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/Documentation_issue_template.yaml diff --git a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml new file mode 100644 index 00000000..f7025e01 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml @@ -0,0 +1,106 @@ +name: Build/Install Issue +description: Use this template to report build/install issue +labels: 'type:doc-bug' +body: + - type: markdown + id: link + attributes: + value: Thank you for submitting a MediaPipe documentation issue. The MediaPipe docs are open source! To get involved, read the documentation Contributor Guide + - type: markdown + id: url + attributes: + label: URL(s) with the issue + description: Please provide a link to the documentation entry, for example: https://github.com/google/mediapipe/blob/master/docs/solutions/face_mesh.md#models + - type: input + id: compilerversion + attributes: + label: Compiler version + description: + placeholder: e.g. gcc/g++ 8 /Apple clang version 12.0.0 + validations: + required: false + - type: input + id: programminglang + attributes: + label: Programming Language and version + description: + placeholder: e.g. C++ 14, Python 3.6, Java + validations: + required: true + - type: input + id: virtualenv + attributes: + label: Installed using virtualenv? pip? Conda?(if python) + description: + placeholder: + validations: + required: false + - type: input + id: mediapipever + attributes: + label: MediaPipe version + description: + placeholder: e.g. 0.8.11, 0.9.1 + validations: + required: false + - type: input + id: bazelver + attributes: + label: Bazel version + description: + placeholder: e.g. 5.0, 5.1 + validations: + required: false + - type: input + id: xcodeversion + attributes: + label: XCode and Tulsi versions(if iOS) + description: + placeholder: + validations: + required: false + - type: input + id: sdkndkversion + attributes: + label: Android SDK and NDK versions(if android) + description: + placeholder: + validations: + required: false + - type: dropdown + id: androidaar + attributes: + label: Android AAR(if android) + options: + - 'Yes' + - 'No' + validations: + required: false + - type: input + id: opencvversion + attributes: + label: OpenCV version(if running on desktop) + description: + placeholder: + validations: + required: false + - type: textarea + id: what-happened + attributes: + label: Describe the problem + description: Provide the exact sequence of commands / steps that you executed before running into the [problem](https://google.github.io/mediapipe/getting_started/getting_started.html) + placeholder: Tell us what you see! + value: "A bug happened!" + render: shell + validations: + required: true + - type: textarea + id: code-to-reproduce + attributes: + label: Complete Logs + description: Include Complete Log information or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached + placeholder: Tell us what you see! + value: + render: shell + validations: + required: true From b0ca0bce4fb6d2dabd379c21c1a4a96a66fd5620 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 17:51:04 +0530 Subject: [PATCH 064/107] Update Documentation_issue_template.yaml --- .github/ISSUE_TEMPLATE/Documentation_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml index f7025e01..7bf13315 100644 --- a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml @@ -10,7 +10,7 @@ body: id: url attributes: label: URL(s) with the issue - description: Please provide a link to the documentation entry, for example: https://github.com/google/mediapipe/blob/master/docs/solutions/face_mesh.md#models + description: Please provide a link to the documentation entry, for example https://github.com/google/mediapipe/blob/master/docs/solutions/face_mesh.md#models - type: input id: compilerversion attributes: From eed7c954f81e3318904674d5aba8a35bc7e52d08 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 17:53:09 +0530 Subject: [PATCH 065/107] Update Documentation_issue_template.yaml --- .github/ISSUE_TEMPLATE/Documentation_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml index 7bf13315..749eceba 100644 --- a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml @@ -9,7 +9,7 @@ body: - type: markdown id: url attributes: - label: URL(s) with the issue + labels: URL(s) with the issue description: Please provide a link to the documentation entry, for example https://github.com/google/mediapipe/blob/master/docs/solutions/face_mesh.md#models - type: input id: compilerversion From 2ced054d81a086bff9c80623777d70444da0c5a3 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 17:53:26 +0530 Subject: [PATCH 066/107] Update Documentation_issue_template.yaml --- .github/ISSUE_TEMPLATE/Documentation_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml index 749eceba..315344b8 100644 --- a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml @@ -9,7 +9,7 @@ body: - type: markdown id: url attributes: - labels: URL(s) with the issue + value: URL(s) with the issue description: Please provide a link to the documentation entry, for example https://github.com/google/mediapipe/blob/master/docs/solutions/face_mesh.md#models - type: input id: compilerversion From 642922afcb27917208354d3888805d178615387f Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 17:55:38 +0530 Subject: [PATCH 067/107] Update Documentation_issue_template.yaml --- .github/ISSUE_TEMPLATE/Documentation_issue_template.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml index 315344b8..fe5a06dd 100644 --- a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml @@ -9,8 +9,7 @@ body: - type: markdown id: url attributes: - value: URL(s) with the issue - description: Please provide a link to the documentation entry, for example https://github.com/google/mediapipe/blob/master/docs/solutions/face_mesh.md#models + value: URL(s) with the issue Please provide a link to the documentation entry, for example https://github.com/google/mediapipe/blob/master/docs/solutions/face_mesh.md#models - type: input id: compilerversion attributes: From ab11f852b094f3059d06af8f3b38b35549a13ba4 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 17:55:52 +0530 Subject: [PATCH 068/107] Update Documentation_issue_template.yaml --- .github/ISSUE_TEMPLATE/Documentation_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml index fe5a06dd..5df52a00 100644 --- a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml @@ -1,4 +1,4 @@ -name: Build/Install Issue +name: Build/Install Issue1 description: Use this template to report build/install issue labels: 'type:doc-bug' body: From 8550dd86e551bc921567805ce283c573b08c19dc Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 17:57:00 +0530 Subject: [PATCH 069/107] Update Documentation_issue_template.yaml --- .github/ISSUE_TEMPLATE/Documentation_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml index 5df52a00..90cbaaa8 100644 --- a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml @@ -9,7 +9,7 @@ body: - type: markdown id: url attributes: - value: URL(s) with the issue Please provide a link to the documentation entry, for example https://github.com/google/mediapipe/blob/master/docs/solutions/face_mesh.md#models + label: URL(s) with the issue Please provide a link to the documentation entry, for example https://github.com/google/mediapipe/blob/master/docs/solutions/face_mesh.md#models - type: input id: compilerversion attributes: From a6ad8b521f12b82860da4213ccefea77990e74e8 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 17:57:28 +0530 Subject: [PATCH 070/107] Update Documentation_issue_template.yaml --- .github/ISSUE_TEMPLATE/Documentation_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml index 90cbaaa8..5df52a00 100644 --- a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml @@ -9,7 +9,7 @@ body: - type: markdown id: url attributes: - label: URL(s) with the issue Please provide a link to the documentation entry, for example https://github.com/google/mediapipe/blob/master/docs/solutions/face_mesh.md#models + value: URL(s) with the issue Please provide a link to the documentation entry, for example https://github.com/google/mediapipe/blob/master/docs/solutions/face_mesh.md#models - type: input id: compilerversion attributes: From 9d55f14bf7357c046e75ff4147afab9f9ffbf5d6 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 17:59:28 +0530 Subject: [PATCH 071/107] Update Documentation_issue_template.yaml --- .github/ISSUE_TEMPLATE/Documentation_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml index 5df52a00..1affd704 100644 --- a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml @@ -13,7 +13,7 @@ body: - type: input id: compilerversion attributes: - label: Compiler version + label: Description of issue (what needs changing): description: placeholder: e.g. gcc/g++ 8 /Apple clang version 12.0.0 validations: From 6688b127180d4445e6f9d53e6b98d67e5c3b556f Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 17:59:39 +0530 Subject: [PATCH 072/107] Update Documentation_issue_template.yaml --- .github/ISSUE_TEMPLATE/Documentation_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml index 1affd704..09589d36 100644 --- a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml @@ -13,7 +13,7 @@ body: - type: input id: compilerversion attributes: - label: Description of issue (what needs changing): + label: Description of issue (what needs changing) description: placeholder: e.g. gcc/g++ 8 /Apple clang version 12.0.0 validations: From e5789396f3b9745dbb32ddad3603316f51082ff1 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 18:00:16 +0530 Subject: [PATCH 073/107] Update Documentation_issue_template.yaml --- .github/ISSUE_TEMPLATE/Documentation_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml index 09589d36..80e0eb45 100644 --- a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml @@ -13,7 +13,7 @@ body: - type: input id: compilerversion attributes: - label: Description of issue (what needs changing) + label: Description of issue (what needs changing)/Kinds of documentation problems description: placeholder: e.g. gcc/g++ 8 /Apple clang version 12.0.0 validations: From e93650f782ea2e80e0b33cfd01b77c6c79a3a66c Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 18:03:17 +0530 Subject: [PATCH 074/107] Update Documentation_issue_template.yaml --- .../ISSUE_TEMPLATE/Documentation_issue_template.yaml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml index 80e0eb45..64c7cec7 100644 --- a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml @@ -10,14 +10,10 @@ body: id: url attributes: value: URL(s) with the issue Please provide a link to the documentation entry, for example https://github.com/google/mediapipe/blob/master/docs/solutions/face_mesh.md#models - - type: input - id: compilerversion + - type: markdown + id: description attributes: - label: Description of issue (what needs changing)/Kinds of documentation problems - description: - placeholder: e.g. gcc/g++ 8 /Apple clang version 12.0.0 - validations: - required: false + values: "Description of issue (what needs changing)" - type: input id: programminglang attributes: From acadf74f6cd6a72fa7cc1619821b08d8ff0ac33d Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 18:03:32 +0530 Subject: [PATCH 075/107] Update Documentation_issue_template.yaml --- .github/ISSUE_TEMPLATE/Documentation_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml index 64c7cec7..6c99d3a7 100644 --- a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml @@ -13,7 +13,7 @@ body: - type: markdown id: description attributes: - values: "Description of issue (what needs changing)" + value: "Description of issue (what needs changing)" - type: input id: programminglang attributes: From 1004fb48c775daa67e93be0506a7f52894d3afb2 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 18:04:07 +0530 Subject: [PATCH 076/107] Update Documentation_issue_template.yaml --- .github/ISSUE_TEMPLATE/Documentation_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml index 6c99d3a7..19854f5f 100644 --- a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml @@ -13,7 +13,7 @@ body: - type: markdown id: description attributes: - value: "Description of issue (what needs changing)" + value: "##Description of issue (what needs changing)" - type: input id: programminglang attributes: From e290f9cf30a6e47857eeb905ea39fcb82c236ff4 Mon Sep 17 00:00:00 2001 From: Prianka Liz Kariat Date: Fri, 3 Feb 2023 18:05:49 +0530 Subject: [PATCH 077/107] Added a note about swift test coverage in iOS text embedder tests --- .../ios/test/text/text_embedder/TextEmbedderTests.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mediapipe/tasks/ios/test/text/text_embedder/TextEmbedderTests.swift b/mediapipe/tasks/ios/test/text/text_embedder/TextEmbedderTests.swift index bd7f6d5d..98d83a98 100644 --- a/mediapipe/tasks/ios/test/text/text_embedder/TextEmbedderTests.swift +++ b/mediapipe/tasks/ios/test/text/text_embedder/TextEmbedderTests.swift @@ -17,6 +17,11 @@ import XCTest @testable import MPPTextEmbedder +/** These tests are only for validating the Swift function signatures of the TextEmbedder. + * Objective C tests of the TextEmbedder provide more coverage with unit tests for + * different models and text embedder options. They can be found here: + * /mediapipe/tasks/ios/test/text/text_embedder/MPPTextEmbedderTests.m + */ class TextEmbedderTests: XCTestCase { static let bundle = Bundle(for: TextEmbedderTests.self) From eeaa011998c5c0133369153c5f92bdd3739580c7 Mon Sep 17 00:00:00 2001 From: Prianka Liz Kariat Date: Fri, 3 Feb 2023 18:06:05 +0530 Subject: [PATCH 078/107] Updated documentation of iOS text embedder tests --- .../text/text_embedder/MPPTextEmbedderTests.m | 103 +++++++++--------- 1 file changed, 51 insertions(+), 52 deletions(-) diff --git a/mediapipe/tasks/ios/test/text/text_embedder/MPPTextEmbedderTests.m b/mediapipe/tasks/ios/test/text/text_embedder/MPPTextEmbedderTests.m index 0468c9b8..2fa0f58f 100644 --- a/mediapipe/tasks/ios/test/text/text_embedder/MPPTextEmbedderTests.m +++ b/mediapipe/tasks/ios/test/text/text_embedder/MPPTextEmbedderTests.m @@ -38,24 +38,22 @@ static const float kSimilarityDiffTolerance = 1e-4; XCTAssertNotNil(textEmbedderResult.embeddingResult); \ XCTAssertEqual(textEmbedderResult.embeddingResult.embeddings.count, 1); -#define AssertEmbeddingType(embedding, quantized) \ - if (quantized) { \ - XCTAssertNil(embedding.floatEmbedding); \ - XCTAssertNotNil(embedding.quantizedEmbedding); \ - } \ - else { \ - XCTAssertNotNil(embedding.floatEmbedding); \ - XCTAssertNil(embedding.quantizedEmbedding);\ - } +#define AssertEmbeddingType(embedding, quantized) \ + if (quantized) { \ + XCTAssertNil(embedding.floatEmbedding); \ + XCTAssertNotNil(embedding.quantizedEmbedding); \ + } else { \ + XCTAssertNotNil(embedding.floatEmbedding); \ + XCTAssertNil(embedding.quantizedEmbedding); \ + } #define AssertEmbeddingHasExpectedValues(embedding, expectedLength, expectedFirstValue, quantize) \ - XCTAssertEqual(embedding.count, expectedLength); \ - if (quantize) { \ - XCTAssertEqual(embedding[0].charValue, expectedFirstValue); \ - } \ - else { \ + XCTAssertEqual(embedding.count, expectedLength); \ + if (quantize) { \ + XCTAssertEqual(embedding[0].charValue, expectedFirstValue); \ + } else { \ XCTAssertEqualWithAccuracy(embedding[0].floatValue, expectedFirstValue, kFloatDiffTolerance); \ - } \ + } @interface MPPTextEmbedderTests : XCTestCase @end @@ -94,41 +92,39 @@ static const float kSimilarityDiffTolerance = 1e-4; firstValue:(float)firstValue { MPPTextEmbedderResult *embedderResult = [textEmbedder embedText:text error:nil]; AssertTextEmbedderResultHasOneEmbedding(embedderResult); - - AssertEmbeddingType( - embedderResult.embeddingResult.embeddings[0], // embedding - NO // quantized + + AssertEmbeddingType(embedderResult.embeddingResult.embeddings[0], // embedding + NO // quantized ); - + AssertEmbeddingHasExpectedValues( - embedderResult.embeddingResult.embeddings[0].floatEmbedding, // embedding - embeddingCount, // expectedLength - firstValue, // expectedFirstValue - NO // quantize + embedderResult.embeddingResult.embeddings[0].floatEmbedding, // embedding + embeddingCount, // expectedLength + firstValue, // expectedFirstValue + NO // quantize ); - + return embedderResult.embeddingResult.embeddings[0]; } -- (NSArray*)assertQuantizedEmbeddingResultsOfEmbedText:(NSString *)text - usingTextEmbedder:(MPPTextEmbedder *)textEmbedder - hasCount:(NSUInteger)embeddingCount - firstValue:(char)firstValue { +- (NSArray *)assertQuantizedEmbeddingResultsOfEmbedText:(NSString *)text + usingTextEmbedder:(MPPTextEmbedder *)textEmbedder + hasCount:(NSUInteger)embeddingCount + firstValue:(char)firstValue { MPPTextEmbedderResult *embedderResult = [textEmbedder embedText:text error:nil]; AssertTextEmbedderResultHasOneEmbedding(embedderResult); - - AssertEmbeddingType( - embedderResult.embeddingResult.embeddings[0], // embedding - YES // quantized + + AssertEmbeddingType(embedderResult.embeddingResult.embeddings[0], // embedding + YES // quantized ); - + AssertEmbeddingHasExpectedValues( - embedderResult.embeddingResult.embeddings[0].quantizedEmbedding, // embedding - embeddingCount, // expectedLength - firstValue, // expectedFirstValue - YES // quantize + embedderResult.embeddingResult.embeddings[0].quantizedEmbedding, // embedding + embeddingCount, // expectedLength + firstValue, // expectedFirstValue + YES // quantize ); - + return embedderResult.embeddingResult.embeddings[0]; } @@ -148,9 +144,8 @@ static const float kSimilarityDiffTolerance = 1e-4; @"INVALID_ARGUMENT: ExternalFile must specify at least one of 'file_content', " @"'file_name', 'file_pointer_meta' or 'file_descriptor_meta'." }]; - AssertEqualErrors( - error, // error - expectedError // expectedError + AssertEqualErrors(error, // error + expectedError // expectedError ); } @@ -228,17 +223,21 @@ static const float kSimilarityDiffTolerance = 1e-4; MPPTextEmbedder *textEmbedder = [[MPPTextEmbedder alloc] initWithOptions:options error:nil]; XCTAssertNotNil(textEmbedder); - MPPEmbedding *embedding1 = [self assertQuantizedEmbeddingResultsOfEmbedText:@"it's a charming and often affecting journey" - usingTextEmbedder:textEmbedder - hasCount:512 - firstValue:127]; + MPPEmbedding *embedding1 = [self + assertQuantizedEmbeddingResultsOfEmbedText:@"it's a charming and often affecting journey" + usingTextEmbedder:textEmbedder + hasCount:512 + firstValue:127]; - MPPEmbedding *embedding2 = [self assertQuantizedEmbeddingResultsOfEmbedText:@"what a great and fantastic trip" - usingTextEmbedder:textEmbedder - hasCount:512 - firstValue:127]; - NSNumber *cosineSimilarity = [MPPTextEmbedder cosineSimilarityBetweenEmbedding1:embedding1 andEmbedding2:embedding2 error:nil]; - XCTAssertEqualWithAccuracy(cosineSimilarity.doubleValue, 0.864113, kSimilarityDiffTolerance); + MPPEmbedding *embedding2 = + [self assertQuantizedEmbeddingResultsOfEmbedText:@"what a great and fantastic trip" + usingTextEmbedder:textEmbedder + hasCount:512 + firstValue:127]; + NSNumber *cosineSimilarity = [MPPTextEmbedder cosineSimilarityBetweenEmbedding1:embedding1 + andEmbedding2:embedding2 + error:nil]; + XCTAssertEqualWithAccuracy(cosineSimilarity.doubleValue, 0.864113, kSimilarityDiffTolerance); } @end From 7661114a5263983b809ad8215bb3c77bae575e69 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 18:07:39 +0530 Subject: [PATCH 079/107] Update Documentation_issue_template.yaml --- .github/ISSUE_TEMPLATE/Documentation_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml index 19854f5f..3aa604a9 100644 --- a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml @@ -13,7 +13,7 @@ body: - type: markdown id: description attributes: - value: "##Description of issue (what needs changing)" + value: **Description of issue (what needs changing)** - type: input id: programminglang attributes: From c493c1a4ef72a60cb606c49f6011f9fd1255864c Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 18:08:55 +0530 Subject: [PATCH 080/107] Update Documentation_issue_template.yaml --- .github/ISSUE_TEMPLATE/Documentation_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml index 3aa604a9..347557a3 100644 --- a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml @@ -13,7 +13,7 @@ body: - type: markdown id: description attributes: - value: **Description of issue (what needs changing)** + value: #Description of issue (what needs changing) - type: input id: programminglang attributes: From a2189c0143831fdcc2458f40e165d271d39ff309 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 18:09:16 +0530 Subject: [PATCH 081/107] Update Documentation_issue_template.yaml --- .github/ISSUE_TEMPLATE/Documentation_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml index 347557a3..2acbc9ae 100644 --- a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml @@ -13,7 +13,7 @@ body: - type: markdown id: description attributes: - value: #Description of issue (what needs changing) + value: Description of issue (what needs changing) - type: input id: programminglang attributes: From ba4b5160cdc28313b217b59ff96141d075819457 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 18:10:18 +0530 Subject: [PATCH 082/107] Update Documentation_issue_template.yaml --- .github/ISSUE_TEMPLATE/Documentation_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml index 2acbc9ae..8bdbb7d3 100644 --- a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml @@ -10,7 +10,7 @@ body: id: url attributes: value: URL(s) with the issue Please provide a link to the documentation entry, for example https://github.com/google/mediapipe/blob/master/docs/solutions/face_mesh.md#models - - type: markdown + - type: input id: description attributes: value: Description of issue (what needs changing) From 423359b478425ece1f04c3c508af465e9d97be10 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 18:10:47 +0530 Subject: [PATCH 083/107] Update Documentation_issue_template.yaml --- .github/ISSUE_TEMPLATE/Documentation_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml index 8bdbb7d3..2e5f90b0 100644 --- a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml @@ -13,7 +13,7 @@ body: - type: input id: description attributes: - value: Description of issue (what needs changing) + label: Description of issue (what needs changing) - type: input id: programminglang attributes: From 00592ac22d3589a78146b21540b09f48ecd2781e Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 18:11:55 +0530 Subject: [PATCH 084/107] Update Documentation_issue_template.yaml --- .github/ISSUE_TEMPLATE/Documentation_issue_template.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml index 2e5f90b0..ed816e39 100644 --- a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml @@ -14,6 +14,7 @@ body: id: description attributes: label: Description of issue (what needs changing) + description: Kinds of documentation problems - type: input id: programminglang attributes: From 57b84d8ab3211eca53bd6c0797ad1687a5959af2 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 18:12:23 +0530 Subject: [PATCH 085/107] Update Documentation_issue_template.yaml --- .github/ISSUE_TEMPLATE/Documentation_issue_template.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml index ed816e39..23257614 100644 --- a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml @@ -15,6 +15,7 @@ body: attributes: label: Description of issue (what needs changing) description: Kinds of documentation problems + label: asgdh - type: input id: programminglang attributes: From 212b0279d066316f40df2e07761d691023a79d62 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 18:24:36 +0530 Subject: [PATCH 086/107] Update Documentation_issue_template.yaml --- .../Documentation_issue_template.yaml | 104 +++++++----------- 1 file changed, 37 insertions(+), 67 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml index 23257614..51b9f7dd 100644 --- a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml @@ -1,4 +1,4 @@ -name: Build/Install Issue1 +name: documentation issue description: Use this template to report build/install issue labels: 'type:doc-bug' body: @@ -15,89 +15,59 @@ body: attributes: label: Description of issue (what needs changing) description: Kinds of documentation problems - label: asgdh - type: input - id: programminglang + id: clear_desc attributes: - label: Programming Language and version - description: - placeholder: e.g. C++ 14, Python 3.6, Java + label: Clear description + description: For example, why should someone use this method? How is it useful? validations: required: true - type: input - id: virtualenv + id: link attributes: - label: Installed using virtualenv? pip? Conda?(if python) - description: - placeholder: - validations: - required: false - - type: input - id: mediapipever - attributes: - label: MediaPipe version - description: - placeholder: e.g. 0.8.11, 0.9.1 - validations: - required: false - - type: input - id: bazelver - attributes: - label: Bazel version - description: - placeholder: e.g. 5.0, 5.1 + label: Correct links + description: Is the link to the source code correct? validations: required: false - type: input - id: xcodeversion + id: parameter attributes: - label: XCode and Tulsi versions(if iOS) - description: - placeholder: + label: Parameters defined + description: Are all parameters defined and formatted correctly? validations: - required: false + required: false - type: input - id: sdkndkversion + id: returns attributes: - label: Android SDK and NDK versions(if android) - description: - placeholder: + label: Returns defined + description: Are return values defined? validations: required: false - - type: dropdown - id: androidaar - attributes: - label: Android AAR(if android) - options: - - 'Yes' - - 'No' - validations: - required: false - type: input - id: opencvversion + id: raises attributes: - label: OpenCV version(if running on desktop) - description: - placeholder: + label: Raises listed and defined + description: Are the errors defined? For example, validations: - required: false - - type: textarea - id: what-happened + required: false + - type: input + id: usage attributes: - label: Describe the problem - description: Provide the exact sequence of commands / steps that you executed before running into the [problem](https://google.github.io/mediapipe/getting_started/getting_started.html) - placeholder: Tell us what you see! - value: "A bug happened!" - render: shell + label: Usage example + description: Is there a usage example? See the API guide-on how to write testable usage examples. validations: - required: true - - type: textarea - id: code-to-reproduce - attributes: - label: Complete Logs - description: Include Complete Log information or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached - placeholder: Tell us what you see! - value: - render: shell - validations: - required: true + required: false + - type: input + id: visual + attributes: + label: Request visuals, if applicable + description: Are there currently visuals? If not, will it clarify the content? + validations: + required: false + - type: input + id: pull + attributes: + label: Submit a pull request? + description: Are you planning to also submit a pull request to fix the issue? See the [docs](https://github.com/google/mediapipe/blob/master/CONTRIBUTING.md) + validations: + required: false From 681136a1d872e6351c5d6b5b031551791a40892b Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 18:25:47 +0530 Subject: [PATCH 087/107] Update Documentation_issue_template.yaml --- .../Documentation_issue_template.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml index 51b9f7dd..06e07d8b 100644 --- a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml @@ -57,14 +57,14 @@ body: description: Is there a usage example? See the API guide-on how to write testable usage examples. validations: required: false - - type: input - id: visual - attributes: - label: Request visuals, if applicable - description: Are there currently visuals? If not, will it clarify the content? - validations: + - type: input + id: visual + attributes: + label: Request visuals, if applicable + description: Are there currently visuals? If not, will it clarify the content? + validations: required: false - - type: input + - type: input id: pull attributes: label: Submit a pull request? From c0a360d8f4fff98ee96f6cb1a6aa77a23efb6f82 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 18:26:41 +0530 Subject: [PATCH 088/107] Update Documentation_issue_template.yaml --- .github/ISSUE_TEMPLATE/Documentation_issue_template.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml index 06e07d8b..ed9c9a74 100644 --- a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml @@ -64,10 +64,10 @@ body: description: Are there currently visuals? If not, will it clarify the content? validations: required: false - - type: input - id: pull - attributes: + - type: input + id: pull + attributes: label: Submit a pull request? description: Are you planning to also submit a pull request to fix the issue? See the [docs](https://github.com/google/mediapipe/blob/master/CONTRIBUTING.md) - validations: + validations: required: false From 5046c2c5ce50f89193574559bab46a78cedefd6b Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 18:26:53 +0530 Subject: [PATCH 089/107] Update Documentation_issue_template.yaml --- .github/ISSUE_TEMPLATE/Documentation_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml index ed9c9a74..f8e24f03 100644 --- a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml @@ -1,4 +1,4 @@ -name: documentation issue +name: Documentation issue description: Use this template to report build/install issue labels: 'type:doc-bug' body: From b10812a7e2aa14a07102e312a6c741aa8255570b Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 18:27:16 +0530 Subject: [PATCH 090/107] Update Documentation_issue_template.yaml --- .github/ISSUE_TEMPLATE/Documentation_issue_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml index f8e24f03..ce2d7956 100644 --- a/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml +++ b/.github/ISSUE_TEMPLATE/Documentation_issue_template.yaml @@ -1,5 +1,5 @@ name: Documentation issue -description: Use this template to report build/install issue +description: Use this template for documentation related issues. If this doesn’t look right, choose a different type. labels: 'type:doc-bug' body: - type: markdown From 77f3cd8942a6d29642f544d1831d2c9ae98eb4f0 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 19:06:09 +0530 Subject: [PATCH 091/107] Rename build.yaml to build.install_issue_template.yaml --- .../{build.yaml => build.install_issue_template.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/ISSUE_TEMPLATE/{build.yaml => build.install_issue_template.yaml} (100%) diff --git a/.github/ISSUE_TEMPLATE/build.yaml b/.github/ISSUE_TEMPLATE/build.install_issue_template.yaml similarity index 100% rename from .github/ISSUE_TEMPLATE/build.yaml rename to .github/ISSUE_TEMPLATE/build.install_issue_template.yaml From 2e8d615153b7fa0bcabeb632d6d979ac8611a66d Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 19:07:59 +0530 Subject: [PATCH 092/107] Rename model_maker_issue_template1.yaml to model_maker_issue_template.yaml --- ...maker_issue_template1.yaml => model_maker_issue_template.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/ISSUE_TEMPLATE/{model_maker_issue_template1.yaml => model_maker_issue_template.yaml} (100%) diff --git a/.github/ISSUE_TEMPLATE/model_maker_issue_template1.yaml b/.github/ISSUE_TEMPLATE/model_maker_issue_template.yaml similarity index 100% rename from .github/ISSUE_TEMPLATE/model_maker_issue_template1.yaml rename to .github/ISSUE_TEMPLATE/model_maker_issue_template.yaml From 51490ea5d95fa8a36910ca72a6620c5ee6b7089d Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 19:15:44 +0530 Subject: [PATCH 093/107] Delete 11-tasks-issue.md --- .github/ISSUE_TEMPLATE/11-tasks-issue.md | 25 ------------------------ 1 file changed, 25 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/11-tasks-issue.md diff --git a/.github/ISSUE_TEMPLATE/11-tasks-issue.md b/.github/ISSUE_TEMPLATE/11-tasks-issue.md deleted file mode 100644 index 4e9ae721..00000000 --- a/.github/ISSUE_TEMPLATE/11-tasks-issue.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -name: "Tasks Issue" -about: Use this template for assistance with using MediaPipe Tasks (developers.google.com/mediapipe/solutions) to deploy on-device ML solutions (e.g. gesture recognition etc.) on supported platforms. -labels: type:support - ---- -Please make sure that this is a [Tasks](https://developers.google.com/mediapipe/solutions) issue. - -**System information** (Please provide as much relevant information as possible) -- Have I written custom code (as opposed to using a stock example script provided in MediaPipe): -- OS Platform and Distribution (e.g., Linux Ubuntu 16.04, Android 11, iOS 14.4): -- MediaPipe Tasks SDK version: -- Task name (e.g. Object detection, Gesture recognition etc.): -- Programming Language and version ( e.g. C++, Python, Java): - -**Describe the expected behavior:** - -**Standalone code you may have used to try to get what you need :** - -If there is a problem, provide a reproducible test case that is the bare minimum necessary to generate the problem. If possible, please share a link to Colab, GitHub repo link or anything that we can use to reproduce the problem: - -**Other info / Complete Logs :** -Include any logs or source code that would be helpful to -diagnose the problem. If including tracebacks, please include the full -traceback. Large logs and files should be attached: From 1b535a4fd16ac2f2d18351ff1bca691b76acbc93 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 19:15:52 +0530 Subject: [PATCH 094/107] Delete 12-model-maker-issue.md --- .../ISSUE_TEMPLATE/12-model-maker-issue.md | 25 ------------------- 1 file changed, 25 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/12-model-maker-issue.md diff --git a/.github/ISSUE_TEMPLATE/12-model-maker-issue.md b/.github/ISSUE_TEMPLATE/12-model-maker-issue.md deleted file mode 100644 index 31e8d7f1..00000000 --- a/.github/ISSUE_TEMPLATE/12-model-maker-issue.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -name: "Model Maker Issue" -about: Use this template for assistance with using MediaPipe Model Maker (developers.google.com/mediapipe/solutions) to create custom on-device ML solutions. -labels: type:support - ---- -Please make sure that this is a [Model Maker](https://developers.google.com/mediapipe/solutions) issue. - -**System information** (Please provide as much relevant information as possible) -- Have I written custom code (as opposed to using a stock example script provided in MediaPipe): -- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): -- Python version (e.g. 3.8): -- [MediaPipe Model Maker version](https://pypi.org/project/mediapipe-model-maker/): -- Task name (e.g. Image classification, Gesture recognition etc.): - -**Describe the expected behavior:** - -**Standalone code you may have used to try to get what you need :** - -If there is a problem, provide a reproducible test case that is the bare minimum necessary to generate the problem. If possible, please share a link to Colab, GitHub repo link or anything that we can use to reproduce the problem: - -**Other info / Complete Logs :** -Include any logs or source code that would be helpful to -diagnose the problem. If including tracebacks, please include the full -traceback. Large logs and files should be attached: From d3bd5db1f8ed23ce10450ae8879024bfdb5ee81d Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 19:16:01 +0530 Subject: [PATCH 095/107] Delete 13-solution-issue.md --- .github/ISSUE_TEMPLATE/13-solution-issue.md | 26 --------------------- 1 file changed, 26 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/13-solution-issue.md diff --git a/.github/ISSUE_TEMPLATE/13-solution-issue.md b/.github/ISSUE_TEMPLATE/13-solution-issue.md deleted file mode 100644 index bf0d613c..00000000 --- a/.github/ISSUE_TEMPLATE/13-solution-issue.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -name: "Solution (legacy) Issue" -about: Use this template for assistance with a specific Mediapipe solution (google.github.io/mediapipe/solutions) such as "Pose", including inference model usage/training, solution-specific calculators etc. -labels: type:support - ---- -Please make sure that this is a [solution](https://google.github.io/mediapipe/solutions/solutions.html) issue. - -**System information** (Please provide as much relevant information as possible) -- Have I written custom code (as opposed to using a stock example script provided in Mediapipe): -- OS Platform and Distribution (e.g., Linux Ubuntu 16.04, Android 11, iOS 14.4): -- [MediaPipe version](https://github.com/google/mediapipe/releases): -- Bazel version: -- Solution (e.g. FaceMesh, Pose, Holistic): -- Programming Language and version ( e.g. C++, Python, Java): - -**Describe the expected behavior:** - -**Standalone code you may have used to try to get what you need :** - -If there is a problem, provide a reproducible test case that is the bare minimum necessary to generate the problem. If possible, please share a link to Colab/repo link /any notebook: - -**Other info / Complete Logs :** -Include any logs or source code that would be helpful to -diagnose the problem. If including tracebacks, please include the full -traceback. Large logs and files should be attached: From 4e47081d12c77f86273324322df716bcc137b4c7 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 19:16:16 +0530 Subject: [PATCH 096/107] Delete 14-studio-issue.md --- .github/ISSUE_TEMPLATE/14-studio-issue.md | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/14-studio-issue.md diff --git a/.github/ISSUE_TEMPLATE/14-studio-issue.md b/.github/ISSUE_TEMPLATE/14-studio-issue.md deleted file mode 100644 index 5942b1eb..00000000 --- a/.github/ISSUE_TEMPLATE/14-studio-issue.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -name: "Studio Issue" -about: Use this template for assistance with the MediaPipe Studio application. -labels: type:support - ---- -Please make sure that this is a MediaPipe Studio issue. - -**System information** (Please provide as much relevant information as possible) -- OS Platform and Distribution (e.g., Linux Ubuntu 16.04, Android 11, iOS 14.4): -- Browser and Version -- Any microphone or camera hardware -- URL that shows the problem - -**Describe the expected behavior:** - -**Other info / Complete Logs :** -Include any js console logs that would be helpful to diagnose the problem. -Large logs and files should be attached: From dd8d8ae42257f332e6cb18128c427cf2c811d73c Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 19:16:26 +0530 Subject: [PATCH 097/107] Delete 20-documentation-issue.md --- .../ISSUE_TEMPLATE/20-documentation-issue.md | 51 ------------------- 1 file changed, 51 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/20-documentation-issue.md diff --git a/.github/ISSUE_TEMPLATE/20-documentation-issue.md b/.github/ISSUE_TEMPLATE/20-documentation-issue.md deleted file mode 100644 index 2918e03b..00000000 --- a/.github/ISSUE_TEMPLATE/20-documentation-issue.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -name: "Documentation Issue" -about: Use this template for documentation related issues -labels: type:docs - ---- -Thank you for submitting a MediaPipe documentation issue. -The MediaPipe docs are open source! To get involved, read the documentation Contributor Guide -## URL(s) with the issue: - -Please provide a link to the documentation entry, for example: https://github.com/google/mediapipe/blob/master/docs/solutions/face_mesh.md#models - -## Description of issue (what needs changing): - -Kinds of documentation problems: - -### Clear description - -For example, why should someone use this method? How is it useful? - -### Correct links - -Is the link to the source code correct? - -### Parameters defined -Are all parameters defined and formatted correctly? - -### Returns defined - -Are return values defined? - -### Raises listed and defined - -Are the errors defined? For example, - -### Usage example - -Is there a usage example? - -See the API guide: -on how to write testable usage examples. - -### Request visuals, if applicable - -Are there currently visuals? If not, will it clarify the content? - -### Submit a pull request? - -Are you planning to also submit a pull request to fix the issue? See the docs -https://github.com/google/mediapipe/blob/master/CONTRIBUTING.md - From 9b7081837c82a81159c10b8f53af07db55e432e6 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 19:16:35 +0530 Subject: [PATCH 098/107] Delete 30-bug-issue.md --- .github/ISSUE_TEMPLATE/30-bug-issue.md | 32 -------------------------- 1 file changed, 32 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/30-bug-issue.md diff --git a/.github/ISSUE_TEMPLATE/30-bug-issue.md b/.github/ISSUE_TEMPLATE/30-bug-issue.md deleted file mode 100644 index 996c06cf..00000000 --- a/.github/ISSUE_TEMPLATE/30-bug-issue.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: "Bug Issue" -about: Use this template for reporting a bug -labels: type:bug - ---- -Please make sure that this is a bug and also refer to the [troubleshooting](https://google.github.io/mediapipe/getting_started/troubleshooting.html), FAQ documentation before raising any issues. - -**System information** (Please provide as much relevant information as possible) - -- Have I written custom code (as opposed to using a stock example script provided in MediaPipe): -- OS Platform and Distribution (e.g., Linux Ubuntu 16.04, Android 11, iOS 14.4): -- Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: -- Browser and version (e.g. Google Chrome, Safari) if the issue happens on browser: -- Programming Language and version ( e.g. C++, Python, Java): -- [MediaPipe version](https://github.com/google/mediapipe/releases): -- Bazel version (if compiling from source): -- Solution ( e.g. FaceMesh, Pose, Holistic ): -- Android Studio, NDK, SDK versions (if issue is related to building in Android environment): -- Xcode & Tulsi version (if issue is related to building for iOS): - -**Describe the current behavior:** - -**Describe the expected behavior:** - -**Standalone code to reproduce the issue:** -Provide a reproducible test case that is the bare minimum necessary to replicate the problem. If possible, please share a link to Colab/repo link /any notebook: - -**Other info / Complete Logs :** - Include any logs or source code that would be helpful to -diagnose the problem. If including tracebacks, please include the full -traceback. Large logs and files should be attached From e7dff428faae6e5ceb37b2cc335682efe7763c73 Mon Sep 17 00:00:00 2001 From: kuaashish <98159216+kuaashish@users.noreply.github.com> Date: Fri, 3 Feb 2023 19:16:46 +0530 Subject: [PATCH 099/107] Delete 40-feature-request.md --- .github/ISSUE_TEMPLATE/40-feature-request.md | 24 -------------------- 1 file changed, 24 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/40-feature-request.md diff --git a/.github/ISSUE_TEMPLATE/40-feature-request.md b/.github/ISSUE_TEMPLATE/40-feature-request.md deleted file mode 100644 index 2e1aafc7..00000000 --- a/.github/ISSUE_TEMPLATE/40-feature-request.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -name: "Feature Request" -about: Use this template for raising a feature request -labels: type:feature - ---- -Please make sure that this is a feature request. - -**System information** (Please provide as much relevant information as possible) - -- MediaPipe Solution (you are using): -- Programming language : C++/typescript/Python/Objective C/Android Java -- Are you willing to contribute it (Yes/No): - - -**Describe the feature and the current behavior/state:** - -**Will this change the current api? How?** - -**Who will benefit with this feature?** - -**Please specify the use cases for this feature:** - -**Any Other info:** From 5a773397803b0049fe74b715c6fda74c20376465 Mon Sep 17 00:00:00 2001 From: MediaPipe Team Date: Mon, 6 Feb 2023 09:02:51 -0800 Subject: [PATCH 100/107] Internal change PiperOrigin-RevId: 507495569 --- mediapipe/framework/calculator_graph.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mediapipe/framework/calculator_graph.h b/mediapipe/framework/calculator_graph.h index 04f9de45..8d58ff31 100644 --- a/mediapipe/framework/calculator_graph.h +++ b/mediapipe/framework/calculator_graph.h @@ -53,14 +53,10 @@ #include "mediapipe/framework/port/status.h" #include "mediapipe/framework/scheduler.h" #include "mediapipe/framework/thread_pool_executor.pb.h" +#include "mediapipe/gpu/gpu_service.h" namespace mediapipe { -#if !MEDIAPIPE_DISABLE_GPU -class GpuResources; -struct GpuSharedData; -#endif // !MEDIAPIPE_DISABLE_GPU - typedef absl::StatusOr StatusOrPoller; // The class representing a DAG of calculator nodes. From daf0a76c8723f4f66247f0c38c8e8a7996f0e2fd Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Mon, 6 Feb 2023 09:41:44 -0800 Subject: [PATCH 101/107] Update TensorFlow to latest PiperOrigin-RevId: 507505016 --- WORKSPACE | 13 ++++++------- .../text_classifier/text_classifier_test.cc | 11 +++-------- .../org_tensorflow_compatibility_fixes.diff | 18 +++--------------- 3 files changed, 12 insertions(+), 30 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index e14473e5..6675acba 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -10,12 +10,11 @@ bind( http_archive( name = "bazel_skylib", - type = "tar.gz", + sha256 = "74d544d96f4a5bb630d465ca8bbcfe231e3594e5aae57e1edbf17a6eb3ca2506", urls = [ - "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz", - "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz", + "https://storage.googleapis.com/mirror.tensorflow.org/github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz", + "https://github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz", ], - sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c", ) load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") bazel_skylib_workspace() @@ -455,9 +454,9 @@ http_archive( ) # TensorFlow repo should always go after the other external dependencies. -# TF on 2022-08-10. -_TENSORFLOW_GIT_COMMIT = "af1d5bc4fbb66d9e6cc1cf89503014a99233583b" -_TENSORFLOW_SHA256 = "f85a5443264fc58a12d136ca6a30774b5bc25ceaf7d114d97f252351b3c3a2cb" +# TF on 2023-02-02. +_TENSORFLOW_GIT_COMMIT = "581840e12c7762a3deef66b25a549218ca1e3983" +_TENSORFLOW_SHA256 = "27f8f51e34b5065ac5411332eb4ad02f1d954257036d4863810d0c394d044bc9" http_archive( name = "org_tensorflow", urls = [ diff --git a/mediapipe/tasks/cc/text/text_classifier/text_classifier_test.cc b/mediapipe/tasks/cc/text/text_classifier/text_classifier_test.cc index 71f7b1f2..a175f218 100644 --- a/mediapipe/tasks/cc/text/text_classifier/text_classifier_test.cc +++ b/mediapipe/tasks/cc/text/text_classifier/text_classifier_test.cc @@ -251,13 +251,8 @@ TEST_F(TextClassifierTest, BertLongPositive) { TextClassifierResult expected; std::vector categories; -// Predicted scores are slightly different across platforms. -#ifdef __APPLE__ - categories.push_back( - {/*index=*/1, /*score=*/0.974181, /*category_name=*/"positive"}); - categories.push_back( - {/*index=*/0, /*score=*/0.025819, /*category_name=*/"negative"}); -#elif defined _WIN32 +// Predicted scores are slightly different on Windows. +#ifdef _WIN32 categories.push_back( {/*index=*/1, /*score=*/0.976686, /*category_name=*/"positive"}); categories.push_back( @@ -267,7 +262,7 @@ TEST_F(TextClassifierTest, BertLongPositive) { {/*index=*/1, /*score=*/0.985889, /*category_name=*/"positive"}); categories.push_back( {/*index=*/0, /*score=*/0.014112, /*category_name=*/"negative"}); -#endif // __APPLE__ +#endif // _WIN32 expected.classifications.emplace_back( Classifications{/*categories=*/categories, diff --git a/third_party/org_tensorflow_compatibility_fixes.diff b/third_party/org_tensorflow_compatibility_fixes.diff index 1d74d45a..fa508209 100644 --- a/third_party/org_tensorflow_compatibility_fixes.diff +++ b/third_party/org_tensorflow_compatibility_fixes.diff @@ -1,7 +1,7 @@ -diff --git a/tensorflow/core/lib/monitoring/percentile_sampler.cc b/tensorflow/core/lib/monitoring/percentile_sampler.cc +diff --git a/tensorflow/tsl/lib/monitoring/percentile_sampler.cc b/tensorflow/tsl/lib/monitoring/percentile_sampler.cc index b7c22ae77ba..d0ba7b48b4b 100644 ---- a/tensorflow/core/lib/monitoring/percentile_sampler.cc -+++ b/tensorflow/core/lib/monitoring/percentile_sampler.cc +--- a/tensorflow/tsl/lib/monitoring/percentile_sampler.cc ++++ b/tensorflow/tsl/lib/monitoring/percentile_sampler.cc @@ -29,7 +29,8 @@ namespace monitoring { void PercentileSamplerCell::Add(double sample) { uint64 nstime = EnvTime::NowNanos(); @@ -23,18 +23,6 @@ index b7c22ae77ba..d0ba7b48b4b 100644 pct_samples.points.push_back(pct); } } -diff --git a/tensorflow/core/platform/test.h b/tensorflow/core/platform/test.h -index b598b6ee1e4..51c013a2d62 100644 ---- a/tensorflow/core/platform/test.h -+++ b/tensorflow/core/platform/test.h -@@ -40,7 +40,6 @@ limitations under the License. - // better error messages, more maintainable tests and more test coverage. - #if !defined(PLATFORM_GOOGLE) && !defined(PLATFORM_GOOGLE_ANDROID) && \ - !defined(PLATFORM_CHROMIUMOS) --#include - #include - #include - #endif diff --git a/third_party/eigen3/eigen_archive.BUILD b/third_party/eigen3/eigen_archive.BUILD index 5514f774c35..1a38f76f4e9 100644 --- a/third_party/eigen3/eigen_archive.BUILD From f4b0cf1cffe3f38dc7c43c0b65e502074733d33d Mon Sep 17 00:00:00 2001 From: Jiuqiang Tang Date: Mon, 6 Feb 2023 11:45:55 -0800 Subject: [PATCH 102/107] Internal change PiperOrigin-RevId: 507540898 --- mediapipe/tasks/java/BUILD | 4 ++++ .../com/google/mediapipe/tasks/audio/BUILD | 5 ++++ .../com/google/mediapipe/tasks/text/BUILD | 5 ++++ .../com/google/mediapipe/tasks/vision/BUILD | 5 ++++ mediapipe/tasks/java/version_script.lds | 24 +++++++++++++++++++ 5 files changed, 43 insertions(+) create mode 100644 mediapipe/tasks/java/version_script.lds diff --git a/mediapipe/tasks/java/BUILD b/mediapipe/tasks/java/BUILD index 7e628326..13a319bb 100644 --- a/mediapipe/tasks/java/BUILD +++ b/mediapipe/tasks/java/BUILD @@ -13,3 +13,7 @@ # limitations under the License. licenses(["notice"]) + +exports_files([ + "version_script.lds", +]) diff --git a/mediapipe/tasks/java/com/google/mediapipe/tasks/audio/BUILD b/mediapipe/tasks/java/com/google/mediapipe/tasks/audio/BUILD index e5d472e8..50ee56f6 100644 --- a/mediapipe/tasks/java/com/google/mediapipe/tasks/audio/BUILD +++ b/mediapipe/tasks/java/com/google/mediapipe/tasks/audio/BUILD @@ -34,12 +34,17 @@ android_library( # The native library of all MediaPipe audio tasks. cc_binary( name = "libmediapipe_tasks_audio_jni.so", + linkopts = [ + "-Wl,--no-undefined", + "-Wl,--version-script,$(location //mediapipe/tasks/java:version_script.lds)", + ], linkshared = 1, linkstatic = 1, deps = [ "//mediapipe/java/com/google/mediapipe/framework/jni:mediapipe_framework_jni", "//mediapipe/tasks/cc/audio/audio_classifier:audio_classifier_graph", "//mediapipe/tasks/cc/audio/audio_embedder:audio_embedder_graph", + "//mediapipe/tasks/java:version_script.lds", "//mediapipe/tasks/java/com/google/mediapipe/tasks/core/jni:model_resources_cache_jni", ], ) diff --git a/mediapipe/tasks/java/com/google/mediapipe/tasks/text/BUILD b/mediapipe/tasks/java/com/google/mediapipe/tasks/text/BUILD index 31cd2c89..69bc2ab1 100644 --- a/mediapipe/tasks/java/com/google/mediapipe/tasks/text/BUILD +++ b/mediapipe/tasks/java/com/google/mediapipe/tasks/text/BUILD @@ -19,12 +19,17 @@ package(default_visibility = ["//visibility:public"]) # The native library of all MediaPipe text tasks. cc_binary( name = "libmediapipe_tasks_text_jni.so", + linkopts = [ + "-Wl,--no-undefined", + "-Wl,--version-script,$(location //mediapipe/tasks/java:version_script.lds)", + ], linkshared = 1, linkstatic = 1, deps = [ "//mediapipe/java/com/google/mediapipe/framework/jni:mediapipe_framework_jni", "//mediapipe/tasks/cc/text/text_classifier:text_classifier_graph", "//mediapipe/tasks/cc/text/text_embedder:text_embedder_graph", + "//mediapipe/tasks/java:version_script.lds", "//mediapipe/tasks/java/com/google/mediapipe/tasks/core/jni:model_resources_cache_jni", ], ) diff --git a/mediapipe/tasks/java/com/google/mediapipe/tasks/vision/BUILD b/mediapipe/tasks/java/com/google/mediapipe/tasks/vision/BUILD index 0c30d764..a0732495 100644 --- a/mediapipe/tasks/java/com/google/mediapipe/tasks/vision/BUILD +++ b/mediapipe/tasks/java/com/google/mediapipe/tasks/vision/BUILD @@ -36,6 +36,10 @@ android_library( # The native library of all MediaPipe vision tasks. cc_binary( name = "libmediapipe_tasks_vision_jni.so", + linkopts = [ + "-Wl,--no-undefined", + "-Wl,--version-script,$(location //mediapipe/tasks/java:version_script.lds)", + ], linkshared = 1, linkstatic = 1, deps = [ @@ -46,6 +50,7 @@ cc_binary( "//mediapipe/tasks/cc/vision/image_embedder:image_embedder_graph", "//mediapipe/tasks/cc/vision/image_segmenter:image_segmenter_graph", "//mediapipe/tasks/cc/vision/object_detector:object_detector_graph", + "//mediapipe/tasks/java:version_script.lds", "//mediapipe/tasks/java/com/google/mediapipe/tasks/core/jni:model_resources_cache_jni", ], ) diff --git a/mediapipe/tasks/java/version_script.lds b/mediapipe/tasks/java/version_script.lds new file mode 100644 index 00000000..08577b10 --- /dev/null +++ b/mediapipe/tasks/java/version_script.lds @@ -0,0 +1,24 @@ +VERS_1.0 { + # Export JNI and native C symbols. + global: + Java_com_google_mediapipe_framework_AndroidAssetUtil*; + Java_com_google_mediapipe_framework_AndroidPacketCreator*; + Java_com_google_mediapipe_framework_Graph_nativeAddMultiStreamCallback; + Java_com_google_mediapipe_framework_Graph_nativeAddPacketToInputStream; + Java_com_google_mediapipe_framework_Graph_nativeCloseAllPacketSources; + Java_com_google_mediapipe_framework_Graph_nativeCreateGraph; + Java_com_google_mediapipe_framework_Graph_nativeLoadBinaryGraph*; + Java_com_google_mediapipe_framework_Graph_nativeMovePacketToInputStream; + Java_com_google_mediapipe_framework_Graph_nativeReleaseGraph; + Java_com_google_mediapipe_framework_Graph_nativeStartRunningGraph; + Java_com_google_mediapipe_framework_Graph_nativeWaitUntilGraphDone; + Java_com_google_mediapipe_framework_Graph_nativeWaitUntilGraphIdle; + Java_com_google_mediapipe_framework_PacketCreator*; + Java_com_google_mediapipe_framework_PacketGetter*; + Java_com_google_mediapipe_framework_Packet*; + Java_com_google_mediapipe_tasks_core_ModelResourcesCache*; + + # Hide everything else. + local: + *; +}; From e2ef78433fd2dc51aeeb7cd056528f55098b58c0 Mon Sep 17 00:00:00 2001 From: Chris McClanahan Date: Mon, 6 Feb 2023 14:17:11 -0800 Subject: [PATCH 103/107] Add more filtering methods to detection filter calculator. PiperOrigin-RevId: 507581281 --- mediapipe/calculators/util/BUILD | 2 + .../util/filter_detections_calculator.cc | 46 ++++++++++-- .../util/filter_detections_calculator.proto | 6 ++ .../util/filter_detections_calculator_test.cc | 74 +++++++++++++++++-- 4 files changed, 116 insertions(+), 12 deletions(-) diff --git a/mediapipe/calculators/util/BUILD b/mediapipe/calculators/util/BUILD index a679a80f..6ac60d2c 100644 --- a/mediapipe/calculators/util/BUILD +++ b/mediapipe/calculators/util/BUILD @@ -167,6 +167,7 @@ cc_test( "//mediapipe/framework:calculator_framework", "//mediapipe/framework:calculator_runner", "//mediapipe/framework/formats:detection_cc_proto", + "//mediapipe/framework/formats:location_data_cc_proto", "//mediapipe/framework/port:gtest_main", "//mediapipe/framework/port:parse_text_proto", ], @@ -413,6 +414,7 @@ cc_library( ":filter_detections_calculator_cc_proto", "//mediapipe/framework:calculator_framework", "//mediapipe/framework/formats:detection_cc_proto", + "//mediapipe/framework/formats:location_data_cc_proto", "//mediapipe/framework/port:status", "@com_google_absl//absl/memory", ], diff --git a/mediapipe/calculators/util/filter_detections_calculator.cc b/mediapipe/calculators/util/filter_detections_calculator.cc index a1f23ba8..7b5bcca4 100644 --- a/mediapipe/calculators/util/filter_detections_calculator.cc +++ b/mediapipe/calculators/util/filter_detections_calculator.cc @@ -21,11 +21,13 @@ #include "mediapipe/calculators/util/filter_detections_calculator.pb.h" #include "mediapipe/framework/calculator_framework.h" #include "mediapipe/framework/formats/detection.pb.h" +#include "mediapipe/framework/formats/location_data.pb.h" #include "mediapipe/framework/port/status.h" namespace mediapipe { const char kInputDetectionsTag[] = "INPUT_DETECTIONS"; +const char kImageSizeTag[] = "IMAGE_SIZE"; // const char kOutputDetectionsTag[] = "OUTPUT_DETECTIONS"; // @@ -41,6 +43,10 @@ class FilterDetectionsCalculator : public CalculatorBase { cc->Inputs().Tag(kInputDetectionsTag).Set>(); cc->Outputs().Tag(kOutputDetectionsTag).Set>(); + if (cc->Inputs().HasTag(kImageSizeTag)) { + cc->Inputs().Tag(kImageSizeTag).Set>(); + } + return absl::OkStatus(); } @@ -48,21 +54,51 @@ class FilterDetectionsCalculator : public CalculatorBase { cc->SetOffset(TimestampDiff(0)); options_ = cc->Options(); + if (options_.has_min_pixel_size() || options_.has_max_pixel_size()) { + RET_CHECK(cc->Inputs().HasTag(kImageSizeTag)); + } + return absl::OkStatus(); } absl::Status Process(CalculatorContext* cc) final { const auto& input_detections = cc->Inputs().Tag(kInputDetectionsTag).Get>(); - auto output_detections = absl::make_unique>(); + int image_width = 0; + int image_height = 0; + if (cc->Inputs().HasTag(kImageSizeTag)) { + std::tie(image_width, image_height) = + cc->Inputs().Tag(kImageSizeTag).Get>(); + } + for (const Detection& detection : input_detections) { - RET_CHECK_GT(detection.score_size(), 0); - // Note: only score at index 0 supported. - if (detection.score(0) >= options_.min_score()) { - output_detections->push_back(detection); + if (options_.has_min_score()) { + RET_CHECK_GT(detection.score_size(), 0); + // Note: only score at index 0 supported. + if (detection.score(0) < options_.min_score()) { + continue; + } } + // Matches rect_size in + // mediapipe/calculators/util/rect_to_render_scale_calculator.cc + const float rect_size = + std::max(detection.location_data().relative_bounding_box().width() * + image_width, + detection.location_data().relative_bounding_box().height() * + image_height); + if (options_.has_min_pixel_size()) { + if (rect_size < options_.min_pixel_size()) { + continue; + } + } + if (options_.has_max_pixel_size()) { + if (rect_size > options_.max_pixel_size()) { + continue; + } + } + output_detections->push_back(detection); } cc->Outputs() diff --git a/mediapipe/calculators/util/filter_detections_calculator.proto b/mediapipe/calculators/util/filter_detections_calculator.proto index e16898c7..2b23236d 100644 --- a/mediapipe/calculators/util/filter_detections_calculator.proto +++ b/mediapipe/calculators/util/filter_detections_calculator.proto @@ -25,4 +25,10 @@ message FilterDetectionsCalculatorOptions { // Detections lower than this score get filtered out. optional float min_score = 1; + + // Detections smaller than this size *in pixels* get filtered out. + optional float min_pixel_size = 2; + + // Detections larger than this size *in pixels* get filtered out. + optional float max_pixel_size = 3; } diff --git a/mediapipe/calculators/util/filter_detections_calculator_test.cc b/mediapipe/calculators/util/filter_detections_calculator_test.cc index 58b3fe41..78093827 100644 --- a/mediapipe/calculators/util/filter_detections_calculator_test.cc +++ b/mediapipe/calculators/util/filter_detections_calculator_test.cc @@ -17,6 +17,7 @@ #include "mediapipe/framework/calculator_framework.h" #include "mediapipe/framework/calculator_runner.h" #include "mediapipe/framework/formats/detection.pb.h" +#include "mediapipe/framework/formats/location_data.pb.h" #include "mediapipe/framework/port/gmock.h" #include "mediapipe/framework/port/gtest.h" #include "mediapipe/framework/port/parse_text_proto.h" @@ -27,8 +28,8 @@ namespace { using ::testing::ElementsAre; -absl::Status RunGraph(std::vector& input_detections, - std::vector* output_detections) { +absl::Status RunScoreGraph(std::vector& input_detections, + std::vector* output_detections) { CalculatorRunner runner(R"pb( calculator: "FilterDetectionsCalculator" input_stream: "INPUT_DETECTIONS:input_detections" @@ -53,7 +54,7 @@ absl::Status RunGraph(std::vector& input_detections, return absl::OkStatus(); } -TEST(FilterDetectionsCalculatorTest, TestFilterDetections) { +TEST(FilterDetectionsCalculatorTest, TestFilterDetectionsScore) { std::vector input_detections; Detection d1, d2; d1.add_score(0.2); @@ -62,12 +63,12 @@ TEST(FilterDetectionsCalculatorTest, TestFilterDetections) { input_detections.push_back(d2); std::vector output_detections; - MP_EXPECT_OK(RunGraph(input_detections, &output_detections)); + MP_EXPECT_OK(RunScoreGraph(input_detections, &output_detections)); EXPECT_THAT(output_detections, ElementsAre(mediapipe::EqualsProto(d2))); } -TEST(FilterDetectionsCalculatorTest, TestFilterDetectionsMultiple) { +TEST(FilterDetectionsCalculatorTest, TestFilterDetectionsScoreMultiple) { std::vector input_detections; Detection d1, d2, d3, d4; d1.add_score(0.3); @@ -80,7 +81,7 @@ TEST(FilterDetectionsCalculatorTest, TestFilterDetectionsMultiple) { input_detections.push_back(d4); std::vector output_detections; - MP_EXPECT_OK(RunGraph(input_detections, &output_detections)); + MP_EXPECT_OK(RunScoreGraph(input_detections, &output_detections)); EXPECT_THAT(output_detections, ElementsAre(mediapipe::EqualsProto(d3), mediapipe::EqualsProto(d4))); @@ -90,10 +91,69 @@ TEST(FilterDetectionsCalculatorTest, TestFilterDetectionsEmpty) { std::vector input_detections; std::vector output_detections; - MP_EXPECT_OK(RunGraph(input_detections, &output_detections)); + MP_EXPECT_OK(RunScoreGraph(input_detections, &output_detections)); EXPECT_EQ(output_detections.size(), 0); } +absl::Status RunSizeGraph(std::vector& input_detections, + std::pair image_dimensions, + std::vector* output_detections) { + CalculatorRunner runner(R"pb( + calculator: "FilterDetectionsCalculator" + input_stream: "INPUT_DETECTIONS:input_detections" + input_stream: "IMAGE_SIZE:image_dimensions" + output_stream: "OUTPUT_DETECTIONS:output_detections" + options { + [mediapipe.FilterDetectionsCalculatorOptions.ext] { min_pixel_size: 50 } + } + )pb"); + + const Timestamp input_timestamp = Timestamp(0); + runner.MutableInputs() + ->Tag("INPUT_DETECTIONS") + .packets.push_back(MakePacket>(input_detections) + .At(input_timestamp)); + runner.MutableInputs() + ->Tag("IMAGE_SIZE") + .packets.push_back(MakePacket>(image_dimensions) + .At(input_timestamp)); + MP_RETURN_IF_ERROR(runner.Run()) << "Calculator run failed."; + + const std::vector& output_packets = + runner.Outputs().Tag("OUTPUT_DETECTIONS").packets; + RET_CHECK_EQ(output_packets.size(), 1); + + *output_detections = output_packets[0].Get>(); + return absl::OkStatus(); +} + +TEST(FilterDetectionsCalculatorTest, TestFilterDetectionsMinSize) { + std::vector input_detections; + Detection d1, d2, d3, d4, d5; + d1.mutable_location_data()->mutable_relative_bounding_box()->set_height(0.5); + d1.mutable_location_data()->mutable_relative_bounding_box()->set_width(0.49); + d2.mutable_location_data()->mutable_relative_bounding_box()->set_height(0.4); + d2.mutable_location_data()->mutable_relative_bounding_box()->set_width(0.4); + d3.mutable_location_data()->mutable_relative_bounding_box()->set_height(0.49); + d3.mutable_location_data()->mutable_relative_bounding_box()->set_width(0.5); + d4.mutable_location_data()->mutable_relative_bounding_box()->set_height(0.49); + d4.mutable_location_data()->mutable_relative_bounding_box()->set_width(0.49); + d5.mutable_location_data()->mutable_relative_bounding_box()->set_height(0.5); + d5.mutable_location_data()->mutable_relative_bounding_box()->set_width(0.5); + input_detections.push_back(d1); + input_detections.push_back(d2); + input_detections.push_back(d3); + input_detections.push_back(d4); + input_detections.push_back(d5); + + std::vector output_detections; + MP_EXPECT_OK(RunSizeGraph(input_detections, {100, 100}, &output_detections)); + + EXPECT_THAT(output_detections, ElementsAre(mediapipe::EqualsProto(d1), + mediapipe::EqualsProto(d3), + mediapipe::EqualsProto(d5))); +} + } // namespace } // namespace mediapipe From 9b040630a34af6885fba72cfb495ff9061521228 Mon Sep 17 00:00:00 2001 From: MediaPipe Team Date: Mon, 6 Feb 2023 20:49:42 -0800 Subject: [PATCH 104/107] Updating the Javascript API's FaceDetectionOptions since modelSelection is not a valid option for `setOptions()`. PiperOrigin-RevId: 507664805 --- docs/solutions/face_detection.md | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/docs/solutions/face_detection.md b/docs/solutions/face_detection.md index 9a56024c..3e9700c7 100644 --- a/docs/solutions/face_detection.md +++ b/docs/solutions/face_detection.md @@ -54,6 +54,25 @@ used for its improved inference speed. Please refer to the [model cards](./models.md#face_detection) for details. Default to `0` if not specified. +Note: Not available for JavaScript (use "model" instead). + +#### model + +A string value to indicate which model should be used. Use "short" to +select a short-range model that works best for faces within 2 meters from the +camera, and "full" for a full-range model best for faces within 5 meters. For +the full-range option, a sparse model is used for its improved inference speed. +Please refer to the model cards for details. Default to empty string. + +Note: Valid only for JavaScript solution. + +#### selfie_mode + +A boolean value to indicate whether to flip the images/video frames +horizontally or not. Default to `false`. + +Note: Valid only for JavaScript solution. + #### min_detection_confidence Minimum confidence value (`[0.0, 1.0]`) from the face detection model for the @@ -146,9 +165,9 @@ Please first see general [introduction](../getting_started/javascript.md) on MediaPipe in JavaScript, then learn more in the companion [web demo](#resources) and the following usage example. -Supported configuration options: - -* [modelSelection](#model_selection) +Supported face detection options: +* [selfieMode](#selfie_mode) +* [model](#model) * [minDetectionConfidence](#min_detection_confidence) ```html @@ -176,6 +195,7 @@ Supported configuration options: const videoElement = document.getElementsByClassName('input_video')[0]; const canvasElement = document.getElementsByClassName('output_canvas')[0]; const canvasCtx = canvasElement.getContext('2d'); +const drawingUtils = window; function onResults(results) { // Draw the overlays. @@ -199,7 +219,7 @@ const faceDetection = new FaceDetection({locateFile: (file) => { return `https://cdn.jsdelivr.net/npm/@mediapipe/face_detection@0.0/${file}`; }}); faceDetection.setOptions({ - modelSelection: 0, + model: 'short', minDetectionConfidence: 0.5 }); faceDetection.onResults(onResults); From 01c6a8b49be0ba9b97c2125f0082cc4e9ab27d3b Mon Sep 17 00:00:00 2001 From: Jiuqiang Tang Date: Tue, 7 Feb 2023 05:12:35 -0800 Subject: [PATCH 105/107] Add volume_gain_db option into AudioToTensorCalculator. PiperOrigin-RevId: 507748012 --- .../calculators/tensor/audio_to_tensor_calculator.cc | 9 ++++++++- .../calculators/tensor/audio_to_tensor_calculator.proto | 4 ++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/mediapipe/calculators/tensor/audio_to_tensor_calculator.cc b/mediapipe/calculators/tensor/audio_to_tensor_calculator.cc index 9cb23a39..8bd63d00 100644 --- a/mediapipe/calculators/tensor/audio_to_tensor_calculator.cc +++ b/mediapipe/calculators/tensor/audio_to_tensor_calculator.cc @@ -203,6 +203,7 @@ class AudioToTensorCalculator : public Node { std::unique_ptr> resampler_; Matrix sample_buffer_; int processed_buffer_cols_ = 0; + double gain_ = 1.0; // The internal state of the FFT library. PFFFT_Setup* fft_state_ = nullptr; @@ -278,7 +279,9 @@ absl::Status AudioToTensorCalculator::Open(CalculatorContext* cc) { padding_samples_after_ = options.padding_samples_after(); dft_tensor_format_ = options.dft_tensor_format(); flush_mode_ = options.flush_mode(); - + if (options.has_volume_gain_db()) { + gain_ = pow(10, options.volume_gain_db() / 20.0); + } RET_CHECK(kAudioSampleRateIn(cc).IsConnected() ^ !kAudioIn(cc).Header().IsEmpty()) << "Must either specify the time series header of the \"AUDIO\" stream " @@ -344,6 +347,10 @@ absl::Status AudioToTensorCalculator::Process(CalculatorContext* cc) { const Matrix& input = channels_match ? input_frame // Mono mixdown. : input_frame.colwise().mean(); + if (gain_ != 1.0) { + return stream_mode_ ? ProcessStreamingData(cc, input * gain_) + : ProcessNonStreamingData(cc, input * gain_); + } return stream_mode_ ? ProcessStreamingData(cc, input) : ProcessNonStreamingData(cc, input); } diff --git a/mediapipe/calculators/tensor/audio_to_tensor_calculator.proto b/mediapipe/calculators/tensor/audio_to_tensor_calculator.proto index aa3c1229..5b7d61bc 100644 --- a/mediapipe/calculators/tensor/audio_to_tensor_calculator.proto +++ b/mediapipe/calculators/tensor/audio_to_tensor_calculator.proto @@ -81,4 +81,8 @@ message AudioToTensorCalculatorOptions { WITH_DC_AND_NYQUIST = 3; } optional DftTensorFormat dft_tensor_format = 11 [default = WITH_NYQUIST]; + + // The volume gain, measured in dB. + // Scale the input audio amplitude by 10^(volume_gain_db/20). + optional double volume_gain_db = 12; } From e8caaeed610b1a55bc541d885fb3d9a0cf0b4b9b Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Tue, 7 Feb 2023 08:44:00 -0800 Subject: [PATCH 106/107] Update WASM files for 0.1.0-alpha-4 release PiperOrigin-RevId: 507792684 --- third_party/wasm_files.bzl | 48 +++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/third_party/wasm_files.bzl b/third_party/wasm_files.bzl index 017d8446..771625bf 100644 --- a/third_party/wasm_files.bzl +++ b/third_party/wasm_files.bzl @@ -12,72 +12,72 @@ def wasm_files(): http_file( name = "com_google_mediapipe_wasm_audio_wasm_internal_js", - sha256 = "d4d205d08e3e1b09662a9a358d0107e8a8023827ba9b6982a3777bb6c040f936", - urls = ["https://storage.googleapis.com/mediapipe-assets/wasm/audio_wasm_internal.js?generation=1673996821002628"], + sha256 = "65139435bd64ff2f7791145e3b84b90200ba97edf78ea2a0feff7964dd9f5b9a", + urls = ["https://storage.googleapis.com/mediapipe-assets/wasm/audio_wasm_internal.js?generation=1675786135168186"], ) http_file( name = "com_google_mediapipe_wasm_audio_wasm_internal_wasm", - sha256 = "1b2ffe82b0a25d20188237a724a7cad68d068818a7738f91c69c782314f55965", - urls = ["https://storage.googleapis.com/mediapipe-assets/wasm/audio_wasm_internal.wasm?generation=1673996823772372"], + sha256 = "b0aa60df4388ae2adee9ddf8e1f37932518266e088ecd531756e16d147ef5f7b", + urls = ["https://storage.googleapis.com/mediapipe-assets/wasm/audio_wasm_internal.wasm?generation=1675786138391747"], ) http_file( name = "com_google_mediapipe_wasm_audio_wasm_nosimd_internal_js", - sha256 = "1f367c2d667628b178251aec7fd464327351570edac4549450b11fb82f5f0fd4", - urls = ["https://storage.googleapis.com/mediapipe-assets/wasm/audio_wasm_nosimd_internal.js?generation=1673996826132845"], + sha256 = "5e5d4975f5bf74b0d5f5601954ea221d73c4ee4f845e331a43244896ce0423de", + urls = ["https://storage.googleapis.com/mediapipe-assets/wasm/audio_wasm_nosimd_internal.js?generation=1675786141452578"], ) http_file( name = "com_google_mediapipe_wasm_audio_wasm_nosimd_internal_wasm", - sha256 = "35c6ad888c06025dba1f9c8edb70e6c7be7e94e45dc2c0236a2fcfe61991dc44", - urls = ["https://storage.googleapis.com/mediapipe-assets/wasm/audio_wasm_nosimd_internal.wasm?generation=1673996828935550"], + sha256 = "c2aed5747c85431b5c4f44947811bf19ca964a60ac3d2aab33e15612840da0a9", + urls = ["https://storage.googleapis.com/mediapipe-assets/wasm/audio_wasm_nosimd_internal.wasm?generation=1675786144663772"], ) http_file( name = "com_google_mediapipe_wasm_text_wasm_internal_js", - sha256 = "68c0134e0b3cb986c3526cd645f74cc5a1f6ab19292276ca7d3558b89801e205", - urls = ["https://storage.googleapis.com/mediapipe-assets/wasm/text_wasm_internal.js?generation=1673996831356232"], + sha256 = "14f408878d72139c81dafea6ca4ee4301d84ba5651ead9ac170f253dd3b0b6cd", + urls = ["https://storage.googleapis.com/mediapipe-assets/wasm/text_wasm_internal.js?generation=1675786147103241"], ) http_file( name = "com_google_mediapipe_wasm_text_wasm_internal_wasm", - sha256 = "df82bb192ea852dc1bcc8f9f28fbd8c3d6b219dc4fec2b2a92451678d98ee1f0", - urls = ["https://storage.googleapis.com/mediapipe-assets/wasm/text_wasm_internal.wasm?generation=1673996834657078"], + sha256 = "9807d302c5d020c2f49d1132ab9d9c717bcb9a18a01efa1b7993de1e9cab193b", + urls = ["https://storage.googleapis.com/mediapipe-assets/wasm/text_wasm_internal.wasm?generation=1675786150390358"], ) http_file( name = "com_google_mediapipe_wasm_text_wasm_nosimd_internal_js", - sha256 = "de1a4aabefb2e42ae4fee68b7e762e328623a163257a7ddc72365fc2502bd090", - urls = ["https://storage.googleapis.com/mediapipe-assets/wasm/text_wasm_nosimd_internal.js?generation=1673996837104551"], + sha256 = "5f25b455c989c80c86c4b4941118af8a4a82518eaebdb3d019bea674761160f9", + urls = ["https://storage.googleapis.com/mediapipe-assets/wasm/text_wasm_nosimd_internal.js?generation=1675786153084313"], ) http_file( name = "com_google_mediapipe_wasm_text_wasm_nosimd_internal_wasm", - sha256 = "828dd1e73fa9478a97a62539117f92b813833ab35d37a986c466df15a8cfdc7b", - urls = ["https://storage.googleapis.com/mediapipe-assets/wasm/text_wasm_nosimd_internal.wasm?generation=1673996840120504"], + sha256 = "ec66757749832ddf5e7d8754a002f19bc4f0ce7539fc86be502afda376cc2e47", + urls = ["https://storage.googleapis.com/mediapipe-assets/wasm/text_wasm_nosimd_internal.wasm?generation=1675786156694332"], ) http_file( name = "com_google_mediapipe_wasm_vision_wasm_internal_js", - sha256 = "c146b68523c256d41132230e811fc224dafb6a0bce6fc318c29dad37dfac06de", - urls = ["https://storage.googleapis.com/mediapipe-assets/wasm/vision_wasm_internal.js?generation=1673996842448396"], + sha256 = "97783273ec64885e1e0c56152d3b87ea487f66be3a1dfa9d87d4550d01d852cc", + urls = ["https://storage.googleapis.com/mediapipe-assets/wasm/vision_wasm_internal.js?generation=1675786159557943"], ) http_file( name = "com_google_mediapipe_wasm_vision_wasm_internal_wasm", - sha256 = "8dbccaaf944ef1251cf78190450ab7074abea233e18ebb37d2c2ce0f18d14a0c", - urls = ["https://storage.googleapis.com/mediapipe-assets/wasm/vision_wasm_internal.wasm?generation=1673996845499070"], + sha256 = "f164caa065d57661cac31c36ebe1d3879d2618a9badee950312c682b7b5422d9", + urls = ["https://storage.googleapis.com/mediapipe-assets/wasm/vision_wasm_internal.wasm?generation=1675786162975564"], ) http_file( name = "com_google_mediapipe_wasm_vision_wasm_nosimd_internal_js", - sha256 = "705f9e3c2c62d12903ea2cadc22d2c328bc890f96fffc47b51f989471196ecea", - urls = ["https://storage.googleapis.com/mediapipe-assets/wasm/vision_wasm_nosimd_internal.js?generation=1673996847915731"], + sha256 = "781d0c8e49d8c231ca5ae9b70effc57c067936c56d4eea4f8e5c5fb68865e17f", + urls = ["https://storage.googleapis.com/mediapipe-assets/wasm/vision_wasm_nosimd_internal.js?generation=1675786165851806"], ) http_file( name = "com_google_mediapipe_wasm_vision_wasm_nosimd_internal_wasm", - sha256 = "c7ff6a7d8dc22380e2e8457a15a51b6bc1e70c6262fecca25825f54ecc593d1f", - urls = ["https://storage.googleapis.com/mediapipe-assets/wasm/vision_wasm_nosimd_internal.wasm?generation=1673996850980344"], + sha256 = "7636c15555e9ba715afd6f0c64d7150ba39a82fc1fca659799d05cdbaccfe396", + urls = ["https://storage.googleapis.com/mediapipe-assets/wasm/vision_wasm_nosimd_internal.wasm?generation=1675786169149137"], ) From 712a22101f92ada16d51683e18c37a3e52d78aa1 Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Tue, 7 Feb 2023 09:35:46 -0800 Subject: [PATCH 107/107] Do not use designated initializer PiperOrigin-RevId: 507805920 --- .../calculators/handedness_to_matrix_calculator_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mediapipe/tasks/cc/vision/gesture_recognizer/calculators/handedness_to_matrix_calculator_test.cc b/mediapipe/tasks/cc/vision/gesture_recognizer/calculators/handedness_to_matrix_calculator_test.cc index 17b16bf8..30e5a958 100644 --- a/mediapipe/tasks/cc/vision/gesture_recognizer/calculators/handedness_to_matrix_calculator_test.cc +++ b/mediapipe/tasks/cc/vision/gesture_recognizer/calculators/handedness_to_matrix_calculator_test.cc @@ -84,8 +84,8 @@ TEST_P(HandednessToMatrixCalculatorTest, OutputsCorrectResult) { INSTANTIATE_TEST_CASE_P( HandednessToMatrixCalculatorTests, HandednessToMatrixCalculatorTest, testing::ValuesIn( - {{.test_name = "TestWithRightHand", .handedness = 0.01f}, - {.test_name = "TestWithLeftHand", .handedness = 0.99f}}), + {{/* test_name= */ "TestWithRightHand", /* handedness= */ 0.01f}, + {/* test_name= */ "TestWithLeftHand", /* handedness= */ 0.99f}}), [](const testing::TestParamInfo< HandednessToMatrixCalculatorTest::ParamType>& info) { return info.param.test_name;