{"id":19598461,"url":"https://github.com/sphericalkat/faceverify-lib","last_synced_at":"2025-10-18T12:38:22.686Z","repository":{"id":38404780,"uuid":"265219089","full_name":"SphericalKat/faceverify-lib","owner":"SphericalKat","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-15T11:41:38.000Z","size":6813,"stargazers_count":6,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T01:21:50.006Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SphericalKat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-19T10:41:27.000Z","updated_at":"2022-06-25T14:28:33.000Z","dependencies_parsed_at":"2022-08-26T17:01:03.610Z","dependency_job_id":null,"html_url":"https://github.com/SphericalKat/faceverify-lib","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SphericalKat%2Ffaceverify-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SphericalKat%2Ffaceverify-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SphericalKat%2Ffaceverify-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SphericalKat%2Ffaceverify-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SphericalKat","download_url":"https://codeload.github.com/SphericalKat/faceverify-lib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251171291,"owners_count":21547086,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T09:06:24.382Z","updated_at":"2025-10-18T12:38:22.554Z","avatar_url":"https://github.com/SphericalKat.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Faceverify-lib\nThis project aims to provide a simple API for cropping faces from a bitmap and comparing two faces to verify that they're from the same person.\n\n## Installation\nIn your project level `build.gradle` file, add the following:\n\n```gradle\nallprojects {\n    repositories {\n        google()\n        jcenter()\n        maven { url \"http://jitpack.io/\" }  // \u003c-- THIS MUST BE ADDED\n    }\n}\n```\n\nIn your app level `build.gradle` file, add the following dependency:\n```gradle\ndependencies {\n\t    implementation 'com.github.ATechnoHazard:faceverify-lib:0.1.0'\n}\n```\n\nAnd finally, add this to the app-level `build.gradle` to ensure uncompressed models\n```gradle\nandroid {\n    ...\n    aaptOptions {\n        noCompress \"tflite\"\n    }\n}\n```\n\n## Usage\n### Initialize the library\n```kotlin\nlateinit var mtcnn: MTCNN\nlateinit var mfn: MobileFaceNet\ntry {\n    mtcnn = MTCNN(assets)\n    mfn = MobileFaceNet(assets)\n} catch (e: IOException) {\n    Log.e(\"TAG\", \"Error initing models\", e)\n}\n```\n\n### Cropping the most prominent face from a bitmap\n```kotlin\nval croppedBitmap = FaceUtils.cropBitmapWithFace(someBitmap, mtcnn)\n```\n\u003e **Note**: This might return a null bitmap if no faces were detected. Handle consequent errors appropriately.\n\n### Comparing two bitmaps containing cropped faces\n```kotlin\nval similarity = mfn.compare(bitmap1, bitmap2)\nif (similarity \u003e MobileFaceNet.THRESHOLD) { // 0.8 by default, customize if you want\n    // faces match\n} else {\n    // faces don't match\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsphericalkat%2Ffaceverify-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsphericalkat%2Ffaceverify-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsphericalkat%2Ffaceverify-lib/lists"}