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

Mediapipe Vision Task Files Not Loading from Local Server on iOS Devices with Version <16 #5767

Open
nandanpytech opened this issue Dec 5, 2024 · 4 comments
Assignees
Labels
platform:ios MediaPipe IOS issues platform:javascript MediaPipe Javascript issues stat:awaiting response Waiting for user response task:face landmarker Issues related to Face Landmarker: Identify facial features for visual effects and avatars. type:support General questions

Comments

@nandanpytech
Copy link

nandanpytech commented Dec 5, 2024

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

None

OS Platform and Distribution

iOS with version < 16

MediaPipe Tasks SDK version

0.10.18

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

Face LandMark Detection

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

JavaScript

Describe the actual behavior

When serving Mediapipe Vision task files (e.g., .wasm, .task) from a local server, the application fails to work on specific iOS devices (e.g., iPhone 12, iPhone 13) running iOS versions less than 16. However, when these files are served from a CDN, the application works perfectly fine under the same conditions. This discrepancy suggests that the issue might be related to how local servers handle requests on older iOS versions.

Describe the expected behaviour

It should work fine when we server from local.

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

const wasmFileSet = { wasmLoaderPath: 'assets/detection-models/vision_wasm_internal.js', wasmBinaryPath: 'assets/detection-models/vision_wasm_internal.wasm', };
async initializeFaceLandMarker() {
try {
this.faceLandmarker = await FaceLandmarker.createFromOptions(wasmFileSet, {
baseOptions: {
modelAssetPath: TaskFile.face,
delegate: processingUnit,
},
numFaces: 1,
minTrackingConfidence: 0.8,
minFaceDetectionConfidence: 0.8,
runningMode: 'VIDEO',
outputFacialTransformationMatrixes: true,
});
return this.faceLandmarker;
} catch (error) {
console.log('error: ', error);
}
}

Other info / Complete Logs

No response

@kuaashish kuaashish assigned kuaashish and unassigned kalyan2789g Dec 5, 2024
@kuaashish kuaashish added platform:ios MediaPipe IOS issues platform:javascript MediaPipe Javascript issues task:face landmarker Issues related to Face Landmarker: Identify facial features for visual effects and avatars. type:support General questions labels Dec 5, 2024
@kuaashish
Copy link
Collaborator

Hi @nandanpytech,

It seems that the issue is related to the Wasm file not functioning in offline mode. This appears to be a similar issue #5729 that has been reported previously. Could you confirm if the version is greater than 16 and if you are experiencing the same behavior?

Thank you!!

@kuaashish kuaashish added the stat:awaiting response Waiting for user response label Dec 5, 2024
@nandanpytech
Copy link
Author

It works fine with a locally downloaded .wasm file if the version is greater than 16.

@google-ml-butler google-ml-butler bot removed the stat:awaiting response Waiting for user response label Dec 5, 2024
@schmidt-sebastian
Copy link
Collaborator

How are you serving the files to the SDK? Are you hosting them on a local server?

@kuaashish
Copy link
Collaborator

Hi @nandanpytech,.

Could you please review the information provided above and let us know any further details?

Thank you!!

@kuaashish kuaashish added the stat:awaiting response Waiting for user response label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:ios MediaPipe IOS issues platform:javascript MediaPipe Javascript issues stat:awaiting response Waiting for user response task:face landmarker Issues related to Face Landmarker: Identify facial features for visual effects and avatars. type:support General questions
Projects
None yet
Development

No branches or pull requests

4 participants