Merge branch 'cocoapods' into merge-branch
This commit is contained in:
commit
320db8eb1b
25
.aswb/.bazelproject
Normal file
25
.aswb/.bazelproject
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
directories:
|
||||||
|
# Add the directories you want added as source here
|
||||||
|
# By default, we've added your entire workspace ('.')
|
||||||
|
.
|
||||||
|
|
||||||
|
# Automatically includes all relevant targets under the 'directories' above
|
||||||
|
derive_targets_from_directories: true
|
||||||
|
|
||||||
|
targets:
|
||||||
|
# If source code isn't resolving, add additional targets that compile it here
|
||||||
|
|
||||||
|
additional_languages:
|
||||||
|
# Uncomment any additional languages you want supported
|
||||||
|
# c
|
||||||
|
# dart
|
||||||
|
# kotlin
|
||||||
|
# python
|
||||||
|
|
||||||
|
|
||||||
|
# Please uncomment an android-SDK platform. Available SDKs are:
|
||||||
|
# android_sdk_platform: android-28
|
||||||
|
# android_sdk_platform: android-29
|
||||||
|
android_sdk_platform: android-30
|
||||||
|
# android_sdk_platform: android-31
|
||||||
|
# android_sdk_platform: android-32
|
6
.bazelrc
6
.bazelrc
|
@ -69,6 +69,12 @@ build:android_arm64 --cpu=arm64-v8a
|
||||||
build:android_arm64 --fat_apk_cpu=arm64-v8a
|
build:android_arm64 --fat_apk_cpu=arm64-v8a
|
||||||
|
|
||||||
# iOS configs.
|
# iOS configs.
|
||||||
|
|
||||||
|
build:ios --apple_bitcode=embedded
|
||||||
|
build:ios --copt=-fembed-bitcode
|
||||||
|
build:ios --cxxopt=-std=c++17 # enables c++ 17
|
||||||
|
|
||||||
|
|
||||||
build:ios --apple_platform_type=ios
|
build:ios --apple_platform_type=ios
|
||||||
build:ios --copt=-fno-aligned-allocation
|
build:ios --copt=-fno-aligned-allocation
|
||||||
|
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -80,3 +80,4 @@ lint/tmp/
|
||||||
# App Specific cases
|
# App Specific cases
|
||||||
app/release/output.json
|
app/release/output.json
|
||||||
.idea/codeStyles/
|
.idea/codeStyles/
|
||||||
|
Pods/
|
||||||
|
|
|
@ -728,7 +728,7 @@ cc_library(
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "flow_limiter_calculator",
|
name = "flow_limiter_calculator",
|
||||||
srcs = ["flow_limiter_calculator.cc"],
|
srcs = ["flow_limiter_calculator.h"],
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = [
|
deps = [
|
||||||
":flow_limiter_calculator_cc_proto",
|
":flow_limiter_calculator_cc_proto",
|
||||||
|
@ -1217,7 +1217,7 @@ cc_test(
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "constant_side_packet_calculator",
|
name = "constant_side_packet_calculator",
|
||||||
srcs = ["constant_side_packet_calculator.cc"],
|
srcs = ["constant_side_packet_calculator.h"],
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = [
|
deps = [
|
||||||
":constant_side_packet_calculator_cc_proto",
|
":constant_side_packet_calculator_cc_proto",
|
||||||
|
|
13
mediapipe/examples/ios/posetracking-lindera/Podfile
Normal file
13
mediapipe/examples/ios/posetracking-lindera/Podfile
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# Uncomment the next line to define a global platform for your project
|
||||||
|
# platform :ios, '9.0'
|
||||||
|
source 'https://github.com/copper-labs/CocoaSpecs.git'
|
||||||
|
|
||||||
|
target 'PoseTrackingLindera' do
|
||||||
|
# Comment the next line if you don't want to use dynamic frameworks
|
||||||
|
use_frameworks!
|
||||||
|
|
||||||
|
pod 'LinderaDetection' #, :path => 'LinderaDetection'
|
||||||
|
|
||||||
|
# Pods for PoseTrackingLindera
|
||||||
|
|
||||||
|
end
|
|
@ -0,0 +1,457 @@
|
||||||
|
// !$*UTF8*$!
|
||||||
|
{
|
||||||
|
archiveVersion = 1;
|
||||||
|
classes = {
|
||||||
|
};
|
||||||
|
objectVersion = 55;
|
||||||
|
objects = {
|
||||||
|
|
||||||
|
/* Begin PBXBuildFile section */
|
||||||
|
1C59D14FDC8E0245032992F2 /* Pods_PoseTrackingLindera.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B06906B638FEBA7FF2874FB /* Pods_PoseTrackingLindera.framework */; };
|
||||||
|
32ADBDDB2907D1E200F78CE0 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32ADBDDA2907D1E200F78CE0 /* AppDelegate.swift */; };
|
||||||
|
32ADBDDF2907D1E200F78CE0 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32ADBDDE2907D1E200F78CE0 /* ViewController.swift */; };
|
||||||
|
32ADBDE22907D1E200F78CE0 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 32ADBDE02907D1E200F78CE0 /* Main.storyboard */; };
|
||||||
|
32ADBDE42907D1E400F78CE0 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 32ADBDE32907D1E400F78CE0 /* Assets.xcassets */; };
|
||||||
|
32ADBDE72907D1E400F78CE0 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 32ADBDE52907D1E400F78CE0 /* LaunchScreen.storyboard */; };
|
||||||
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
|
/* Begin PBXFileReference section */
|
||||||
|
32ADBDD72907D1E200F78CE0 /* PoseTrackingLindera.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PoseTrackingLindera.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
32ADBDDA2907D1E200F78CE0 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||||
|
32ADBDDE2907D1E200F78CE0 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
|
||||||
|
32ADBDE12907D1E200F78CE0 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||||
|
32ADBDE32907D1E400F78CE0 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||||
|
32ADBDE62907D1E400F78CE0 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||||
|
32ADBDE82907D1E400F78CE0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
|
32DE689E2916386C00CF67DE /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; };
|
||||||
|
9B06906B638FEBA7FF2874FB /* Pods_PoseTrackingLindera.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_PoseTrackingLindera.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
D0145F51AF9833F7B3332A77 /* Pods-PoseTrackingLindera.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PoseTrackingLindera.debug.xcconfig"; path = "Target Support Files/Pods-PoseTrackingLindera/Pods-PoseTrackingLindera.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
E651467537CC922E8D432264 /* Pods-PoseTrackingLindera.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PoseTrackingLindera.release.xcconfig"; path = "Target Support Files/Pods-PoseTrackingLindera/Pods-PoseTrackingLindera.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
|
32ADBDD42907D1E200F78CE0 /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
1C59D14FDC8E0245032992F2 /* Pods_PoseTrackingLindera.framework in Frameworks */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXFrameworksBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXGroup section */
|
||||||
|
32ADBDCE2907D1E200F78CE0 = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
32ADBDD92907D1E200F78CE0 /* PoseTrackingLindera */,
|
||||||
|
32ADBDD82907D1E200F78CE0 /* Products */,
|
||||||
|
669AA0EB532C755115F04FF2 /* Pods */,
|
||||||
|
88E6C68AD588A768E9656194 /* Frameworks */,
|
||||||
|
);
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
32ADBDD82907D1E200F78CE0 /* Products */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
32ADBDD72907D1E200F78CE0 /* PoseTrackingLindera.app */,
|
||||||
|
);
|
||||||
|
name = Products;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
32ADBDD92907D1E200F78CE0 /* PoseTrackingLindera */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
32ADBDDA2907D1E200F78CE0 /* AppDelegate.swift */,
|
||||||
|
32ADBDDE2907D1E200F78CE0 /* ViewController.swift */,
|
||||||
|
32ADBDE02907D1E200F78CE0 /* Main.storyboard */,
|
||||||
|
32ADBDE32907D1E400F78CE0 /* Assets.xcassets */,
|
||||||
|
32ADBDE52907D1E400F78CE0 /* LaunchScreen.storyboard */,
|
||||||
|
32ADBDE82907D1E400F78CE0 /* Info.plist */,
|
||||||
|
);
|
||||||
|
path = PoseTrackingLindera;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
669AA0EB532C755115F04FF2 /* Pods */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
D0145F51AF9833F7B3332A77 /* Pods-PoseTrackingLindera.debug.xcconfig */,
|
||||||
|
E651467537CC922E8D432264 /* Pods-PoseTrackingLindera.release.xcconfig */,
|
||||||
|
);
|
||||||
|
path = Pods;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
88E6C68AD588A768E9656194 /* Frameworks */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
32DE689E2916386C00CF67DE /* AssetsLibrary.framework */,
|
||||||
|
9B06906B638FEBA7FF2874FB /* Pods_PoseTrackingLindera.framework */,
|
||||||
|
);
|
||||||
|
name = Frameworks;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* End PBXGroup section */
|
||||||
|
|
||||||
|
/* Begin PBXNativeTarget section */
|
||||||
|
32ADBDD62907D1E200F78CE0 /* PoseTrackingLindera */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = 32ADBDEB2907D1E400F78CE0 /* Build configuration list for PBXNativeTarget "PoseTrackingLindera" */;
|
||||||
|
buildPhases = (
|
||||||
|
7F961E62B43D9BC2161D6057 /* [CP] Check Pods Manifest.lock */,
|
||||||
|
32ADBDD32907D1E200F78CE0 /* Sources */,
|
||||||
|
32ADBDD42907D1E200F78CE0 /* Frameworks */,
|
||||||
|
32ADBDD52907D1E200F78CE0 /* Resources */,
|
||||||
|
F2C34C6162DE10BC2A8141AC /* [CP] Copy Pods Resources */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
);
|
||||||
|
name = PoseTrackingLindera;
|
||||||
|
productName = PoseTrackingLindera;
|
||||||
|
productReference = 32ADBDD72907D1E200F78CE0 /* PoseTrackingLindera.app */;
|
||||||
|
productType = "com.apple.product-type.application";
|
||||||
|
};
|
||||||
|
/* End PBXNativeTarget section */
|
||||||
|
|
||||||
|
/* Begin PBXProject section */
|
||||||
|
32ADBDCF2907D1E200F78CE0 /* Project object */ = {
|
||||||
|
isa = PBXProject;
|
||||||
|
attributes = {
|
||||||
|
BuildIndependentTargetsInParallel = 1;
|
||||||
|
LastSwiftUpdateCheck = 1330;
|
||||||
|
LastUpgradeCheck = 1330;
|
||||||
|
TargetAttributes = {
|
||||||
|
32ADBDD62907D1E200F78CE0 = {
|
||||||
|
CreatedOnToolsVersion = 13.3.1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
buildConfigurationList = 32ADBDD22907D1E200F78CE0 /* Build configuration list for PBXProject "PoseTrackingLindera" */;
|
||||||
|
compatibilityVersion = "Xcode 13.0";
|
||||||
|
developmentRegion = en;
|
||||||
|
hasScannedForEncodings = 0;
|
||||||
|
knownRegions = (
|
||||||
|
en,
|
||||||
|
Base,
|
||||||
|
);
|
||||||
|
mainGroup = 32ADBDCE2907D1E200F78CE0;
|
||||||
|
productRefGroup = 32ADBDD82907D1E200F78CE0 /* Products */;
|
||||||
|
projectDirPath = "";
|
||||||
|
projectRoot = "";
|
||||||
|
targets = (
|
||||||
|
32ADBDD62907D1E200F78CE0 /* PoseTrackingLindera */,
|
||||||
|
);
|
||||||
|
};
|
||||||
|
/* End PBXProject section */
|
||||||
|
|
||||||
|
/* Begin PBXResourcesBuildPhase section */
|
||||||
|
32ADBDD52907D1E200F78CE0 /* Resources */ = {
|
||||||
|
isa = PBXResourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
32ADBDE72907D1E400F78CE0 /* LaunchScreen.storyboard in Resources */,
|
||||||
|
32ADBDE42907D1E400F78CE0 /* Assets.xcassets in Resources */,
|
||||||
|
32ADBDE22907D1E200F78CE0 /* Main.storyboard in Resources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXResourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXShellScriptBuildPhase section */
|
||||||
|
7F961E62B43D9BC2161D6057 /* [CP] Check Pods Manifest.lock */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||||
|
"${PODS_ROOT}/Manifest.lock",
|
||||||
|
);
|
||||||
|
name = "[CP] Check Pods Manifest.lock";
|
||||||
|
outputFileListPaths = (
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
"$(DERIVED_FILE_DIR)/Pods-PoseTrackingLindera-checkManifestLockResult.txt",
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
|
F2C34C6162DE10BC2A8141AC /* [CP] Copy Pods Resources */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
"${PODS_ROOT}/Target Support Files/Pods-PoseTrackingLindera/Pods-PoseTrackingLindera-resources-${CONFIGURATION}-input-files.xcfilelist",
|
||||||
|
);
|
||||||
|
name = "[CP] Copy Pods Resources";
|
||||||
|
outputFileListPaths = (
|
||||||
|
"${PODS_ROOT}/Target Support Files/Pods-PoseTrackingLindera/Pods-PoseTrackingLindera-resources-${CONFIGURATION}-output-files.xcfilelist",
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-PoseTrackingLindera/Pods-PoseTrackingLindera-resources.sh\"\n";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
|
/* End PBXShellScriptBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXSourcesBuildPhase section */
|
||||||
|
32ADBDD32907D1E200F78CE0 /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
32ADBDDF2907D1E200F78CE0 /* ViewController.swift in Sources */,
|
||||||
|
32ADBDDB2907D1E200F78CE0 /* AppDelegate.swift in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXSourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXVariantGroup section */
|
||||||
|
32ADBDE02907D1E200F78CE0 /* Main.storyboard */ = {
|
||||||
|
isa = PBXVariantGroup;
|
||||||
|
children = (
|
||||||
|
32ADBDE12907D1E200F78CE0 /* Base */,
|
||||||
|
);
|
||||||
|
name = Main.storyboard;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
32ADBDE52907D1E400F78CE0 /* LaunchScreen.storyboard */ = {
|
||||||
|
isa = PBXVariantGroup;
|
||||||
|
children = (
|
||||||
|
32ADBDE62907D1E400F78CE0 /* Base */,
|
||||||
|
);
|
||||||
|
name = LaunchScreen.storyboard;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* End PBXVariantGroup section */
|
||||||
|
|
||||||
|
/* Begin XCBuildConfiguration section */
|
||||||
|
32ADBDE92907D1E400F78CE0 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
ENABLE_TESTABILITY = YES;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
|
"DEBUG=1",
|
||||||
|
"$(inherited)",
|
||||||
|
);
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 15.4;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||||
|
MTL_FAST_MATH = YES;
|
||||||
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
32ADBDEA2907D1E400F78CE0 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 15.4;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
|
MTL_FAST_MATH = YES;
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
SWIFT_COMPILATION_MODE = wholemodule;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||||
|
VALIDATE_PRODUCT = YES;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
32ADBDEC2907D1E400F78CE0 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = D0145F51AF9833F7B3332A77 /* Pods-PoseTrackingLindera.debug.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
DEVELOPMENT_TEAM = JML2TT8X5V;
|
||||||
|
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
|
||||||
|
"FRAMEWORK_SEARCH_PATHS[arch=*]" = (
|
||||||
|
"$(inherited)",
|
||||||
|
"\"${PODS_CONFIGURATION_BUILD_DIR}/LinderaDetection\"",
|
||||||
|
"\"${PODS_ROOT}/../LinderaDetection/frameworks\"",
|
||||||
|
);
|
||||||
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
INFOPLIST_FILE = PoseTrackingLindera/Info.plist;
|
||||||
|
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||||
|
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
|
||||||
|
INFOPLIST_KEY_UIMainStoryboardFile = Main;
|
||||||
|
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||||
|
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
);
|
||||||
|
MARKETING_VERSION = 1.0;
|
||||||
|
OTHER_LDFLAGS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"-ObjC",
|
||||||
|
"-l\"stdc++\"",
|
||||||
|
"-framework",
|
||||||
|
"\"LinderaDetection\"",
|
||||||
|
"-framework",
|
||||||
|
"\"MPPoseTracking\"",
|
||||||
|
"-Wl",
|
||||||
|
);
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = ai.example.PoseTrackingLindera;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
32ADBDED2907D1E400F78CE0 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = E651467537CC922E8D432264 /* Pods-PoseTrackingLindera.release.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
DEVELOPMENT_TEAM = JML2TT8X5V;
|
||||||
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
INFOPLIST_FILE = PoseTrackingLindera/Info.plist;
|
||||||
|
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||||
|
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
|
||||||
|
INFOPLIST_KEY_UIMainStoryboardFile = Main;
|
||||||
|
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||||
|
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
);
|
||||||
|
MARKETING_VERSION = 1.0;
|
||||||
|
OTHER_LDFLAGS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"-ObjC",
|
||||||
|
"-l\"stdc++\"",
|
||||||
|
"-framework",
|
||||||
|
"\"LinderaDetection\"",
|
||||||
|
"-framework",
|
||||||
|
"\"MPPoseTracking\"",
|
||||||
|
"-Wl",
|
||||||
|
);
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = ai.example.PoseTrackingLindera;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
/* End XCBuildConfiguration section */
|
||||||
|
|
||||||
|
/* Begin XCConfigurationList section */
|
||||||
|
32ADBDD22907D1E200F78CE0 /* Build configuration list for PBXProject "PoseTrackingLindera" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
32ADBDE92907D1E400F78CE0 /* Debug */,
|
||||||
|
32ADBDEA2907D1E400F78CE0 /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
32ADBDEB2907D1E400F78CE0 /* Build configuration list for PBXNativeTarget "PoseTrackingLindera" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
32ADBDEC2907D1E400F78CE0 /* Debug */,
|
||||||
|
32ADBDED2907D1E400F78CE0 /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
/* End XCConfigurationList section */
|
||||||
|
};
|
||||||
|
rootObject = 32ADBDCF2907D1E200F78CE0 /* Project object */;
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Workspace
|
||||||
|
version = "1.0">
|
||||||
|
<FileRef
|
||||||
|
location = "self:">
|
||||||
|
</FileRef>
|
||||||
|
</Workspace>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>IDEDidComputeMac32BitWarning</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
Binary file not shown.
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>SchemeUserState</key>
|
||||||
|
<dict>
|
||||||
|
<key>PoseTrackingLindera.xcscheme_^#shared#^_</key>
|
||||||
|
<dict>
|
||||||
|
<key>orderHint</key>
|
||||||
|
<integer>2</integer>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
10
mediapipe/examples/ios/posetracking-lindera/PoseTrackingLindera.xcworkspace/contents.xcworkspacedata
generated
Normal file
10
mediapipe/examples/ios/posetracking-lindera/PoseTrackingLindera.xcworkspace/contents.xcworkspacedata
generated
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Workspace
|
||||||
|
version = "1.0">
|
||||||
|
<FileRef
|
||||||
|
location = "group:PoseTrackingLindera.xcodeproj">
|
||||||
|
</FileRef>
|
||||||
|
<FileRef
|
||||||
|
location = "group:Pods/Pods.xcodeproj">
|
||||||
|
</FileRef>
|
||||||
|
</Workspace>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>IDEDidComputeMac32BitWarning</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
Binary file not shown.
|
@ -2,10 +2,10 @@
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
|
<key>NSCameraUsageDescription</key>
|
||||||
|
<string>Processing Camera Feed</string>
|
||||||
<key>UIApplicationSceneManifest</key>
|
<key>UIApplicationSceneManifest</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>NSCameraUsageDescription</key>
|
|
||||||
<string>This app uses the camera to demonstrate live video processing.</string>
|
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>en</string>
|
<string>en</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
//
|
//
|
||||||
import UIKit
|
import UIKit
|
||||||
import LinderaDetection
|
import LinderaDetection
|
||||||
|
//import LinderaDetection
|
||||||
|
|
||||||
|
|
||||||
class ViewController: UIViewController {
|
class ViewController: UIViewController {
|
||||||
|
|
|
@ -23,6 +23,9 @@
|
||||||
#define REGISTER_CALCULATOR(name) \
|
#define REGISTER_CALCULATOR(name) \
|
||||||
REGISTER_FACTORY_FUNCTION_QUALIFIED( \
|
REGISTER_FACTORY_FUNCTION_QUALIFIED( \
|
||||||
mediapipe::CalculatorBaseRegistry, calculator_registration, name, \
|
mediapipe::CalculatorBaseRegistry, calculator_registration, name, \
|
||||||
absl::make_unique<mediapipe::internal::CalculatorBaseFactoryFor<name>>)
|
absl::make_unique<mediapipe::internal::CalculatorBaseFactoryFor<name>>); \
|
||||||
|
void register_##name(){typeid(name);};
|
||||||
|
|
||||||
#endif // MEDIAPIPE_FRAMEWORK_CALCULATOR_REGISTRY_H_
|
#endif // MEDIAPIPE_FRAMEWORK_CALCULATOR_REGISTRY_H_
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -383,7 +383,7 @@ class GlobalFactoryRegistry {
|
||||||
|
|
||||||
#define REGISTER_FACTORY_FUNCTION_QUALIFIED(RegistryType, var_name, name, ...) \
|
#define REGISTER_FACTORY_FUNCTION_QUALIFIED(RegistryType, var_name, name, ...) \
|
||||||
static auto* REGISTRY_STATIC_VAR(var_name, __LINE__) = \
|
static auto* REGISTRY_STATIC_VAR(var_name, __LINE__) = \
|
||||||
new mediapipe::RegistrationToken( \
|
new ::mediapipe::RegistrationToken( \
|
||||||
RegistryType::Register(#name, __VA_ARGS__))
|
RegistryType::Register(#name, __VA_ARGS__))
|
||||||
|
|
||||||
} // namespace mediapipe
|
} // namespace mediapipe
|
||||||
|
|
|
@ -130,7 +130,7 @@ class Subgraph {
|
||||||
using SubgraphRegistry = GlobalFactoryRegistry<std::unique_ptr<Subgraph>>;
|
using SubgraphRegistry = GlobalFactoryRegistry<std::unique_ptr<Subgraph>>;
|
||||||
|
|
||||||
#define REGISTER_MEDIAPIPE_GRAPH(name) \
|
#define REGISTER_MEDIAPIPE_GRAPH(name) \
|
||||||
REGISTER_FACTORY_FUNCTION_QUALIFIED(mediapipe::SubgraphRegistry, \
|
REGISTER_FACTORY_FUNCTION_QUALIFIED(::mediapipe::SubgraphRegistry, \
|
||||||
subgraph_registration, name, \
|
subgraph_registration, name, \
|
||||||
absl::make_unique<name>)
|
absl::make_unique<name>)
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,7 @@ def mediapipe_simple_subgraph(
|
||||||
expand_template(
|
expand_template(
|
||||||
name = name + "_linked_cc",
|
name = name + "_linked_cc",
|
||||||
template = clean_dep("//mediapipe/framework/tool:simple_subgraph_template.cc"),
|
template = clean_dep("//mediapipe/framework/tool:simple_subgraph_template.cc"),
|
||||||
out = name + "_linked.cc",
|
out = name + "_linked.h",
|
||||||
substitutions = {
|
substitutions = {
|
||||||
"{{SUBGRAPH_CLASS_NAME}}": register_as,
|
"{{SUBGRAPH_CLASS_NAME}}": register_as,
|
||||||
"{{SUBGRAPH_INC_FILE_PATH}}": native.package_name() + "/" + graph_base_name + ".inc",
|
"{{SUBGRAPH_INC_FILE_PATH}}": native.package_name() + "/" + graph_base_name + ".inc",
|
||||||
|
@ -145,7 +145,7 @@ def mediapipe_simple_subgraph(
|
||||||
native.cc_library(
|
native.cc_library(
|
||||||
name = name,
|
name = name,
|
||||||
srcs = [
|
srcs = [
|
||||||
name + "_linked.cc",
|
name + "_linked.h",
|
||||||
graph_base_name + ".inc",
|
graph_base_name + ".inc",
|
||||||
],
|
],
|
||||||
deps = [
|
deps = [
|
||||||
|
@ -161,7 +161,7 @@ def mediapipe_simple_subgraph(
|
||||||
cc_library_with_tflite(
|
cc_library_with_tflite(
|
||||||
name = name,
|
name = name,
|
||||||
srcs = [
|
srcs = [
|
||||||
name + "_linked.cc",
|
name + "_linked.h",
|
||||||
graph_base_name + ".inc",
|
graph_base_name + ".inc",
|
||||||
],
|
],
|
||||||
tflite_deps = tflite_deps,
|
tflite_deps = tflite_deps,
|
||||||
|
|
|
@ -25,11 +25,11 @@ static const char binary_graph[] =
|
||||||
#include "{{SUBGRAPH_INC_FILE_PATH}}"
|
#include "{{SUBGRAPH_INC_FILE_PATH}}"
|
||||||
; // NOLINT(whitespace/semicolon)
|
; // NOLINT(whitespace/semicolon)
|
||||||
|
|
||||||
class {{SUBGRAPH_CLASS_NAME}} : public Subgraph {
|
class {{SUBGRAPH_CLASS_NAME}} : public ::mediapipe::Subgraph {
|
||||||
public:
|
public:
|
||||||
absl::StatusOr<CalculatorGraphConfig> GetConfig(
|
absl::StatusOr<::mediapipe::CalculatorGraphConfig> GetConfig(
|
||||||
const SubgraphOptions& /*options*/) {
|
const SubgraphOptions& /*options*/) {
|
||||||
CalculatorGraphConfig config;
|
::mediapipe::CalculatorGraphConfig config;
|
||||||
// Note: this is a binary protobuf serialization, and may include NUL
|
// Note: this is a binary protobuf serialization, and may include NUL
|
||||||
// bytes. The trailing NUL added to the string literal should be excluded.
|
// bytes. The trailing NUL added to the string literal should be excluded.
|
||||||
if (config.ParseFromArray(binary_graph, sizeof(binary_graph) - 1)) {
|
if (config.ParseFromArray(binary_graph, sizeof(binary_graph) - 1)) {
|
||||||
|
|
|
@ -286,3 +286,14 @@ exports_files(
|
||||||
"//mediapipe:__subpackages__",
|
"//mediapipe:__subpackages__",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
exports_files(
|
||||||
|
[
|
||||||
|
"MPPCameraInputSource.h",
|
||||||
|
"MPPLayerRenderer.h",
|
||||||
|
"MPPPlayerInputSource.h",
|
||||||
|
"MPPInputSource.h",
|
||||||
|
"MPPGLViewRenderer.h",
|
||||||
|
],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
|
@ -1,36 +1,217 @@
|
||||||
objc_library(
|
load(
|
||||||
name = "posetracking_gpu_solution",
|
"@build_bazel_rules_apple//apple:ios.bzl",
|
||||||
srcs = glob([
|
"ios_application",
|
||||||
"*.h",
|
"ios_dynamic_framework",
|
||||||
"*.mm",
|
"ios_framework",
|
||||||
]),
|
"ios_static_framework",
|
||||||
module_name = "MPPoseTracking",
|
"ios_unit_test",
|
||||||
hdrs = [
|
)
|
||||||
|
load(
|
||||||
|
"@build_bazel_rules_apple//apple:apple.bzl",
|
||||||
|
"apple_static_xcframework",
|
||||||
|
)
|
||||||
|
load(
|
||||||
|
"//mediapipe/examples/ios:bundle_id.bzl",
|
||||||
|
"BUNDLE_ID_PREFIX",
|
||||||
|
"example_provisioning",
|
||||||
|
)
|
||||||
|
|
||||||
|
MPP_HEADERS = [
|
||||||
"PoseTracking.h",
|
"PoseTracking.h",
|
||||||
"PoseTrackingOptions.h",
|
"PoseTrackingOptions.h",
|
||||||
"PoseTrackingResults.h"
|
"PoseTrackingResults.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
MP_IOS_HEADERS_NAMES = [
|
||||||
|
"MPPCameraInputSource.h",
|
||||||
|
"MPPLayerRenderer.h",
|
||||||
|
"MPPPlayerInputSource.h",
|
||||||
|
"MPPInputSource.h",
|
||||||
|
"MPPGLViewRenderer.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
MP_IOS_HEADERS = ["//mediapipe/objc:" + header for header in MP_IOS_HEADERS_NAMES]
|
||||||
|
|
||||||
|
#[genrule(
|
||||||
|
# name = "gen_" + header_name,
|
||||||
|
# srcs = [header_rule],
|
||||||
|
# outs = [header_name],
|
||||||
|
# cmd = """
|
||||||
|
# OUTPUT_DIR=mediapipe/objc/solutions/posetracking_gpu
|
||||||
|
# mkdir -p $$OUTPUT_DIR
|
||||||
|
# OUTPUT_PATH=$$OUTPUT_DIR/{}
|
||||||
|
# cp $(location {}) $$OUTPUT_PATH
|
||||||
|
# sed -i -e "s#mediapipe/objc/##g" $$OUTPUT_PATH
|
||||||
|
# cp $$OUTPUT_PATH $@
|
||||||
|
# """.format(header_name, header_rule),
|
||||||
|
# local = False,
|
||||||
|
#) for (header_name, header_rule) in zip(MP_IOS_HEADERS_NAMES, MP_IOS_HEADERS)]
|
||||||
|
#
|
||||||
|
#MP_GEN_IOS_HEADERS = ["gen_" + header for header in MP_IOS_HEADERS_NAMES]
|
||||||
|
#
|
||||||
|
#filegroup(
|
||||||
|
# name = "gen_mp_ios_headers",
|
||||||
|
# srcs = MP_GEN_IOS_HEADERS,
|
||||||
|
#)
|
||||||
|
|
||||||
|
#-c opt --config=ios_fat --cxxopt=--std=c++17 --copt=-fembed-bitcode --linkopt="-s"
|
||||||
|
MP_GEN_IOS_HEADERS = MP_IOS_HEADERS
|
||||||
|
|
||||||
|
ios_static_framework(
|
||||||
|
name = "MPPoseTracking",
|
||||||
|
hdrs = MPP_HEADERS + MP_GEN_IOS_HEADERS,
|
||||||
|
bundle_name = "MPPoseTracking",
|
||||||
|
linkopts = [
|
||||||
|
# "--no-whole-archive",
|
||||||
|
# "-all_load",
|
||||||
|
# "-Wl",
|
||||||
|
"-force_load",
|
||||||
],
|
],
|
||||||
|
minimum_os_version = "12.0",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
deps = [
|
||||||
|
"//mediapipe/objc/solutions/posetracking_gpu:posetracking_gpu_solution",
|
||||||
|
|
||||||
|
# "//third_party:opencv",
|
||||||
|
# "@ios_opencv//:OpencvFramework",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
apple_static_xcframework(
|
||||||
|
name = "MPPoseTrackingXC",
|
||||||
|
bundle_name = "MPPoseTracking",
|
||||||
|
minimum_os_versions = {"ios": "12.0"},
|
||||||
|
public_hdrs = MPP_HEADERS + MP_GEN_IOS_HEADERS,
|
||||||
|
deps = [
|
||||||
|
"//mediapipe/objc/solutions/posetracking_gpu:posetracking_gpu_solution",
|
||||||
|
|
||||||
|
# "//third_party:opencv",
|
||||||
|
# "@ios_opencv//:OpencvFramework",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
ios_framework(
|
||||||
|
name = "MPPoseTrackingDynamic",
|
||||||
|
hdrs = MPP_HEADERS + MP_GEN_IOS_HEADERS + ["MPPoseTracking.h"],
|
||||||
|
bundle_id = BUNDLE_ID_PREFIX + ".MPPPoseTracking",
|
||||||
|
bundle_name = "MPPoseTracking",
|
||||||
|
families = [
|
||||||
|
"iphone",
|
||||||
|
"ipad",
|
||||||
|
],
|
||||||
|
infoplists = ["Info.plist"],
|
||||||
|
linkopts = [
|
||||||
|
# "--no-whole-archive",
|
||||||
|
# "-all_load",
|
||||||
|
# "-Wl",
|
||||||
|
# "-force_load",
|
||||||
|
],
|
||||||
|
minimum_os_version = "10.0",
|
||||||
|
resources = ["modulemap/module.modulemap"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
deps = [
|
||||||
|
"//mediapipe/objc/solutions/posetracking_gpu:posetracking_gpu_solution",
|
||||||
|
# "//mediapipe/calculators/core:flow_limiter_calculator",
|
||||||
|
|
||||||
|
# "//third_party:opencv",
|
||||||
|
"@ios_opencv//:OpencvFramework",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
genrule(
|
||||||
|
name = "PatchedMPPosetrackingDynamic",
|
||||||
|
srcs = [":MPPoseTrackingDynamic"],
|
||||||
|
outs = [
|
||||||
|
"MPPoseTracking.framework",
|
||||||
|
"MPPoseTracking.framework.dSYM",
|
||||||
|
],
|
||||||
|
cmd = """
|
||||||
|
bash $(location patch_ios_framework.sh) "$(SRCS)" "$(OUTS)"
|
||||||
|
""",
|
||||||
|
output_to_bindir = 1,
|
||||||
|
tools = ["patch_ios_framework.sh"],
|
||||||
|
)
|
||||||
|
|
||||||
|
# Custom Bazel Rule that patches headers of framework to flatten header imports
|
||||||
|
genrule(
|
||||||
|
name = "MPPoseTrackingHeaderPatched",
|
||||||
|
srcs = [":MPPoseTracking"],
|
||||||
|
outs = ["MPPoseTrackingHeaderPatched.zip"],
|
||||||
|
cmd = """
|
||||||
|
unzip $(location MPPoseTracking)
|
||||||
|
sed -i -e "s#mediapipe/objc/##g" $$(find MPPoseTracking.framework -name "*.h")
|
||||||
|
rm -f MPPoseTracking.framework/Headers/*.h-e
|
||||||
|
zip -r MPPoseTrackingHeaderPatched.zip MPPoseTracking.framework
|
||||||
|
cp MPPoseTrackingHeaderPatched.zip $@
|
||||||
|
""",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
|
objc_library(
|
||||||
|
name = "posetracking_gpu_solution",
|
||||||
|
srcs = [
|
||||||
|
"PoseTrackingOptions.mm",
|
||||||
|
"PoseTrackingResults.mm",
|
||||||
|
"PoseTracking.mm",
|
||||||
|
] + select({
|
||||||
|
"//mediapipe:ios_i386": [],
|
||||||
|
"//mediapipe:ios_x86_64": [],
|
||||||
|
"//conditions:default": [],
|
||||||
|
}),
|
||||||
|
hdrs = MPP_HEADERS + MP_GEN_IOS_HEADERS,
|
||||||
copts = [
|
copts = [
|
||||||
"-Wno-shorten-64-to-32",
|
"-Wno-shorten-64-to-32",
|
||||||
|
# "-all_load",
|
||||||
],
|
],
|
||||||
data = [
|
data = [
|
||||||
"//mediapipe/graphs/pose_tracking:pose_tracking_gpu.binarypb",
|
"//mediapipe/graphs/pose_tracking:pose_tracking_gpu.binarypb",
|
||||||
"//mediapipe/modules/pose_detection:pose_detection.tflite",
|
"//mediapipe/modules/pose_detection:pose_detection.tflite",
|
||||||
"//mediapipe/modules/pose_landmark:pose_landmark_heavy.tflite",
|
|
||||||
"//mediapipe/modules/pose_landmark:pose_landmark_full.tflite",
|
"//mediapipe/modules/pose_landmark:pose_landmark_full.tflite",
|
||||||
"//mediapipe/modules/pose_landmark:pose_landmark_lite.tflite", ] ,
|
"//mediapipe/modules/pose_landmark:pose_landmark_heavy.tflite",
|
||||||
sdk_frameworks = ["Accelerate"],
|
"//mediapipe/modules/pose_landmark:pose_landmark_lite.tflite",
|
||||||
|
],
|
||||||
|
linkopts = [
|
||||||
|
# "--no-whole-archive",
|
||||||
|
# "-all_load",
|
||||||
|
# "-force_load",
|
||||||
|
# "-Wl",
|
||||||
|
],
|
||||||
|
module_name = "MPPoseTracking",
|
||||||
|
sdk_frameworks = [
|
||||||
|
"Accelerate",
|
||||||
|
"AVFoundation",
|
||||||
|
"CoreGraphics",
|
||||||
|
"CoreMedia",
|
||||||
|
"UIKit",
|
||||||
|
],
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = [
|
deps = [
|
||||||
"//mediapipe/objc:mediapipe_framework_ios",
|
"//mediapipe/objc:mediapipe_framework_ios",
|
||||||
"//mediapipe/objc:mediapipe_input_sources_ios",
|
"//mediapipe/objc:mediapipe_input_sources_ios",
|
||||||
"//mediapipe/objc:mediapipe_layer_renderer",
|
"//mediapipe/objc:mediapipe_layer_renderer",
|
||||||
|
"//mediapipe/graphs/pose_tracking:pose_tracking_gpu_deps",
|
||||||
|
"//mediapipe/framework/formats:landmark_cc_proto",
|
||||||
|
"calculator_registry",
|
||||||
] + select({
|
] + select({
|
||||||
"//mediapipe:ios_i386": [],
|
"//mediapipe:ios_i386": [],
|
||||||
"//mediapipe:ios_x86_64": [],
|
"//mediapipe:ios_x86_64": [],
|
||||||
"//conditions:default": [
|
"//conditions:default": [
|
||||||
"//mediapipe/graphs/pose_tracking:pose_tracking_gpu_deps",
|
|
||||||
"//mediapipe/framework/formats:landmark_cc_proto",
|
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
|
alwayslink = True,
|
||||||
|
)
|
||||||
|
|
||||||
|
cc_library(
|
||||||
|
name = "calculator_registry",
|
||||||
|
srcs = [
|
||||||
|
"registry/calculator_registry.cpp",
|
||||||
|
"registry/calculator_registry.h",
|
||||||
|
],
|
||||||
|
deps = ["//mediapipe/graphs/pose_tracking:pose_tracking_gpu_deps"],
|
||||||
|
alwayslink = True,
|
||||||
|
)
|
||||||
|
|
||||||
|
exports_files(
|
||||||
|
MPP_HEADERS,
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
)
|
)
|
||||||
|
|
27
mediapipe/objc/solutions/posetracking_gpu/Info.plist
Normal file
27
mediapipe/objc/solutions/posetracking_gpu/Info.plist
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>NSCameraUsageDescription</key>
|
||||||
|
<string>This app uses the camera to demonstrate live video processing.</string>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>en</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>$(PRODUCT_NAME)</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.0</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1</string>
|
||||||
|
<key>LSRequiresIPhoneOS</key>
|
||||||
|
<true/>
|
||||||
|
|
||||||
|
</dict>
|
||||||
|
</plist>
|
|
@ -0,0 +1,3 @@
|
||||||
|
#import "PoseTracking.h"
|
||||||
|
#import "PoseTrackingOptions.h"
|
||||||
|
#import "PoseTrackingResults.h"
|
|
@ -10,6 +10,7 @@
|
||||||
#import "mediapipe/objc/MPPPlayerInputSource.h"
|
#import "mediapipe/objc/MPPPlayerInputSource.h"
|
||||||
#import "PoseTrackingOptions.h"
|
#import "PoseTrackingOptions.h"
|
||||||
#import "PoseTrackingResults.h"
|
#import "PoseTrackingResults.h"
|
||||||
|
|
||||||
@interface PoseTracking : NSObject<MPPInputSourceDelegate>
|
@interface PoseTracking : NSObject<MPPInputSourceDelegate>
|
||||||
|
|
||||||
// The MediaPipe graph currently in use. Initialized in viewDidLoad, started in
|
// The MediaPipe graph currently in use. Initialized in viewDidLoad, started in
|
||||||
|
|
|
@ -3,6 +3,23 @@
|
||||||
#import "mediapipe/objc/MPPGraph.h"
|
#import "mediapipe/objc/MPPGraph.h"
|
||||||
#import "mediapipe/objc/MPPTimestampConverter.h"
|
#import "mediapipe/objc/MPPTimestampConverter.h"
|
||||||
#include "mediapipe/framework/packet.h"
|
#include "mediapipe/framework/packet.h"
|
||||||
|
#include "registry/calculator_registry.h"
|
||||||
|
|
||||||
|
//#include "mediapipe/calculators/core/flow_limiter_calculator.h"
|
||||||
|
//#include "mediapipe/calculators/core/constant_side_packet_calculator.h"
|
||||||
|
//#include "mediapipe/modules/pose_landmark/pose_landmark_gpu_linked.h"
|
||||||
|
//#include "mediapipe/graphs/pose_tracking/subgraphs/pose_renderer_gpu_linked.h"
|
||||||
|
//#include "mediapipe/modules/pose_detection/pose_detection_gpu_linked.h"
|
||||||
|
|
||||||
|
void registerCalculators(){
|
||||||
|
// typeid(::mediapipe::FlowLimiterCalculator);
|
||||||
|
// typeid(::mediapipe::ConstantSidePacketCalculator);
|
||||||
|
// typeid(::mediapipe::PoseLandmarkGpu);
|
||||||
|
// typeid(::mediapipe::PoseRendererGpu);
|
||||||
|
// typeid(::mediapipe::PoseDetectionGpu);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
static const char* kVideoQueueLabel = "com.google.mediapipe.example.videoQueue";
|
static const char* kVideoQueueLabel = "com.google.mediapipe.example.videoQueue";
|
||||||
static const char* kLandmarksOutputStream = "pose_landmarks";
|
static const char* kLandmarksOutputStream = "pose_landmarks";
|
||||||
|
@ -127,6 +144,9 @@ static const char* kLandmarksOutputStream = "pose_landmarks";
|
||||||
}
|
}
|
||||||
|
|
||||||
- (instancetype) initWithPoseTrackingOptions: (PoseTrackingOptions*) poseTrackingOptions{
|
- (instancetype) initWithPoseTrackingOptions: (PoseTrackingOptions*) poseTrackingOptions{
|
||||||
|
|
||||||
|
registerCalculators();
|
||||||
|
MPPCalculator();
|
||||||
self.renderer = [[MPPLayerRenderer alloc] init];
|
self.renderer = [[MPPLayerRenderer alloc] init];
|
||||||
self.renderer.frameScaleMode = MPPFrameScaleModeFillAndCrop;
|
self.renderer.frameScaleMode = MPPFrameScaleModeFillAndCrop;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
framework module MPPoseTracking {
|
||||||
|
umbrella header "MPPoseTracking.h"
|
||||||
|
export *
|
||||||
|
module * { export * }
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright (c) 2022 Baracoda. All rights reserved
|
||||||
|
#
|
||||||
|
# Copying this file via any medium without the prior written consent of Baracoda is strictly
|
||||||
|
# prohibited
|
||||||
|
#
|
||||||
|
# Proprietary and confidential
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
for outputPath in $2
|
||||||
|
do
|
||||||
|
fileName=$(basename "$outputPath" .framework)
|
||||||
|
outputPath=$(dirname $outputPath)
|
||||||
|
|
||||||
|
for inputPath in $1
|
||||||
|
do
|
||||||
|
if [[ $inputPath == *"$fileName"*.zip ]]; then
|
||||||
|
fullPath=$(dirname "$inputPath")
|
||||||
|
|
||||||
|
frameworkPath="$fullPath"/"$fileName".framework
|
||||||
|
|
||||||
|
rm -rf "$fullPath"/"$fileName".framework
|
||||||
|
unzip "$inputPath" -d "$fullPath"
|
||||||
|
|
||||||
|
if [ -d "$frameworkPath".dSYM ]; then
|
||||||
|
cp -R "$frameworkPath".dSYM "$outputPath"/"$fileName".framework.dSYM
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$frameworkPath"/module.modulemap ]; then
|
||||||
|
mkdir "$frameworkPath"/Modules
|
||||||
|
mv "$frameworkPath"/module.modulemap "$frameworkPath"/Modules
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp -R "$frameworkPath" "$outputPath"/"$fileName".framework
|
||||||
|
fi
|
||||||
|
done;
|
||||||
|
done;
|
|
@ -0,0 +1,68 @@
|
||||||
|
//
|
||||||
|
// Created by Mautisim Munir on 05/11/2022.
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "calculator_registry.h"
|
||||||
|
#include "mediapipe/calculators/core/flow_limiter_calculator.h"
|
||||||
|
#include "mediapipe/calculators/core/constant_side_packet_calculator.h"
|
||||||
|
|
||||||
|
// We need namespaces for subgraphs because of the static variables inside the files
|
||||||
|
namespace PLG {
|
||||||
|
|
||||||
|
#include "mediapipe/modules/pose_landmark/pose_landmark_gpu_linked.h"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace PDROI{
|
||||||
|
#include "mediapipe/modules/pose_landmark/pose_detection_to_roi_linked.h"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace PRG {
|
||||||
|
|
||||||
|
#include "mediapipe/graphs/pose_tracking/subgraphs/pose_renderer_gpu_linked.h"
|
||||||
|
|
||||||
|
}
|
||||||
|
namespace PDG {
|
||||||
|
#include "mediapipe/modules/pose_detection/pose_detection_gpu_linked.h"
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace PLROIG{
|
||||||
|
#include "mediapipe/modules/pose_landmark/pose_landmark_by_roi_gpu_linked.h"
|
||||||
|
|
||||||
|
}
|
||||||
|
namespace PLF{
|
||||||
|
#include "mediapipe/modules/pose_landmark/pose_landmark_filtering_linked.h"
|
||||||
|
}
|
||||||
|
namespace PLTOROI{
|
||||||
|
#include "mediapipe/modules/pose_landmark/pose_landmarks_to_roi_linked.h"
|
||||||
|
}
|
||||||
|
namespace PSF{
|
||||||
|
#include "mediapipe/modules/pose_landmark/pose_segmentation_filtering_linked.h"
|
||||||
|
}
|
||||||
|
namespace PLML{
|
||||||
|
#include "mediapipe/modules/pose_landmark/pose_landmark_model_loader_linked.h"
|
||||||
|
}
|
||||||
|
namespace PLSIP{
|
||||||
|
#include "mediapipe/modules/pose_landmark/pose_landmarks_and_segmentation_inverse_projection_linked.h"
|
||||||
|
}
|
||||||
|
namespace TPLS{
|
||||||
|
#include "mediapipe/modules/pose_landmark/tensors_to_pose_landmarks_and_segmentation_linked.h"
|
||||||
|
}
|
||||||
|
|
||||||
|
MPPCalculator::MPPCalculator() {
|
||||||
|
typeid(TPLS::mediapipe::TensorsToPoseLandmarksAndSegmentation);
|
||||||
|
typeid(::mediapipe::FlowLimiterCalculator);
|
||||||
|
typeid(::mediapipe::ConstantSidePacketCalculator);
|
||||||
|
typeid(PLG::mediapipe::PoseLandmarkGpu);
|
||||||
|
typeid(PRG::mediapipe::PoseRendererGpu);
|
||||||
|
typeid(PDG::mediapipe::PoseDetectionGpu);
|
||||||
|
typeid(PDROI::mediapipe::PoseDetectionToRoi);
|
||||||
|
typeid(PLROIG::mediapipe::PoseLandmarkByRoiGpu);
|
||||||
|
typeid(PLF::mediapipe::PoseLandmarkFiltering);
|
||||||
|
typeid(PLTOROI::mediapipe::PoseLandmarksToRoi);
|
||||||
|
typeid(PSF::mediapipe::PoseSegmentationFiltering);
|
||||||
|
typeid(PLML::mediapipe::PoseLandmarkModelLoader);
|
||||||
|
typeid(PLSIP::mediapipe::PoseLandmarksAndSegmentationInverseProjection);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
//
|
||||||
|
// Created by Mautisim Munir on 05/11/2022.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef MEDIAPIPE_CALCULATOR_REGISTRY_H
|
||||||
|
#define MEDIAPIPE_CALCULATOR_REGISTRY_H
|
||||||
|
|
||||||
|
class MPPCalculator{
|
||||||
|
public:
|
||||||
|
MPPCalculator();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //MEDIAPIPE_CALCULATOR_REGISTRY_H
|
|
@ -1,16 +1,7 @@
|
||||||
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
|
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
|
||||||
|
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_application", "ios_framework", "ios_static_framework", "ios_unit_test")
|
||||||
|
|
||||||
swift_library(
|
POSETRACKING_DEPS = [
|
||||||
name = "lindera",
|
|
||||||
srcs = ["Lindera.swift","Asensei3D.swift","utils.swift"],
|
|
||||||
linkopts = [
|
|
||||||
"-lc++",
|
|
||||||
"-std=c++17",
|
|
||||||
"-lstdc++",
|
|
||||||
],
|
|
||||||
module_name = "LinderaDetection",
|
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
deps = [
|
|
||||||
"//mediapipe/objc/solutions/posetracking_gpu:posetracking_gpu_solution",
|
"//mediapipe/objc/solutions/posetracking_gpu:posetracking_gpu_solution",
|
||||||
"//mediapipe/objc:mediapipe_framework_ios",
|
"//mediapipe/objc:mediapipe_framework_ios",
|
||||||
"//mediapipe/objc:mediapipe_input_sources_ios",
|
"//mediapipe/objc:mediapipe_input_sources_ios",
|
||||||
|
@ -22,5 +13,56 @@ swift_library(
|
||||||
"//mediapipe/graphs/pose_tracking:pose_tracking_gpu_deps",
|
"//mediapipe/graphs/pose_tracking:pose_tracking_gpu_deps",
|
||||||
"//mediapipe/framework/formats:landmark_cc_proto",
|
"//mediapipe/framework/formats:landmark_cc_proto",
|
||||||
],
|
],
|
||||||
}),
|
})
|
||||||
|
|
||||||
|
genrule(
|
||||||
|
name = "podgen",
|
||||||
|
srcs = [
|
||||||
|
"//mediapipe/objc/solutions/posetracking_gpu:MPPoseTrackingHeaderPatched",
|
||||||
|
"LinderaDetection.podspec",
|
||||||
|
"@ios_opencv//:OpencvFrameworkContents",
|
||||||
|
] + glob(["*.swift"]),
|
||||||
|
outs = ["LinderaDetection.zip"],
|
||||||
|
cmd = """
|
||||||
|
|
||||||
|
mkdir mediapipe/swift/solutions/lindera/frameworks
|
||||||
|
cp -r external/ios_opencv/opencv2.framework mediapipe/swift/solutions/lindera/frameworks
|
||||||
|
unzip $(location //mediapipe/objc/solutions/posetracking_gpu:MPPoseTrackingHeaderPatched) -d mediapipe/swift/solutions/lindera/frameworks
|
||||||
|
cd mediapipe/swift/solutions/lindera/
|
||||||
|
|
||||||
|
zip -r LinderaDetection.zip frameworks LinderaDetection.podspec *.swift
|
||||||
|
cd ../../../../
|
||||||
|
cp mediapipe/swift/solutions/lindera/LinderaDetection.zip $@
|
||||||
|
""",
|
||||||
|
)
|
||||||
|
|
||||||
|
# bazel build //mediapipe/swift/solutions/lindera:lindera-framework -c opt --config=ios_fat --cxxopt=--std=c++17 --copt=-fembed-bitcode --linkopt="-s"
|
||||||
|
ios_static_framework(
|
||||||
|
name = "lindera-framework",
|
||||||
|
# avoid_deps = POSETRACKING_DEPS,
|
||||||
|
bundle_name = "LinderaDetection",
|
||||||
|
minimum_os_version = "12.0",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
deps = [
|
||||||
|
":lindera",
|
||||||
|
# "//third_party:opencv",
|
||||||
|
# "@ios_opencv//:OpencvFramework",
|
||||||
|
] + POSETRACKING_DEPS,
|
||||||
|
)
|
||||||
|
|
||||||
|
swift_library(
|
||||||
|
name = "lindera",
|
||||||
|
srcs = [
|
||||||
|
"Asensei3D.swift",
|
||||||
|
"Lindera.swift",
|
||||||
|
"utils.swift",
|
||||||
|
],
|
||||||
|
linkopts = [
|
||||||
|
"-lc++",
|
||||||
|
"-std=c++17",
|
||||||
|
"-lstdc++",
|
||||||
|
],
|
||||||
|
module_name = "LinderaDetection",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
deps = POSETRACKING_DEPS,
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// This is the copperlabs posetracking api built in objective c
|
// This is the copperlabs posetracking api built in objective c
|
||||||
import MPPoseTracking
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
#if arch(arm64)
|
||||||
|
import MPPoseTracking
|
||||||
|
|
||||||
|
|
||||||
/// A helper class to run the Pose Tracking API
|
/// A helper class to run the Pose Tracking API
|
||||||
|
@ -265,3 +266,6 @@ extension Asensei3DPose {
|
||||||
// self.z = vector.y
|
// self.z = vector.y
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
#else
|
||||||
|
final public class Lindera{}
|
||||||
|
#endif
|
||||||
|
|
154
mediapipe/swift/solutions/lindera/LinderaDetection.podspec
Normal file
154
mediapipe/swift/solutions/lindera/LinderaDetection.podspec
Normal file
|
@ -0,0 +1,154 @@
|
||||||
|
#
|
||||||
|
# Be sure to run `pod spec lint EdgeEngine.podspec' to ensure this is a
|
||||||
|
# valid spec and to remove all comments including this before submitting the spec.
|
||||||
|
#
|
||||||
|
# To learn more about Podspec attributes see https://guides.cocoapods.org/syntax/podspec.html
|
||||||
|
# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
|
||||||
|
#
|
||||||
|
|
||||||
|
Pod::Spec.new do |spec|
|
||||||
|
|
||||||
|
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
||||||
|
#
|
||||||
|
# These will help people to find your library, and whilst it
|
||||||
|
# can feel like a chore to fill in it's definitely to your advantage. The
|
||||||
|
# summary should be tweet-length, and the description more in depth.
|
||||||
|
#
|
||||||
|
|
||||||
|
spec.name = "LinderaDetection"
|
||||||
|
spec.version = "0.0.2"
|
||||||
|
spec.summary = "LinderaDetection is a simple yet powerful interface to run AI Fitness Solutions"
|
||||||
|
|
||||||
|
# This description is used to generate tags and improve search results.
|
||||||
|
# * Think: What does it do? Why did you write it? What is the focus?
|
||||||
|
# * Try to keep it short, snappy and to the point.
|
||||||
|
# * Write the description between the DESC delimiters below.
|
||||||
|
# * Finally, don't worry about the indent, CocoaPods strips it!
|
||||||
|
spec.description = "LinderaDetection is a simple yet powerful interface to run AI Fitness Solutions. It is powered by Mediapipe."
|
||||||
|
|
||||||
|
spec.homepage = "https://github.com/udamaster/mediapipe"
|
||||||
|
# spec.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif"
|
||||||
|
|
||||||
|
|
||||||
|
# ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
||||||
|
#
|
||||||
|
# Licensing your code is important. See https://choosealicense.com for more info.
|
||||||
|
# CocoaPods will detect a license file if there is a named LICENSE*
|
||||||
|
# Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'.
|
||||||
|
#
|
||||||
|
|
||||||
|
spec.license = { :type => 'MIT', :text => <<-LICENSE
|
||||||
|
Copyright 2012
|
||||||
|
Permission is granted to...
|
||||||
|
LICENSE
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
||||||
|
#
|
||||||
|
# Specify the authors of the library, with email addresses. Email addresses
|
||||||
|
# of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also
|
||||||
|
# accepts just a name if you'd rather not provide an email address.
|
||||||
|
#
|
||||||
|
# Specify a social_media_url where others can refer to, for example a twitter
|
||||||
|
# profile URL.
|
||||||
|
#
|
||||||
|
|
||||||
|
spec.author = "Copper Labs"
|
||||||
|
|
||||||
|
|
||||||
|
# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
||||||
|
#
|
||||||
|
# If this Pod runs only on iOS or OS X, then specify the platform and
|
||||||
|
# the deployment target. You can optionally include the target after the platform.
|
||||||
|
#
|
||||||
|
spec.swift_versions = ["4.0"]
|
||||||
|
# spec.platform = :ios
|
||||||
|
spec.platform = :ios, "12.0"
|
||||||
|
|
||||||
|
# When using multiple platforms
|
||||||
|
# spec.ios.deployment_target = "5.0"
|
||||||
|
# spec.osx.deployment_target = "10.7"
|
||||||
|
# spec.watchos.deployment_target = "2.0"
|
||||||
|
# spec.tvos.deployment_target = "9.0"
|
||||||
|
|
||||||
|
|
||||||
|
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
||||||
|
#
|
||||||
|
# Specify the location from where the source should be retrieved.
|
||||||
|
# Supports git, hg, bzr, svn and HTTP.
|
||||||
|
|
||||||
|
spec.source = { :http => 'https://github.com/copper-labs/iOSFramework/releases/download/0.1.0/LinderaDetection.zip' }
|
||||||
|
|
||||||
|
# for quickly testing locally
|
||||||
|
# spec.source = { :http => 'http://127.0.0.1:8000/LinderaDetection.zip' }
|
||||||
|
|
||||||
|
|
||||||
|
# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
||||||
|
#
|
||||||
|
# CocoaPods is smart about how it includes source code. For source files
|
||||||
|
# giving a folder will include any swift, h, m, mm, c & cpp files.
|
||||||
|
# For header files it will include any header in the folder.
|
||||||
|
# Not including the public_header_files will make all headers public.
|
||||||
|
#
|
||||||
|
|
||||||
|
spec.source_files = "*.swift"
|
||||||
|
# spec.exclude_files = "Classes/Exclude"
|
||||||
|
|
||||||
|
# spec.public_header_files = ""
|
||||||
|
|
||||||
|
|
||||||
|
# ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
||||||
|
#
|
||||||
|
# A list of resources included with the Pod. These are copied into the
|
||||||
|
# target bundle with a build phase script. Anything else will be cleaned.
|
||||||
|
# You can preserve files from being cleaned, please don't preserve
|
||||||
|
# non-essential files like tests, examples and documentation.
|
||||||
|
#
|
||||||
|
|
||||||
|
# spec.resource = "icon.png"
|
||||||
|
spec.resources = ["frameworks/*/*.tflite","frameworks/*/*.binarypb"]
|
||||||
|
|
||||||
|
# spec.preserve_paths = "FilesToSave", "MoreFilesToSave"
|
||||||
|
|
||||||
|
|
||||||
|
# ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
||||||
|
#
|
||||||
|
# Link your library with frameworks, or libraries. Libraries do not include
|
||||||
|
# the lib prefix of their name.
|
||||||
|
#
|
||||||
|
|
||||||
|
# spec.framework = "SomeFramework"
|
||||||
|
# spec.frameworks = "SomeFramework", "AnotherFramework"
|
||||||
|
|
||||||
|
# spec.library = "iconv"
|
||||||
|
# spec.libraries = "iconv", "xml2"
|
||||||
|
|
||||||
|
|
||||||
|
# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
||||||
|
#
|
||||||
|
# If your library depends on compiler flags you can set them in the xcconfig hash
|
||||||
|
# where they will only apply to your library. If you depend on other Podspecs
|
||||||
|
# you can include multiple dependencies to ensure it works.
|
||||||
|
|
||||||
|
# spec.requires_arc = true
|
||||||
|
|
||||||
|
# spec.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }
|
||||||
|
# spec.dependency "OpenCV", "3.2"
|
||||||
|
spec.static_framework = true
|
||||||
|
# spec.preserve_paths = "frameworks/**/*"
|
||||||
|
spec.ios.vendored_frameworks = 'frameworks/*.framework'
|
||||||
|
spec.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' ,
|
||||||
|
'OTHER_LDFLAGS' => '$(inherited) -force_load $(PODS_ROOT)/LinderaDetection/frameworks/MPPoseTracking.framework/MPPoseTracking' }
|
||||||
|
spec.user_target_xcconfig = {
|
||||||
|
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' ,
|
||||||
|
'OTHER_LDFLAGS' => '$(inherited) -force_load $(PODS_ROOT)/LinderaDetection/frameworks/MPPoseTracking.framework/MPPoseTracking' }
|
||||||
|
spec.libraries = 'stdc++'
|
||||||
|
|
||||||
|
|
||||||
|
# spec.xcconfig = {
|
||||||
|
# 'FRAMEWORK_SEARCH_PATH[sdk=iphoneos*]' => '$(inherited) "$(PODS_ROOT)/frameworks"',
|
||||||
|
# 'OTHERCFLAGS[sdk=iphoneos*]' => '$(inherited) -iframework "$(PODS_ROOT)/frameworks"',
|
||||||
|
# 'OTHER_LDFLAGS[sdk=iphoneos*]' => '$(inherited) -framework frameworks'
|
||||||
|
# }
|
||||||
|
end
|
13
mediapipe/swift/solutions/lindera/README.md
Normal file
13
mediapipe/swift/solutions/lindera/README.md
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
## CocoaPods
|
||||||
|
|
||||||
|
### Building Pod zipfile
|
||||||
|
```shell
|
||||||
|
bazel build -c opt --config=ios_fat --cxxopt=--std=c++17 --copt=-fembed-bitcode //mediapipe/swift/solutions/lindera:podgen
|
||||||
|
```
|
||||||
|
|
||||||
|
### Pushing Pods
|
||||||
|
|
||||||
|
here clspecs is the name of pod specs repository
|
||||||
|
```shell
|
||||||
|
pod repo push clspecs LinderaDetection.podspec --skip-import-validation
|
||||||
|
```
|
6
third_party/opencv_ios.BUILD
vendored
6
third_party/opencv_ios.BUILD
vendored
|
@ -10,6 +10,12 @@ load(
|
||||||
"apple_static_framework_import",
|
"apple_static_framework_import",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "OpencvFrameworkContents",
|
||||||
|
srcs = glob(["opencv2.framework/**"]),
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
apple_static_framework_import(
|
apple_static_framework_import(
|
||||||
name = "OpencvFramework",
|
name = "OpencvFramework",
|
||||||
framework_imports = glob(["opencv2.framework/**"]),
|
framework_imports = glob(["opencv2.framework/**"]),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user