-
Notifications
You must be signed in to change notification settings - Fork 245
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
I cannot obtain Landmark points #14
Comments
Pretty much the same here. Basicly I got an image from an OpenCV cameraView or an OpenCV Mat and I can't figure out how to get the landmark from there. Could you please help me =) ? I'm not so experienced so don't hesitate to be really precise on how to get the faces and landmarks from an OpenCV Mat ! Thanks !! |
Are you using the one that is copied to SD card? I am not sure why but it only seems to work if you use that one. I thought it was unnecessary so I tried loading directly from raw folder myself, but that does not work for some reason (anyone know why?). Make sure it is copied correctly as in the example. |
did you guys find the answer for crash: "Fatal signal 6 (SIGABRT), code -6 in tid 32077 (Thread-12710)". |
If you have this problem-cannot get landmark yet, change shape predictor dat file this url.
I don't know this problem well, I think your dat file is too old to use your build verson. |
@tlehffkffk I got the same problem. I changed to your .dat file but still doesn't work. Is there any other methods to fix this? Thank you. |
It seems like the problem is coming from screen overlay. My friend modify this then he can use the application(my app and demo). |
Hi @clementf2b , please can you explain more precisely how your friend fixed it? |
To make it work, you need to ensure a couple of things:
Hope helping :) |
Thank you for you reply @EzequielAdrianM . In my case, face detection is working perfectly and it's quite precise. This leads me to to exclude your point 3 . I only have problems detecting landmarks. I've enabled both read and write permissions on external storage (but I'm working on camera frames therefore, this shouldn't be that important). Even using your .dat file I still have the same problem. As for the image format, Bitmap is perfect for my purpose and given the fact that the face detection is working and the same bitmaps, converted to jpg and saved in the internal memory look good, confirms that they were converted properly from NV21. Thank you for your link tho, I bet your code can speed up the conversion process :) n.b. I can visualise all the landmarks running the original demo. I feel like I'm missing something stupid but still I can't figure it out. |
@Izzy88 My friend only downloaded the demo Dlib apk and install it on the phone. Then it can detect the landmark result. But I still dun know the major problem. My feel is same as your last sentence |
Sometimes stupid simple things can cause a lot of problems. I would like to see your Android Studio project.. Otherwise I can't know what is going wrong. |
@clementf2b Thank you anyway :) |
@Izzy88 Perhaps there is something else besides permitions? I was granting permissions as follow:
but still getings 0 from getFaceLandmarks(); Regards! |
to gerardsimons, The dat file has to be copied to sdcard so the native code can assess it. Otherwise, native code cannot access res/raw folder like java code does. |
It seems like there is issue with arm64-v8a . In CPU architecture arm64-v8a we are getting only face coordinates but ArrayList of landmark points are empty. |
So what worked for me, alongside the classes and files being the same as this repository (on armeabi-v7a) is:
|
Same problem, I use dlib + opencv to detect face, just detect a rectangle but no 68 landmarks.
// create this class
// call verifyStoragePermissions in onCreate() MainActivity: |
I had the same problem. It turned out that I initialized the detector in the frame processor and not in the MainActivity. I solved it by moving the initialization to the MainActivity. |
You also need to ask the WRITE_EXTERNAL_STORAGE & READ_EXTERNAL_STORAGE runtime permission. This fixed my issue. |
I've tried to integrate this library by several ways, but none works.
Regarding gradle, the library only "works" if I use v.1.0.2 (which is not published in your git main page); otherwise I get crash: "Fatal signal 6 (SIGABRT), code -6 in tid 32077 (Thread-12710)".
From your demo, if I import the dlib module to my project, it "works".
I say "works" because I only get the bound (Rect) of the faces, the "getFaceLandmark()" method returns 0 points and I don't know why :/
However, if I copy my code (an example with hardware.camera not with camera2) to the project of your demo, everything works fine, I get all Landmark points and Bounds and no crashes... and I don't understand why.
I've checked all gradle files, if any library is missing, but no... I checked AndroidManifest too... but I don't find anything strange...
Could you help me with this?
The text was updated successfully, but these errors were encountered: