This app uses Google ML Kit Face Detection to detect faces in images or through the camera in real-time. The app also manages device permissions such as camera, storage, and internet access.
- Face Detection: Detects facial features such as eyes, nose, mouth, and pose.
- Compatibility: Supports images from storage or camera capture.
- Real-time Processing: Real-time face detection through the camera.
Ensure the app has the following permissions:
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>Add the ML Kit Face Detection dependency in the build.gradle file at the app level:
dependencies {
implementation 'com.google.mlkit:face-detection:16.1.7'
}- Clone this repository to your Android Studio project.
- Ensure all permissions are set in the
AndroidManifest.xmlfile. - Add face detection code using the ML Kit API in the main application file.
- Run the app on a device or emulator with a supported camera.
For more information about the ML Kit Face Detection API, visit the official ML Kit documentation.
- Camera: To capture images directly.
- Storage: To save and read image files.
- Internet: (Optional) If there is a need for online connectivity.
If you would like to contribute, please fork this repository and submit a pull request. All contributions are greatly appreciated!