Skip to content
No description or website provided.
Kotlin Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app merge with develop Jul 29, 2019
ar-face-detection update version Jul 29, 2019
gradle/wrapper first Jun 5, 2019
images Add files via upload Jul 29, 2019
.gitignore first Jun 5, 2019
CHANGELOG.md Create CHANGELOG.md Jul 29, 2019
README.md Update README.md Jul 29, 2019
build.gradle move face detection to lib module Jul 25, 2019
gradle.properties fix code formating Jul 25, 2019
gradlew first Jun 5, 2019
gradlew.bat first Jun 5, 2019
settings.gradle

README.md

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 info@cleveroad.com (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 can’t perform that action at this time.