Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use MediaPipeTasksVision with OpenCV on iOS. #5834

Open
v-hogood opened this issue Jan 21, 2025 · 1 comment
Open

Can't use MediaPipeTasksVision with OpenCV on iOS. #5834

v-hogood opened this issue Jan 21, 2025 · 1 comment
Assignees
Labels
platform:ios MediaPipe IOS issues task::all All tasks of MediaPipe type:support General questions

Comments

@v-hogood
Copy link

Have I written custom code (as opposed to using a stock example script provided in MediaPipe)

No

OS Platform and Distribution

iOS 15.0

MediaPipe Tasks SDK version

0.10.14

Task name (e.g. Image classification, Gesture recognition etc.)

MediaPipeTasksVision

Programming Language and version (e.g. C++, Python, Java)

Swift

Describe the actual behavior

Build fails with 346 duplicate symbols.

Describe the expected behaviour

Build succeeds.

Standalone code/steps you may have used to try to get what you need

https://github.com/google-ai-edge/mediapipe-samples/tree/main/examples/image_classification/ios

Other info / Complete Logs

In the image_classification example add:
pod 'OpenCV-Dynamic-Framework'
to the Podfile.
Then try to build in Xcode and get:
duplicate symbol '_OBJC_CLASS_$_MatOfPoint3f' in:
    /Users/howardgood/Library/Developer/Xcode/DerivedData/ImageClassifier-dkioidhfgemwblbcqjglkdhicnlo/Build/Products/Debug-iphoneos/XCFrameworkIntermediates/MediaPipeTasksCommon/MediaPipeTasksCommon.framework/MediaPipeTasksCommon[1628](MatOfPoint3f.o)
    /Users/howardgood/Library/Developer/Xcode/DerivedData/ImageClassifier-dkioidhfgemwblbcqjglkdhicnlo/Build/Products/Debug-iphoneos/XCFrameworkIntermediates/OpenCV-Dynamic-Framework/opencv2.framework/opencv2[arm64][1006](MatOfPoint3f.o)
etc. etc.
@v-hogood
Copy link
Author

MediaPipeTasksCommon xcframework should hide its public symbols like TensorFlowLite xcframework does:

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/ios/ios.bzl#L93

@kuaashish kuaashish assigned kuaashish and unassigned kalyan2789g Jan 22, 2025
@kuaashish kuaashish added platform:ios MediaPipe IOS issues task::all All tasks of MediaPipe type:support General questions labels Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:ios MediaPipe IOS issues task::all All tasks of MediaPipe type:support General questions
Projects
None yet
Development

No branches or pull requests

3 participants