Open georgelxl6 opened 1 day ago
Hi @georgelxl6,
Yes, you can run the npm package offline. However, it seems you are using the legacy @mediapipe/hands package (please correct me if I am wrong). This solution has been upgraded and is now part of the Task Vision package https://www.npmjs.com/package/@mediapipe/tasks-vision. Here's an example implementation for the updated Hand Landmarker:
const vision = await FilesetResolver.forVisionTasks(
"https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision/wasm"
);
const handLandmarker = await HandLandmarker.createFromModelPath(vision,
"https://storage.googleapis.com/mediapipe-models/hand_landmarker/hand_landmarker/float16/1/hand_landmarker.task"
);
const image = document.getElementById("image") as HTMLImageElement;
const landmarks = handLandmarker.detect(image);
You can find the Hand Landmarker overview here and the web implementation guide here.(https://ai.google.dev/edge/mediapipe/solutions/vision/hand_landmarker) and Implenetation for Web you can find here.
Please note that support for the old package @mediapipe/hands has been discontinued, as mentioned here. Let us know if you encounter any issues!
Thank you!!
Hi @kuaashish,
Thank you for your response. Yes, it’s similar to what I’m using now. However, I’m planning to use it locally. The link below will not work offline: https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision/wasm
Thank you
Have I written custom code (as opposed to using a stock example script provided in MediaPipe)
None
OS Platform and Distribution
Windows
MediaPipe version
0.4.1675469240
Bazel version
No response
Solution
No response
Programming Language and version
Javascript
Describe the actual behavior
No response
Describe the expected behaviour
No response
Standalone code/steps you may have used to try to get what you need
Other info / Complete Logs
No response