AR-based library for Android which is capable of detecting faces and overlaying images above the user’s head

Overview

ARFaceDetection Awesome

Header image

Meet ARFaceDetection by Cleveroad

We’re glad to share with you our latest AR-based library for Android. It’s designed with ARCore technology and is capable of detecting faces and overlaying images above the user’s head considering multiple parameters to make them look realistic (e.g. head movements).

Demo image

You can try the functionality of the library right on your devices! Go to this link to download our application from Google Play Store.

Awesome

Awesome

Setup

To use ARFaceDetection first add dependency to your project:

dependencies {
    implementation 'com.google.firebase:firebase-core:16.0.9'
    implementation 'com.cleveroad.ARFaceDetection:ar-face-detection:1.0.2'
}

AndroidManifest

.... ... ">
<manifest ...>
    ...
    <uses-permission android:name="android.permission.CAMERA"/>
    <uses-feature android:name="android.hardware.camera.ar" android:required="true"/>
    <uses-feature android:name="android.hardware.camera"/>
    <uses-feature android:name="android.hardware.camera.autofocus"/>
    <application ...>
    ....
        <meta-data 
            android:name="com.google.ar.core" 
            android:value="required"/>
        <meta-data
            android:name="com.google.firebase.ml.vision.DEPENDENCIES"
            android:value="face"/>
    ...
   application>
manifest>

Firebase

  • Create a Firebase project to connect to your Android app and setup it. Link to firebase console https://console.firebase.google.com/
  • Move your config file(google-services.json) into the module (app-level) directory of your app. Application class
class MyApp : Application() {
    ...
    override fun onCreate() {
        super.onCreate()
        ...
        FirebaseApp.initializeApp(this)
        ...   
   }
}

Usage

Face detection val MLKit

val fragment = FaceDetectorFragment.newInstance(R.drawable.icon)       
supportFragmentManager.beginTransaction().apply {
    replace(R.id.container, fragment, fragment.javaClass.simpleName)
}.commit()

Face detection val ARCore

val fragment = AugmentedFacesFragment.newInstance(R.drawable.icon)
supportFragmentManager.beginTransaction().apply {
   replace(R.id.container, fragment, fragment.javaClass.simpleName)
}.commit()

Restrictions

ARCore minSdkVersion ≥ 24 supported devices: https://developers.google.com/ar/discover/supported-devices MLKIt minSdkVersion ≥ 21

Changelog

See changelog history.

Support


If you have any other questions regarding the use of this library, please contact us for support at [email protected] (email subject: "ARFaceDetection. Support request.")

License


The MIT License (MIT)

Copyright (c) 2019 Cleveroad Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
You might also like...
Wallpaper is a Wallpaper and ringtone Application which allows user to set and download Wallpaper or ringtone.
Wallpaper is a Wallpaper and ringtone Application which allows user to set and download Wallpaper or ringtone.

Wallpaper Wallpaper is a Wallpaper and ringtone Application which allows user to set and download Wallpaper or ringtone. Account Activity Home Fragmen

An android app written in Kotlin Programming language which a user can use to store his/her monthly expenditure.

#Expenditure-Tracker An android app that allows the user to input , edit , view his/her expenditures for each month. Languages Used - Kotlin UI develo

A real time notification App which reminds its user with daily schedules

On Time Pro ⌚ A real time notification App which reminds its user with daily schedules, time-table ⌛ , due assignments 📜 , regular classes with just

An app that calculates which fuel is cheaper for the user, the basis used for the calculation was the famous formula ValorAlcool / ValorGasolina

An app that calculates which fuel is cheaper for the user, the basis used for the calculation was the famous formula ValorAlcool / ValorGasolina

This project consists in the approach of a bakery business, in which the user can book one or more products (cakes), in addition to having the method of payment in cash (post-shipment) or the method of payment via mobile

This project consists in the approach of a bakery business, in which the user can book one or more products (cakes), in addition to having the method of payment in cash (post-shipment) or the method of payment via mobile

Utility Android app for generating color palettes of images using the Palette library. Written in Kotlin.
Utility Android app for generating color palettes of images using the Palette library. Written in Kotlin.

Palette Helper is a simple utility app made to generate color palettes of images using Google's fantastic Palette library. It's mostly a for-fun pet p

Utility Android app for generating color palettes of images using the Palette library. Written in Kotlin.
Utility Android app for generating color palettes of images using the Palette library. Written in Kotlin.

Palette Helper is a simple utility app made to generate color palettes of images using Google's fantastic Palette library. It's mostly a for-fun pet p

Social media app but with new features like translate messages and posts , support video & images as posts  , chat and  notifications , etc...
Social media app but with new features like translate messages and posts , support video & images as posts , chat and notifications , etc...

social-media-app Social media app but with new features like translate messages and posts , support video & images as posts , chat and notifications ,

Owner
Cleveroad
Professional web and mobile development company. Full-cycle IT development!
Cleveroad
WatchFaceAlphaKotlin - Demonstrates watch faces using the new androidX alpha libraries (Kotlin)

Alpha WatchFace Sample (Kotlin) Demonstrates watch faces using the new androidX

Bastiaan Quast 0 Jan 4, 2022
A capable — pixel art editor for Android.

A capable — pixel art editor for Android.

thebluepandabear 128 Dec 31, 2022
Tachiyomi 20.4k Jan 9, 2023
An Android App based on MVVM Architecture which shows random anime images from some famous subreddits

Android App which shows random anime wallpapers from some famous subreddits like r/animeArt, r/imaginarySliceOfLife, r/animePhoneWallpapers and animeWallpapersSfw

Hamza Aziz 7 Mar 2, 2022
An App based on MVVM architecture to track & store a user's runs using Google Maps, with options to view & sort the runs as per the user's choice along the with option to run the app in background.

An App based on MVVM architecture to track & store a user's runs using Google Maps, with options to view & sort the runs as per the user's choice along the with option to run the app in background.

Harshit Maheshwari 1 Jun 9, 2022
Android application for GitHub user search and view user details

GitHubApp Android application for GitHub user search and view user details Architecture UI observing the live data for the main list as received from

null 1 Mar 29, 2022
Mojito is a cocktail manual, which contains recipes, images, and so on.

Mojito Mojito* is a cocktail manual, which contains recipes, images, and so on. *Mojito: an alcoholic drink made with rum, lime juice, sugar, and mint

Chih-Wei Lin 76 Dec 12, 2022
LocationPhoneMode - The app will ask the user to allow it to track the user location

LocationPhoneMode The app will ask the user to allow it to track the user locati

null 1 Jan 11, 2022
Wallpaper and ringtone Application which allows user to set and download Wallpaper or ringtone

Wallpaper Wallpaper is a Wallpaper and ringtone Application which allows user to

Shubhanshu Sharma 2 Dec 19, 2021