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

models/hand_landmarker.task doesn't exist #5880

Open
fractalbob opened this issue Mar 3, 2025 · 2 comments
Open

models/hand_landmarker.task doesn't exist #5880

fractalbob opened this issue Mar 3, 2025 · 2 comments
Assignees
Labels
os:linux-non-arm Issues on linux distributions which run on x86-64 architecture. DOES NOT include ARM devices. platform:python MediaPipe Python issues task:hand landmarker Issues related to hand landmarker: Identify and track hands and fingers type:modelmaker Issues related to creation of custom on-device ML solutions

Comments

@fractalbob
Copy link

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

Yes

OS Platform and Distribution

Ubuntu 24.04.1 LTS

Python Version

3.9.7

MediaPipe Model Maker version

MediaPipe Tasks Vision library (which currently resolves to version 0.20230731).

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

Hand Landmarker (Hand Tracking)

Describe the actual behavior

Calling setModelAssetPath("models/hand_landmarker.task") returns file not found

Describe the expected behaviour

models/hand_landmarker.task should exist

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

private void setupHandTracking() {         HandLandmarker.HandLandmarkerOptions options = HandLandmarker.HandLandmarkerOptions.builder()                 .setBaseOptions(BaseOptions.builder()                         .setModelAssetPath("models/hand_landmarker.task")  // ✅ Correct format with a subdirectory                         .build())                 .setRunningMode(RunningMode.LIVE_STREAM)                 .setResultListener((HandLandmarkerResult result, MPImage image) -> {                     // ✅ This callback is required when using LIVE_STREAM mode                     if (result != null && !result.landmarks().isEmpty()) {                         System.out.println("Detected hand landmarks: " + result.landmarks().get(0));                     }                 })                 .build();          // Debugging: Verify if the model file is available before initializing HandLandmarker         File modelFile = new File(getFilesDir(), "models/hand_landmarker.task");          if (!modelFile.exists()) {             Log.e("HandLandmarker", "❌ Model file NOT FOUND at: " + modelFile.getAbsolutePath());         } else {             Log.d("HandLandmarker", "✅ Model file FOUND at: " + modelFile.getAbsolutePath());         }          handLandmarker = HandLandmarker.createFromOptions(this, options);     }

Other info / Complete Logs

@fractalbob fractalbob added the type:modelmaker Issues related to creation of custom on-device ML solutions label Mar 3, 2025
@kuaashish kuaashish assigned kuaashish and unassigned kalyan2789g Mar 4, 2025
@kuaashish kuaashish added os:linux-non-arm Issues on linux distributions which run on x86-64 architecture. DOES NOT include ARM devices. task:hand landmarker Issues related to hand landmarker: Identify and track hands and fingers platform:python MediaPipe Python issues labels Mar 4, 2025
@kuaashish
Copy link
Collaborator

Hi @fractalbob,

Could you please provide more details, including a complete, standalone code that can help us reproduce the issue on our end?

Thank you!!

@kuaashish kuaashish added the stat:awaiting response Waiting for user response label Mar 4, 2025
@fractalbob
Copy link
Author

Here's a reproducible test case: https://drive.google.com/file/d/1MGRkQ0bWYMVKe25Dp5hug9oW9ZdjUR0A/view?usp=sharing. Unzip the file and open the resulting folder with Android Studio, then run the app. It should fail in MainActivity.java at line 207 with a SEGV fault because the file models/hand_landmarker.task doesn't exist.

@google-ml-butler google-ml-butler bot removed the stat:awaiting response Waiting for user response label Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os:linux-non-arm Issues on linux distributions which run on x86-64 architecture. DOES NOT include ARM devices. platform:python MediaPipe Python issues task:hand landmarker Issues related to hand landmarker: Identify and track hands and fingers type:modelmaker Issues related to creation of custom on-device ML solutions
Projects
None yet
Development

No branches or pull requests

3 participants