I want to detect face from gallery Image (Bitmap).
Issues
- I noticed that Firebase MLKIT is performing very slow on Gallery Image Bitmap.
- Can i still used mobile vision api for detection of face in image.( I want only detect face, dont want eyes,nose,etc)
- What should i do to improve performance for detecting face with Firebase MLKIT.
- I used Firebase Image Labeling. Firebase Image Labeling is performed fast but Face Detection is very slow comparatively.
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 successfully. I followed this link for demo: [https://github.com/hitanshu-dhawan/FirebaseMLKit]
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) {
}
Is am i doing something wrong?