Skip to content

This Android project demonstrates real-time face detection using ML Kit's Face Detection API, integrated into an app built with Kotlin and Jetpack Compose. The app captures images from the camera and highlights detected faces on the camera preview. It showcases modern Android techniques with CameraX for camera integration and Jetpack Compose

Notifications You must be signed in to change notification settings

pablin202/ml-facedetection

Repository files navigation

Android ML Kit Face Detection with Jetpack Compose

This is a simple Android application that demonstrates how to use ML Kit Face Detection with Jetpack Compose.

Overview

This project showcases the integration of ML Kit Face Detection in an Android application built with Kotlin and Jetpack Compose. It allows you to capture an image from the camera and detect faces in real-time using ML Kit's Face Detection API. Detected faces are highlighted on the camera preview.

Features

  • CameraX integration for capturing images
  • Jetpack Compose for building the UI
  • ML Kit Face Detection API for real-time face detection
  • Highlighting detected faces on the camera preview

Prerequisites

Before running this application, make sure you have the following:

  • Android Studio installed
  • An Android device or emulator with camera support

Getting Started

  1. Clone this repository to your local machine

  2. Open the project in Android Studio.

  3. Connect your Android device or start an emulator.

  4. Build and run the application.

Usage

  1. Upon launching the app, grant the necessary camera permissions if prompted.

  2. Point the camera towards yourself or another person.

  3. The application will detect faces in real-time and highlight them on the camera preview.

  4. You can take a picture by tapping on the camera button.

  5. The captured image with highlighted faces will be displayed on the screen.

Dependencies

  • Kotlin
  • Jetpack Compose
  • CameraX
  • ML Kit Face Detection

Contributing

Contributions are welcome! Feel free to open issues or pull requests for any improvements or features you'd like to add.

License

This project is licensed under the MIT License.

About

This Android project demonstrates real-time face detection using ML Kit's Face Detection API, integrated into an app built with Kotlin and Jetpack Compose. The app captures images from the camera and highlights detected faces on the camera preview. It showcases modern Android techniques with CameraX for camera integration and Jetpack Compose

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages