Android vision - Face detector dependencies are no

2019-02-26 05:35发布

问题:

I am trying to test the google mobile vision api, for face detection, so I started with the demos from GitHub mobile vision. I tried both apps, FaceTracker and photo-demo, and the same issue rises with downloading the native face detector library.

For Nexus 5x, Galaxy S6 Edge not working, Galaxy S4, Galaxy Alpha is working.

What I see in the logs, when not working is:

For the app:

05-19 17:52:07.301 14909-14909/com.google.android.gms.samples.vision.face.photo W/System: ClassLoader referenced unknown path: /data/app/com.google.android.gms.samples.vision.face.photo-1/lib/arm64
05-19 17:52:07.725 14909-14909/com.google.android.gms.samples.vision.face.photo W/System: ClassLoader referenced unknown path: /data/app/com.google.android.gms.samples.vision.face.photo-1/lib/arm64
05-19 17:52:08.043 14909-14909/com.google.android.gms.samples.vision.face.photo D/ChimeraCfgMgr: Reading stored module config
05-19 17:52:08.068 14909-14909/com.google.android.gms.samples.vision.face.photo W/System: ClassLoader referenced unknown path: /data/user/0/com.google.android.gms/app_chimera/m/00000001/n/arm64-v8a
05-19 17:52:08.077 14909-14909/com.google.android.gms.samples.vision.face.photo D/ChimeraFileApk: Primary ABI of requesting process is arm64-v8a
05-19 17:52:08.079 14909-14909/com.google.android.gms.samples.vision.face.photo D/ChimeraFileApk: Classloading successful. Optimized code found.
05-19 17:52:08.105 14909-14909/com.google.android.gms.samples.vision.face.photo I/FaceDetectorCreatorImpl: Requesting download for vision face detector
05-19 17:52:08.107 14909-14909/com.google.android.gms.samples.vision.face.photo W/FaceDetectorHandle: Native face detector not yet available.  Reverting to no-op detection.
05-19 17:52:08.253 14909-14909/com.google.android.gms.samples.vision.face.photo W/PhotoViewerActivity: Face detector dependencies are not yet available.
05-19 17:52:08.263 14909-14941/com.google.android.gms.samples.vision.face.photo D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
05-19 17:52:08.312 14909-14941/com.google.android.gms.samples.vision.face.photo I/Adreno: QUALCOMM build                   : 63c06b2, I8366cd0437
                                                                                          Build Date                       : 12/06/15
                                                                                          OpenGL ES Shader Compiler Version: XE031.05.13.02
                                                                                          Local Branch                     : mybranch17112971
                                                                                          Remote Branch                    : quic/LA.BF64.1.2.9_v2
                                                                                          Remote Branch                    : NONE
                                                                                          Reconstruct Branch               : NOTHING
05-19 17:52:08.317 14909-14941/com.google.android.gms.samples.vision.face.photo I/OpenGLRenderer: Initialized EGL, version 1.4

After doing some digging in the logs, by applying the vision filter for tags I see:

05-19 17:52:08.124 10421-10526/? I/Vision: Attempting to open download_details.json in com.google.android.gms.vision
05-19 17:52:08.125 10421-10526/? W/Vision: Failed to open download_details.json in com.google.android.gms.vision: android.content.pm.PackageManager$NameNotFoundException: com.google.android.gms.vision
05-19 17:52:08.126 10421-10526/? I/Vision: Attempting to open download_details.json in com.google.android.gms.policy_ccocr_vision
05-19 17:52:08.127 10421-10526/? W/Vision: Failed to open download_details.json in com.google.android.gms.policy_ccocr_vision: android.content.pm.PackageManager$NameNotFoundException: com.google.android.gms.policy_ccocr_vision
05-19 17:52:08.127 10421-10526/? W/Vision: Reading download details from hard-coded Java
05-19 17:52:08.443 10421-10526/? E/Vision: Download Failed: Status{statusCode=Download errored: The download was configured incorrectly., resolution=null}

Similar questions:

  1. Google Vision barcode library not found
  2. FaceDetectorHandle﹕ Native face detector not yet available. Reverting to no-op detection

Tried the solution with freeing up space, clearing cache, no result.

What can I do next ? Is it possible to manually download the libraries ? Does anyone have a clear indication why is the library not downloading ?

EDIT

So it looks like there is an issue with the Mobile Vision api https://github.com/googlesamples/android-vision/issues/98. Hope the developers come with a solution soon.

EDIT

The issue has been resolved by updating the play service library.

回答1:

According to the release notes of Google Play Services v9.0 there was a bug in the service and it was disabled.

In release v9.2 it was enabled again. Check out the release notes: https://developers.google.com/vision/release-notes#bug_fixes



回答2:

My problem was with text (TextRecognizer) not face and the problem was storage, I had 300MB free but it needed 10% of my phone according to this link

When is the intent ACTION_DEVICE_STORAGE_LOW broadcasted?