A Demo-Library for face recognize and validation using Deepface
- Android Gradle Plugin (AGP) 7.3.1
- Login to GitHub
- Go to Setting > Developer Settings > Personal Access Tokens > Generate new token
- Make sure you select the following scopes:
gpr.usr=YOUR_USERNAME //Change with your username
gpr.key=YOUR_KEY //Change with your personal access token before
Then add this properties to .gitignore
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS) // Set to PREFER_SETTINGS
repositories {
google()
mavenCentral()
// Set target packages repo
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/NeoRevolt/FaceApp")
credentials {
username = 'gpr.usr'
password = 'gpr.key'
}
}
}
}
plugins {
id 'kotlin-kapt'
}
android {
compileSdk 33
defaultConfig {
targetSdk 33
}
}
dependencies {
implementation 'com.github.neorevolt:face-sdk:1.0.0'
}
// Initialize
private lateinit var faceVerification: FaceVerification
public override fun onCreate(savedInstanceState: Bundle?) {
....
// Get Instance
faceVerification = FaceVerification()
binding.apply {
btnVerify.setOnClickListener {
faceVerification.verify(imgFile1, imgFile2) // Verify image between two images
}
}