android-face-detector icon indicating copy to clipboard operation
android-face-detector copied to clipboard

**ML Kit on Device Face detection API is Very Slow**

Open charlizesmith opened this issue 6 years ago • 0 comments

ML Kit on Device Face detection API is Very Slow

I want to detect face from gallery Image. I tried with Mobile vision Api and detected face successfully. On website of mobile vision api, they have mentioned about Firebase MLKIT. I also tried firebase ML Kit and detected face.

Issues 1. I noticed that Firebase MLKIT is performing very slow on Gallery Image Bitmap. 2. Can i still used mobile vision api for detection of face in image.( I want only detect face, dont want eyes,nose,etc) 3. What should i do to improve performance for detecting face with Firebase MLKIT. 4. I used Firebase Image Labeling. Firebase Image Labeling is performed fast but Face Detection is very slow comparatively.

Library Versions: implementation 'com.google.firebase:firebase-core:17.0.1' implementation 'com.google.firebase:firebase-ml-vision:22.0.0' implementation 'com.google.firebase:firebase-ml-vision-face-model:18.0.0' implementation 'com.google.firebase:firebase-ml-vision-image-label-model:18.0.0'

FirebaseVisionFaceDetectorOptions option = new FirebaseVisionFaceDetectorOptions.Builder() .setPerformanceMode(FirebaseVisionFaceDetectorOptions.ACCURATE) .setLandmarkMode(FirebaseVisionFaceDetectorOptions.ALL_LANDMARKS) .setClassificationMode(FirebaseVisionFaceDetectorOptions.ALL_CLASSIFICATIONS) .build();

FirebaseVisionFaceDetector detector = FirebaseVision.getInstance() .getVisionFaceDetector(option);

detector.detectInImage(image).addOnSuccessListener(
        new OnSuccessListener<List<FirebaseVisionFace>>() {
            @Override
            public void onSuccess(List<FirebaseVisionFace> faces) {

}

charlizesmith avatar Aug 20 '19 06:08 charlizesmith