flutter-ml / google_ml_kit_flutter

A flutter plugin that implements Google's standalone ML Kit
MIT License
935 stars 715 forks source link

Can't detect faces on Lenovo Tab P11 TB-J606F Tablet. P.S. Native MLKit-Vision app works well. #346

Closed GorIvanov closed 1 year ago

GorIvanov commented 1 year ago

I/flutter (11695): [CameraDescription(0, CameraLensDirection.back, 90), CameraDescription(1, CameraLensDirection.front, 270)] W/Camera (11695): The selected imageFormatGroup is not supported by Android. Defaulting to yuv420 E/libc (11695): Access denied finding property "persist.vendor.camera.privapp.list" W/com.gor.cantest(11695): type=1400 audit(0.0:1048): avc: denied { read } for name="u:object_r:vendor_persist_camera_prop:s0" dev="tmpfs" ino=14506 scontext=u:r:untrusted_app:s0:c237,c256,c512,c768 tcontext=u:object_r:vendor_persist_camera_prop:s0 tclass=file permissive=0 app=com.gor.cantest E/libc (11695): Access denied finding property "vendor.camera.aux.packagelist" E/libc (11695): Access denied finding property "vendor.camera.aux.packagelist" W/Binder:11695_2(11695): type=1400 audit(0.0:1049): avc: denied { read } for name="u:object_r:vendor_persist_camera_prop:s0" dev="tmpfs" ino=14506 scontext=u:r:untrusted_app:s0:c237,c256,c512,c768 tcontext=u:object_r:vendor_persist_camera_prop:s0 tclass=file permissive=0 app=com.gor.cantest W/Binder:11695_2(11695): type=1400 audit(0.0:1050): avc: denied { read } for name="u:object_r:vendor_persist_camera_prop:s0" dev="tmpfs" ino=14506 scontext=u:r:untrusted_app:s0:c237,c256,c512,c768 tcontext=u:object_r:vendor_persist_camera_prop:s0 tclass=file permissive=0 app=com.gor.cantest I/Camera (11695): startPreview I/Camera (11695): CameraCaptureSession onConfigured I/Camera (11695): Updating builder settings D/Camera (11695): Updating builder with feature: ExposureLockFeature D/Camera (11695): Updating builder with feature: ExposurePointFeature D/Camera (11695): Updating builder with feature: ZoomLevelFeature D/Camera (11695): Updating builder with feature: AutoFocusFeature D/Camera (11695): Updating builder with feature: NoiseReductionFeature I/Camera (11695): updateNoiseReduction | currentSetting: fast D/Camera (11695): Updating builder with feature: FocusPointFeature D/Camera (11695): Updating builder with feature: ResolutionFeature D/Camera (11695): Updating builder with feature: SensorOrientationFeature D/Camera (11695): Updating builder with feature: FlashFeature D/Camera (11695): Updating builder with feature: ExposureOffsetFeature D/Camera (11695): Updating builder with feature: FpsRangeFeature I/Camera (11695): refreshPreviewCaptureSession I/flutter (11695): IMAGE SIZE Size(1280.0, 720.0) I/Camera (11695): startPreviewWithImageStream I/Camera (11695): CameraCaptureSession onConfigured I/Camera (11695): Updating builder settings D/Camera (11695): Updating builder with feature: ExposureLockFeature D/Camera (11695): Updating builder with feature: ExposurePointFeature D/Camera (11695): Updating builder with feature: ZoomLevelFeature D/Camera (11695): Updating builder with feature: AutoFocusFeature D/Camera (11695): Updating builder with feature: NoiseReductionFeature I/Camera (11695): updateNoiseReduction | currentSetting: fast D/Camera (11695): Updating builder with feature: FocusPointFeature D/Camera (11695): Updating builder with feature: ResolutionFeature D/Camera (11695): Updating builder with feature: SensorOrientationFeature D/Camera (11695): Updating builder with feature: FlashFeature D/Camera (11695): Updating builder with feature: ExposureOffsetFeature D/Camera (11695): Updating builder with feature: FpsRangeFeature I/Camera (11695): refreshPreviewCaptureSession I/Camera (11695): CameraCaptureSession onClosed W/System (11695): A resource failed to call release. D/TransportRuntime.JobInfoScheduler(11695): Scheduling upload for context TransportContext(cct, VERY_LOW, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy5nb29nbGVhcGlzLmNvbS92MGNjL2xvZy9iYXRjaD9mb3JtYXQ9anNvbl9wcm90bzNc) with jobId=-1953029316 in 86400000ms(Backend next call timestamp 0). Attempt 1 I/DynamiteModule(11695): Considering local module com.google.mlkit.dynamite.face:10000 and remote module com.google.mlkit.dynamite.face:0 I/DynamiteModule(11695): Selected local version of com.google.mlkit.dynamite.face I/TetheringManager(11695): registerTetheringEventCallback:com.gor.cantest I/DynamiteModule(11695): Considering local module com.google.mlkit.dynamite.face:10000 and remote module com.google.mlkit.dynamite.face:0 I/DynamiteModule(11695): Selected local version of com.google.mlkit.dynamite.face D/TransportRuntime.SQLiteEventStore(11695): Storing event with priority=VERY_LOW, name=FIREBASE_ML_SDK for destination cct V/FaceDetectorV2Jni(11695): initialize.start() I/native (11695): I0927 01:38:52.540038 11853 face_detector_v2_jni.cc:33] Loading models_bundled/fssd_25_8bit_v2.tflite I/native (11695): I0927 01:38:52.543480 11853 face_detector_v2_jni.cc:33] Loading models_bundled/fssd_25_8bit_gray_v2.tflite I/native (11695): I0927 01:38:52.545442 11853 face_detector_v2_jni.cc:33] Loading models_bundled/fssd_anchors_v2.pb I/native (11695): I0927 01:38:52.546120 11853 face_detector_v2_jni.cc:33] Loading models_bundled/LMprec_600.emd I/com.gor.cantes(11695): Background concurrent copying GC freed 15603(871KB) AllocSpace objects, 23(23MB) LOS objects, 32% free, 49MB/73MB, paused 1.556ms total 147.859ms D/TransportRuntime.JobInfoScheduler(11695): Upload for context TransportContext(cct, VERY_LOW, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy5nb29nbGVhcGlzLmNvbS92MGNjL2xvZy9iYXRjaD9mb3JtYXQ9anNvbl9wcm90bzNc) is already scheduled. Returning... I/native (11695): I0927 01:38:52.563713 11853 face_detector_v2_jni.cc:33] Loading models_bundled/BCLlefteyeclosed_200.emd I/native (11695): I0927 01:38:52.564303 11853 face_detector_v2_jni.cc:33] Loading models_bundled/BCLrighteyeclosed_200.emd I/native (11695): I0927 01:38:52.564580 11853 face_detector_v2_jni.cc:33] Loading models_bundled/BCLjoy_200.emd I/native (11695): I0927 01:38:52.565042 11853 face_detector_v2_jni.cc:33] Loading models_bundled/MFT_fssd_fastgray.pb I/native (11695): I0927 01:38:52.565345 11853 face_detector_v2_jni.cc:33] Loading models_bundled/contours.tfl D/TransportRuntime.SQLiteEventStore(11695): Storing event with priority=DEFAULT, name=FIREBASE_ML_SDK for destination cct I/native (11695): I0927 01:38:52.578065 11853 face_detector_v2_jni.cc:33] Loading models_bundled/blazeface.tfl I/tflite (11695): Initialized TensorFlow Lite runtime. D/TransportRuntime.JobInfoScheduler(11695): Scheduling upload for context TransportContext(cct, DEFAULT, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy5nb29nbGVhcGlzLmNvbS92MGNjL2xvZy9iYXRjaD9mb3JtYXQ9anNvbl9wcm90bzNc) with jobId=-1958010053 in 237583ms(Backend next call timestamp 1664232170178). Attempt 1 V/FaceDetectorV2Jni(11695): initialize.end() V/FaceDetectorV2Jni(11695): initialize.start() I/native (11695): I0927 01:38:52.610791 11853 face_detector_v2_jni.cc:33] Loading models_bundled/fssd_25_8bit_v2.tflite I/native (11695): I0927 01:38:52.611330 11853 face_detector_v2_jni.cc:33] Loading models_bundled/fssd_25_8bit_gray_v2.tflite I/native (11695): I0927 01:38:52.611865 11853 face_detector_v2_jni.cc:33] Loading models_bundled/fssd_anchors_v2.pb I/native (11695): I0927 01:38:52.612320 11853 face_detector_v2_jni.cc:33] Loading models_bundled/LMprec_600.emd D/TransportRuntime.SQLiteEventStore(11695): Storing event with priority=VERY_LOW, name=FIREBASE_ML_SDK for destination cct I/native (11695): I0927 01:38:52.625092 11853 face_detector_v2_jni.cc:33] Loading models_bundled/BCLlefteyeclosed_200.emd I/native (11695): I0927 01:38:52.625509 11853 face_detector_v2_jni.cc:33] Loading models_bundled/BCLrighteyeclosed_200.emd I/native (11695): I0927 01:38:52.625768 11853 face_detector_v2_jni.cc:33] Loading models_bundled/BCLjoy_200.emd I/native (11695): I0927 01:38:52.626042 11853 face_detector_v2_jni.cc:33] Loading models_bundled/MFT_fssd_fastgray.pb I/native (11695): I0927 01:38:52.626161 11853 face_detector_v2_jni.cc:33] Loading models_bundled/contours.tfl I/native (11695): I0927 01:38:52.638247 11853 face_detector_v2_jni.cc:33] Loading models_bundled/blazeface.tfl D/TransportRuntime.JobInfoScheduler(11695): Upload for context TransportContext(cct, VERY_LOW, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy5nb29nbGVhcGlzLmNvbS92MGNjL2xvZy9iYXRjaD9mb3JtYXQ9anNvbl9wcm90bzNc) is already scheduled. Returning... V/FaceDetectorV2Jni(11695): initialize.end() V/FaceDetectorV2Jni(11695): detectFacesImageByteArray.start() E/libc (11695): Access denied finding property "ro.hardware.chipname" V/FaceDetectorV2Jni(11695): detectFacesImageByteArray.end() V/FaceDetectorV2Jni(11695): detectFacesImageByteArray.start() V/FaceDetectorV2Jni(11695): detectFacesImageByteArray.end() D/TransportRuntime.SQLiteEventStore(11695): Storing event with priority=VERY_LOW, name=FIREBASE_ML_SDK for destination cct D/TransportRuntime.JobInfoScheduler(11695): Upload for context TransportContext(cct, VERY_LOW, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy5nb29nbGVhcGlzLmNvbS92MGNjL2xvZy9iYXRjaD9mb3JtYXQ9anNvbl9wcm90bzNc) is already scheduled. Returning... D/TransportRuntime.SQLiteEventStore(11695): Storing event with priority=VERY_LOW, name=FIREBASE_ML_SDK for destination cct D/TransportRuntime.JobInfoScheduler(11695): Upload for context TransportContext(cct, VERY_LOW, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy5nb29nbGVhcGlzLmNvbS92MGNjL2xvZy9iYXRjaD9mb3JtYXQ9anNvbl9wcm90bzNc) is already scheduled. Returning... V/FaceDetectorV2Jni(11695): detectFacesImageByteArray.start() V/FaceDetectorV2Jni(11695): detectFacesImageByteArray.end() V/FaceDetectorV2Jni(11695): detectFacesImageByteArray.start() V/FaceDetectorV2Jni(11695): detectFacesImageByteArray.end()

It takes images but detected faces list size is 0: final List? faces = await _faceDetector?.processImage(inputImage);

P.S. It works well on Samsung s21 ultra, Samsung a52, Xiaomi phone, ipad Pro 10.5.

I have also tested flutter example app "ML Kit in Flutter" result is the same. But native MLKit-Vision app works well.

urmatt commented 1 year ago

Check which image is sending to ml kit. I think problem in sending image.

Lawati97 commented 1 year ago

I am getting the same issue not sure why and am sending the same image file

Mohammad-Abureesh commented 1 year ago

I am getting same issue on Redmi 9T , until now i am not found any solution. if you solved this issue add here

Mohammad-Abureesh commented 1 year ago

Check which image is sending to ml kit. I think problem in sending image.

Check which image is sending to ml kit. I think problem in sending image.

i am try to send file image and its work @GorIvanov

var input = InputImage.fromFilePath(picked.path); recognitions => size = 1

Nemasio commented 1 year ago

Hello, this issue is most probably related to the non detection of face or barcode on spacific devices: https://github.com/bharat-biradar/Google-Ml-Kit-plugin/issues/285

jomagsm commented 1 year ago

I am getting same issue on Redmi 9T , until now i am not found any solution. if you solved this issue add here

Have you solved the problem? If so, please write a solution

acoutts commented 1 year ago

This might be related to my issue here: https://github.com/flutter/flutter/issues/118350