android-vision icon indicating copy to clipboard operation
android-vision copied to clipboard

No face detection on Samsung Galaxy S4 (GT-I9505) - Android 5.0.1

Open Syzygy2048 opened this issue 10 years ago • 12 comments

I tried to run both my modified app as well as a freshly checked out project on a Galaxy S4 however no faces could be detected. According to what I can see from the debugger the images look fine and it should be easy to detect a face on them, however the FaceDetector simply returned no detected faces.

Haven't encountered problems like this on any other phone I tried it with.

Syzygy2048 avatar Oct 20 '15 10:10 Syzygy2048

No faces detected on: Galaxy S4 - (but working on S2, S3, S4 mini, S5, S6) Galaxy Trend Plus Sony Xperia L - (but working on Xperia Z1 Compact)

On some phones (e.g. Galaxy Note 2), it didn't detect faces at first, but after a short while (which might include taking a picture as well as starting and stopping the CameraSource/Preview), it started working fine, even when restarting the app. Note that these tests were done with my modified app.

Syzygy2048 avatar Oct 20 '15 12:10 Syzygy2048

Whenever face detection is run for the first time on a device, it needs to download a library. In your case, I'm guessing that it may be unable to download the library. First, make a check to see if the detector is "operational", as done here:

https://github.com/googlesamples/android-vision/blob/master/visionSamples/FaceTracker/app/src/main/java/com/google/android/gms/samples/vision/face/facetracker/FaceTrackerActivity.java#L142

The most common issue is low storage space, where "low" on some devices is defined as "less than 10% storage space remaining". We are working to improve this for future releases. You can check for this condition in your code as shown here:

https://github.com/googlesamples/android-vision/blob/master/visionSamples/photo-demo/app/src/main/java/com/google/android/gms/samples/vision/face/photo/PhotoViewerActivity.java#L88

pm0733464 avatar Oct 20 '15 15:10 pm0733464

A friend reported 500MB of free storage space to me (and apparently had to clean up some space to install it in the first place). The low memory warning that I implemented analogous to the linked code didn't display. Unfortunately I was not able to debug into it yet.

Syzygy2048 avatar Nov 07 '15 18:11 Syzygy2048

Same issue on LG G Pad 8.3 at first - tried it for at least 10 minutes ... until we opened the app a few hours later when I wanted to debug it... then it worked. Could this be related to crazy slow download speeds (for whatever reasons, the network seemed to work fine)?

Syzygy2048 avatar Nov 09 '15 23:11 Syzygy2048

I'm not sure. I'd recommend looking at the logs to track down the cause.

pm0733464 avatar Nov 10 '15 16:11 pm0733464

To me it works on Nexus 5x, but not on Nexus 5

AndroidDeveloperLB avatar May 18 '16 09:05 AndroidDeveloperLB

Works on my nexus5, experia z3, galaxy s4mini, toshiba excite pro 10 tablet. On sony and samsung detection was working on landscape orientation only (when i works with front camera) but is easy to handle screen rotation. I tried it on front camera stream and pic taken by front cam. Not any idea why sony and nexus are giving such different camera source. Looks like nexus camera support some auto-rotation(?) And just remember: google face tracker sample is designed to use back camera and landscape orientation - other cam and orientation may required some custom updates.

kudlatyIE avatar May 18 '16 11:05 kudlatyIE

@kudlatyIE I actually tested the very basic sample "photo-demo", which has the bitmap inside the project itself. Here's what I wrote about it: https://github.com/googlesamples/android-vision/issues/95

AndroidDeveloperLB avatar May 18 '16 11:05 AndroidDeveloperLB

On SGS4 (I9505) it actually did work for me, and on G2 it worked only from the second time. It also doesn't work on Nexus 4.

AndroidDeveloperLB avatar May 18 '16 13:05 AndroidDeveloperLB

can you help me please !! the photo appear but without face detection in the virtual device but appear correctly surrounding by the green rectangle in The emulator i follow the steps correctly to detect faces but no changes happened

mokhtarmoustafa avatar Mar 01 '17 09:03 mokhtarmoustafa

See my comment above on Oct 20, 2015. Please check the operational status. How much free space is there on your device?

pm0733464 avatar Mar 01 '17 14:03 pm0733464

I'm getting this error... do we have to manually download the vision library on samsung phones(android 7.1.1)? I tried other phones(with android 7and android 5) where it was updated automatically with auto update in play store

2019-04-02 17:41:42.974 1014-1393/com.gsrathoreniks.facefilter I/Vision: libmobile_vision_face.so library load status: false 2019-04-02 17:41:42.975 1014-1393/com.gsrathoreniks.facefilter W/DynamiteModule: Local module descriptor class for com.google.android.gms.vision.dynamite not found. 2019-04-02 17:41:42.997 1014-1393/com.gsrathoreniks.facefilter I/DynamiteModule: Considering local module com.google.android.gms.vision.dynamite:0 and remote module com.google.android.gms.vision.dynamite:1402 2019-04-02 17:41:42.997 1014-1393/com.gsrathoreniks.facefilter I/DynamiteModule: Selected remote version of com.google.android.gms.vision.dynamite, version >= 1402 2019-04-02 17:41:43.023 1014-1393/com.gsrathoreniks.facefilter I/Vision: Loading library libmobile_vision_face.so

Gradleybear avatar Apr 02 '19 12:04 Gradleybear