Merge pull request #4735 from priankakariatyml:ios-doc-updates

PiperOrigin-RevId: 561469442
This commit is contained in:
Copybara-Service 2023-08-30 15:39:20 -07:00
commit 30802b80cd
2 changed files with 26 additions and 5 deletions

View File

@ -54,6 +54,8 @@ CALCULATORS_AND_GRAPHS = [
"//mediapipe/tasks/cc/text/text_embedder:text_embedder_graph", "//mediapipe/tasks/cc/text/text_embedder:text_embedder_graph",
"//mediapipe/tasks/cc/vision/face_detector:face_detector_graph", "//mediapipe/tasks/cc/vision/face_detector:face_detector_graph",
"//mediapipe/tasks/cc/vision/face_landmarker:face_landmarker_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/image_classifier:image_classifier_graph",
"//mediapipe/tasks/cc/vision/object_detector:object_detector_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/MPPConnection.h",
"//mediapipe/tasks/ios/components/containers:sources/MPPDetection.h", "//mediapipe/tasks/ios/components/containers:sources/MPPDetection.h",
"//mediapipe/tasks/ios/components/containers:sources/MPPLandmark.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/MPPBaseOptions.h",
"//mediapipe/tasks/ios/core:sources/MPPTaskOptions.h", "//mediapipe/tasks/ios/core:sources/MPPTaskOptions.h",
"//mediapipe/tasks/ios/core:sources/MPPTaskResult.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/MPPFaceLandmarker.h",
"//mediapipe/tasks/ios/vision/face_landmarker:sources/MPPFaceLandmarkerOptions.h", "//mediapipe/tasks/ios/vision/face_landmarker:sources/MPPFaceLandmarkerOptions.h",
"//mediapipe/tasks/ios/vision/face_landmarker:sources/MPPFaceLandmarkerResult.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/MPPImageClassifier.h",
"//mediapipe/tasks/ios/vision/image_classifier:sources/MPPImageClassifierOptions.h", "//mediapipe/tasks/ios/vision/image_classifier:sources/MPPImageClassifierOptions.h",
"//mediapipe/tasks/ios/vision/image_classifier:sources/MPPImageClassifierResult.h", "//mediapipe/tasks/ios/vision/image_classifier:sources/MPPImageClassifierResult.h",
@ -161,6 +170,7 @@ apple_static_xcframework(
":MPPBaseOptions.h", ":MPPBaseOptions.h",
":MPPCategory.h", ":MPPCategory.h",
":MPPClassificationResult.h", ":MPPClassificationResult.h",
":MPPClassifierOptions.h",
":MPPDetection.h", ":MPPDetection.h",
":MPPLandmark.h", ":MPPLandmark.h",
":MPPConnection.h", ":MPPConnection.h",
@ -178,6 +188,12 @@ apple_static_xcframework(
":MPPImageClassifier.h", ":MPPImageClassifier.h",
":MPPImageClassifierOptions.h", ":MPPImageClassifierOptions.h",
":MPPImageClassifierResult.h", ":MPPImageClassifierResult.h",
":MPPHandLandmarker.h",
":MPPHandLandmarkerOptions.h",
":MPPHandLandmarkerResult.h",
":MPPGestureRecognizer.h",
":MPPGestureRecognizerOptions.h",
":MPPGestureRecognizerResult.h",
":MPPObjectDetector.h", ":MPPObjectDetector.h",
":MPPObjectDetectorOptions.h", ":MPPObjectDetectorOptions.h",
":MPPObjectDetectorResult.h", ":MPPObjectDetectorResult.h",
@ -185,6 +201,8 @@ apple_static_xcframework(
deps = [ deps = [
"//mediapipe/tasks/ios/vision/face_detector:MPPFaceDetector", "//mediapipe/tasks/ios/vision/face_detector:MPPFaceDetector",
"//mediapipe/tasks/ios/vision/face_landmarker:MPPFaceLandmarker", "//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/image_classifier:MPPImageClassifier",
"//mediapipe/tasks/ios/vision/object_detector:MPPObjectDetector", "//mediapipe/tasks/ios/vision/object_detector:MPPObjectDetector",
], ],

View File

@ -124,7 +124,7 @@ function build_ios_frameworks_and_libraries {
function create_framework_archive { function create_framework_archive {
# Change to the Bazel iOS output directory. # Change to the Bazel iOS output directory.
pushd "${BAZEL_IOS_OUTDIR}" pushd "${MPP_ROOT_DIR}"
# Create the temporary directory for the given framework. # Create the temporary directory for the given framework.
local ARCHIVE_NAME="${FRAMEWORK_NAME}-${MPP_BUILD_VERSION}" local ARCHIVE_NAME="${FRAMEWORK_NAME}-${MPP_BUILD_VERSION}"
@ -165,9 +165,9 @@ function create_framework_archive {
#----- (3) Move the framework to the destination ----- #----- (3) Move the framework to the destination -----
if [[ "${ARCHIVE_FRAMEWORK}" == true ]]; then if [[ "${ARCHIVE_FRAMEWORK}" == true ]]; then
local TARGET_DIR="$(realpath "${FRAMEWORK_NAME}")"
# Create the framework archive directory. # Create the framework archive directory.
mkdir -p "${FRAMEWORK_NAME}"
local TARGET_DIR="$(realpath "${FRAMEWORK_NAME}")"
local FRAMEWORK_ARCHIVE_DIR local FRAMEWORK_ARCHIVE_DIR
if [[ "${IS_RELEASE_BUILD}" == true ]]; then if [[ "${IS_RELEASE_BUILD}" == true ]]; then
@ -186,8 +186,11 @@ function create_framework_archive {
mv "${MPP_ARCHIVE_FILE}" "${FRAMEWORK_ARCHIVE_DIR}" mv "${MPP_ARCHIVE_FILE}" "${FRAMEWORK_ARCHIVE_DIR}"
popd popd
# Move the target directory to the Kokoro artifacts directory. # Move the target directory to the Kokoro artifacts directory and clean up
mv "${TARGET_DIR}" "$(realpath "${DEST_DIR}")"/ # 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 else
rsync -r "${MPP_TMPDIR}/" "$(realpath "${DEST_DIR}")/" rsync -r "${MPP_TMPDIR}/" "$(realpath "${DEST_DIR}")/"
fi fi