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

getFaceLandmarks() returns 0 landmarks for detected face #68

Open
RRT955 opened this issue Mar 15, 2021 · 3 comments
Open

getFaceLandmarks() returns 0 landmarks for detected face #68

RRT955 opened this issue Mar 15, 2021 · 3 comments

Comments

@RRT955
Copy link

RRT955 commented Mar 15, 2021

I imported the library to my build.gradle, face detection is prfectlly done but the getFaceLandmarks() function returns 0 landmarks for each detected face. any idea how to solve this problem?

@basheerkohli
Copy link

Facing the same issue . Just wanna know have you updated the plugins,dependencies , AndroidX migration ?

@DevBash18
Copy link

What I have done is updated the gradle plugin , dependencies , buildtool & targetSDK versions to its max. Finally tested the application on Android 10 O.S. Able to detect the face but not land marks were detected . Fortunately the reason for this is due to the privacy policies on the Android 10 and + i.e,, scopped storages . Yes if you are testing the application on the Android 10 and +

 public static String getFaceShapeModelPath(Context context) {

        File sdcard = context.getExternalFilesDir(null); // this got resolved the issue for me. Hope this will help you
        String targetPath = sdcard.getAbsolutePath() + File.separator + "shape_predictor_68_face_landmarks.dat";
        return targetPath;
    }

@RRT955
Copy link
Author

RRT955 commented May 12, 2021

The problem is that "shape_predictor_68_face_landmarks.dat" doesn't exists on the target device, hence the model is not loaded. I still have no idea how to get this file on the target device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants