What Is Face Detection?
Face detection is a computer vision task with which you can detect faces in an image—it also detects the various part of the face, known as landmarks. Landmarks here are the parts of the human faces like eyes, ears, nose, cheeks, mouth, , etc
Application Use Cases
This Firebase ML Kit enables us to detect face in an image file. This MK Kit algorithm will returns rectangular bounding boxes that we can then plot on the detected face.
What is ML Kit?
ML Kit is a cross-platform mobile SDK (Android and iOS) developed by Google that allows developers to easily access on-device mobile machine learning models
Firet we need to integrate Firebase in Flutter application.
Add required dependencies to pubspec.yaml file
dependencies: flutter: sdk: flutter firebase_ml_vision: ^0.9.10 image_picker: ^0.6.7+17 firebase_core: ^0.5.3
Intialize Firebase Instance by adding below at manifest file
<meta-data android:name="com.google.mlkit.vision.DEPENDENCIES" android:value="face" />
Write for code to face detection. Here we are picking the image from galerry and applying the face recognition algorithm on the selected image. The ML Kit algorithm will returns the rectangular box and plots in the detected face area on the image.