mediapipe: Error to compile Face Detection GPU iOS
OS Platform and Distribution
iOS
Compiler version
No response
Programming Language and version
Object C
Installed using virtualenv? pip? Conda?(if python)
No response
MediaPipe version
0.9.3.0
Bazel version
6.1.1
XCode and Tulsi versions (if iOS)
XCode 14.3 Tulsi 0.20221005.88
Android SDK and NDK versions (if android)
No response
Android AAR (if android)
None
OpenCV version (if running on desktop)
4.7.0
Describe the problem
I'm trying to build a IPA but I have some problem.
I followed the installation tutorial and I configured the Mediapipe and I could run the helloworld to check if it was right configured. Everything work fine. https://developers.google.com/mediapipe/framework/getting_started/install
I had to modify the BUILD of Face Detection GPU because it wasn't work for me:
# Copyright 2019 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.
load(
"@build_bazel_rules_apple//apple:ios.bzl",
"ios_application",
)
load(
"//mediapipe/examples/ios:bundle_id.bzl",
"example_provisioning",
)
licenses(["notice"])
MIN_IOS_VERSION = "12.0"
alias(
name = "facedetectiongpu",
actual = "FaceDetectionGpuApp",
)
ios_application(
name = "FaceDetectionGpuApp",
app_icons = ["//mediapipe/examples/ios/common:AppIcon"],
bundle_id = "br.com.FaceDetectionGpu",
families = [
"iphone",
"ipad",
],
infoplists = [
"//mediapipe/examples/ios/common:Info.plist",
"Info.plist",
],
minimum_os_version = MIN_IOS_VERSION,
provisioning_profile = example_provisioning(),
deps = [
":FaceDetectionGpuAppLibrary",
"@ios_opencv//:OpencvFramework",
],
)
objc_library(
name = "FaceDetectionGpuAppLibrary",
data = [
"//mediapipe/graphs/face_detection:face_detection_mobile_gpu.binarypb",
"//mediapipe/modules/face_detection:face_detection_short_range.tflite",
],
deps = [
"//mediapipe/examples/ios/common:CommonMediaPipeAppLibrary",
] + select({
"//mediapipe:ios_i386": [],
"//mediapipe:ios_x86_64": [],
"//conditions:default": [
"//mediapipe/graphs/face_detection:mobile_calculators",
],
}),
)
I tried to build with this command:
bazel build -c opt --config=ios_arm64 mediapipe/examples/ios/facedetectiongpu:FaceDetectionGpuApp
What should I have to do?
Complete Logs
ERROR: /Users/jonathas/mediapipe-0.9.3.0/mediapipe/modules/face_detection/BUILD:72:26: Linking mediapipe/modules/face_detection/face_detection_short_range_graph_text_to_binary_graph [for tool] failed: (Exit 1): cc_wrapper.sh failed: error executing command (from target //mediapipe/modules/face_detection:face_detection_short_range_graph_text_to_binary_graph) external/local_config_cc/cc_wrapper.sh @bazel-out/darwin-opt-exec-50AE0418-ST-9facee45ddd0/bin/mediapipe/modules/face_detection/face_detection_short_range_graph_text_to_binary_graph-2.params
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
stderr (/private/var/tmp/_bazel_jonathas/a10220fb0d056c658a10d424e560e9ca/execroot/mediapipe/bazel-out/_tmp/actions/stderr-4196) 1952467 exceeds maximum size of --experimental_ui_max_stdouterr_bytes=1048576 bytes; skipping
Target //mediapipe/examples/ios/facedetectiongpu:FaceDetectionGpuApp failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 404.734s, Critical Path: 153.07s
INFO: 2762 processes: 603 internal, 2154 darwin-sandbox, 5 local.
FAILED: Build did NOT complete successfully
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 23
@ayushgdev I got this error:
`ERROR: /Users/jonathas/mediapipe-0.10.0/mediapipe/modules/face_detection/BUILD:72:26: Linking mediapipe/modules/face_detection/face_detection_short_range_graph_text_to_binary_graph [for tool] failed: (Exit 1): cc_wrapper.sh failed: error executing command (from target //mediapipe/modules/face_detection:face_detection_short_range_graph_text_to_binary_graph) external/local_config_cc/cc_wrapper.sh @bazel-out/darwin-opt-exec-50AE0418-ST-9facee45ddd0/bin/mediapipe/modules/face_detection/face_detection_short_range_graph_text_to_binary_graph-2.params
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging stderr (/private/var/tmp/_bazel_jonathas/db4b5a812122b065899cd4007b70e964/execroot/mediapipe/bazel-out/_tmp/actions/stderr-4552) 1952467 exceeds maximum size of --experimental_ui_max_stdouterr_bytes=1048576 bytes; skipping ERROR: /Users/jonathas/mediapipe-0.10.0/mediapipe/modules/face_detection/BUILD:63:26: Linking mediapipe/modules/face_detection/face_detection_short_range_gpu_graph_text_to_binary_graph [for tool] failed: (Exit 1): cc_wrapper.sh failed: error executing command (from target //mediapipe/modules/face_detection:face_detection_short_range_gpu_graph_text_to_binary_graph) external/local_config_cc/cc_wrapper.sh @bazel-out/darwin-opt-exec-50AE0418-ST-9facee45ddd0/bin/mediapipe/modules/face_detection/face_detection_short_range_gpu_graph_text_to_binary_graph-2.params
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging stderr (/private/var/tmp/_bazel_jonathas/db4b5a812122b065899cd4007b70e964/execroot/mediapipe/bazel-out/_tmp/actions/stderr-4551) 1952467 exceeds maximum size of --experimental_ui_max_stdouterr_bytes=1048576 bytes; skipping ERROR: /Users/jonathas/mediapipe-0.10.0/mediapipe/modules/face_detection/BUILD:99:26: Linking mediapipe/modules/face_detection/face_detection_graph_text_to_binary_graph [for tool] failed: (Exit 1): cc_wrapper.sh failed: error executing command (from target //mediapipe/modules/face_detection:face_detection_graph_text_to_binary_graph) external/local_config_cc/cc_wrapper.sh @bazel-out/darwin-opt-exec-50AE0418-ST-9facee45ddd0/bin/mediapipe/modules/face_detection/face_detection_graph_text_to_binary_graph-2.params
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging stderr (/private/var/tmp/_bazel_jonathas/db4b5a812122b065899cd4007b70e964/execroot/mediapipe/bazel-out/_tmp/actions/stderr-4550) 1952467 exceeds maximum size of --experimental_ui_max_stdouterr_bytes=1048576 bytes; skipping ERROR: /Users/jonathas/mediapipe-0.10.0/mediapipe/modules/face_detection/BUILD:54:26: Linking mediapipe/modules/face_detection/face_detection_short_range_cpu_graph_text_to_binary_graph [for tool] failed: (Exit 1): cc_wrapper.sh failed: error executing command (from target //mediapipe/modules/face_detection:face_detection_short_range_cpu_graph_text_to_binary_graph) external/local_config_cc/cc_wrapper.sh @bazel-out/darwin-opt-exec-50AE0418-ST-9facee45ddd0/bin/mediapipe/modules/face_detection/face_detection_short_range_cpu_graph_text_to_binary_graph-2.params`
We have release a CocoaPods version of MP Tasks for iOS (MediaPipeTasksVision at version 0.10.1-alpha-2). We are currently working on documentation, but this Pod will allow you to use the FaceDetection Task API without compilation.