diff --git a/mediapipe/tasks/ios/BUILD b/mediapipe/tasks/ios/BUILD index 14a409e7..7f3db7f7 100644 --- a/mediapipe/tasks/ios/BUILD +++ b/mediapipe/tasks/ios/BUILD @@ -54,6 +54,8 @@ CALCULATORS_AND_GRAPHS = [ "//mediapipe/tasks/cc/text/text_embedder:text_embedder_graph", "//mediapipe/tasks/cc/vision/face_detector:face_detector_graph", "//mediapipe/tasks/cc/vision/face_landmarker:face_landmarker_graph", + "//mediapipe/tasks/cc/vision/hand_landmarker:hand_landmarker_graph", + "//mediapipe/tasks/cc/vision/gesture_recognizer:gesture_recognizer_graph", "//mediapipe/tasks/cc/vision/image_classifier:image_classifier_graph", "//mediapipe/tasks/cc/vision/object_detector:object_detector_graph", ] @@ -69,6 +71,7 @@ strip_api_include_path_prefix( "//mediapipe/tasks/ios/components/containers:sources/MPPConnection.h", "//mediapipe/tasks/ios/components/containers:sources/MPPDetection.h", "//mediapipe/tasks/ios/components/containers:sources/MPPLandmark.h", + "//mediapipe/tasks/ios/components/processors:sources/MPPClassifierOptions.h", "//mediapipe/tasks/ios/core:sources/MPPBaseOptions.h", "//mediapipe/tasks/ios/core:sources/MPPTaskOptions.h", "//mediapipe/tasks/ios/core:sources/MPPTaskResult.h", @@ -86,6 +89,12 @@ strip_api_include_path_prefix( "//mediapipe/tasks/ios/vision/face_landmarker:sources/MPPFaceLandmarker.h", "//mediapipe/tasks/ios/vision/face_landmarker:sources/MPPFaceLandmarkerOptions.h", "//mediapipe/tasks/ios/vision/face_landmarker:sources/MPPFaceLandmarkerResult.h", + "//mediapipe/tasks/ios/vision/hand_landmarker:sources/MPPHandLandmarker.h", + "//mediapipe/tasks/ios/vision/hand_landmarker:sources/MPPHandLandmarkerOptions.h", + "//mediapipe/tasks/ios/vision/hand_landmarker:sources/MPPHandLandmarkerResult.h", + "//mediapipe/tasks/ios/vision/gesture_recognizer:sources/MPPGestureRecognizer.h", + "//mediapipe/tasks/ios/vision/gesture_recognizer:sources/MPPGestureRecognizerOptions.h", + "//mediapipe/tasks/ios/vision/gesture_recognizer:sources/MPPGestureRecognizerResult.h", "//mediapipe/tasks/ios/vision/image_classifier:sources/MPPImageClassifier.h", "//mediapipe/tasks/ios/vision/image_classifier:sources/MPPImageClassifierOptions.h", "//mediapipe/tasks/ios/vision/image_classifier:sources/MPPImageClassifierResult.h", @@ -161,6 +170,7 @@ apple_static_xcframework( ":MPPBaseOptions.h", ":MPPCategory.h", ":MPPClassificationResult.h", + ":MPPClassifierOptions.h", ":MPPDetection.h", ":MPPLandmark.h", ":MPPConnection.h", @@ -178,6 +188,12 @@ apple_static_xcframework( ":MPPImageClassifier.h", ":MPPImageClassifierOptions.h", ":MPPImageClassifierResult.h", + ":MPPHandLandmarker.h", + ":MPPHandLandmarkerOptions.h", + ":MPPHandLandmarkerResult.h", + ":MPPGestureRecognizer.h", + ":MPPGestureRecognizerOptions.h", + ":MPPGestureRecognizerResult.h", ":MPPObjectDetector.h", ":MPPObjectDetectorOptions.h", ":MPPObjectDetectorResult.h", @@ -185,6 +201,8 @@ apple_static_xcframework( deps = [ "//mediapipe/tasks/ios/vision/face_detector:MPPFaceDetector", "//mediapipe/tasks/ios/vision/face_landmarker:MPPFaceLandmarker", + "//mediapipe/tasks/ios/vision/gesture_recognizer:MPPGestureRecognizer", + "//mediapipe/tasks/ios/vision/hand_landmarker:MPPHandLandmarker", "//mediapipe/tasks/ios/vision/image_classifier:MPPImageClassifier", "//mediapipe/tasks/ios/vision/object_detector:MPPObjectDetector", ], diff --git a/mediapipe/tasks/ios/build_ios_framework.sh b/mediapipe/tasks/ios/build_ios_framework.sh index fd016010..50f5797f 100755 --- a/mediapipe/tasks/ios/build_ios_framework.sh +++ b/mediapipe/tasks/ios/build_ios_framework.sh @@ -124,7 +124,7 @@ function build_ios_frameworks_and_libraries { function create_framework_archive { # Change to the Bazel iOS output directory. - pushd "${BAZEL_IOS_OUTDIR}" + pushd "${MPP_ROOT_DIR}" # Create the temporary directory for the given framework. local ARCHIVE_NAME="${FRAMEWORK_NAME}-${MPP_BUILD_VERSION}" @@ -165,9 +165,9 @@ function create_framework_archive { #----- (3) Move the framework to the destination ----- if [[ "${ARCHIVE_FRAMEWORK}" == true ]]; then - local TARGET_DIR="$(realpath "${FRAMEWORK_NAME}")" - # Create the framework archive directory. + mkdir -p "${FRAMEWORK_NAME}" + local TARGET_DIR="$(realpath "${FRAMEWORK_NAME}")" local FRAMEWORK_ARCHIVE_DIR if [[ "${IS_RELEASE_BUILD}" == true ]]; then @@ -186,8 +186,11 @@ function create_framework_archive { mv "${MPP_ARCHIVE_FILE}" "${FRAMEWORK_ARCHIVE_DIR}" popd - # Move the target directory to the Kokoro artifacts directory. - mv "${TARGET_DIR}" "$(realpath "${DEST_DIR}")"/ + # Move the target directory to the Kokoro artifacts directory and clean up + # the artifacts directory in the mediapipe root directory even if the + # move command fails. + mv "${TARGET_DIR}" "$(realpath "${DEST_DIR}")"/ || true + rm -rf "${TARGET_DIR}" else rsync -r "${MPP_TMPDIR}/" "$(realpath "${DEST_DIR}")/" fi