{"id":28251898,"url":"https://github.com/kby-ai/faceattribute-android","last_synced_at":"2025-10-05T13:05:55.104Z","repository":{"id":160040321,"uuid":"635017395","full_name":"kby-ai/FaceAttribute-Android","owner":"kby-ai","description":"This is a demo project that incorporates 3D passive face liveness detection, face recognition, face capture, and analysis of face attributes including age, gender, face quality, face occlusion, eye closure, and mouth opening.","archived":false,"fork":false,"pushed_at":"2025-07-31T02:22:12.000Z","size":105034,"stargazers_count":20,"open_issues_count":1,"forks_count":14,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-07-31T05:28:36.089Z","etag":null,"topics":["age-gender","age-gender-estimation","anti-spoofing","ekyc","eye-closeness","eye-closure","face-attributes","face-capture","face-liveness-detection","face-occlusion","face-quality","face-recognition","kyc","liveness","liveness-detection","mask-detection","mouth-openness","verification"],"latest_commit_sha":null,"homepage":"https://kby-ai.com/face-recognition-sdk/","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kby-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-05-01T19:25:52.000Z","updated_at":"2025-07-31T02:22:15.000Z","dependencies_parsed_at":"2023-12-27T21:14:03.959Z","dependency_job_id":"e7f7f22c-e7fd-40d8-8ee7-98ee3f8252b8","html_url":"https://github.com/kby-ai/FaceAttribute-Android","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kby-ai/FaceAttribute-Android","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kby-ai%2FFaceAttribute-Android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kby-ai%2FFaceAttribute-Android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kby-ai%2FFaceAttribute-Android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kby-ai%2FFaceAttribute-Android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kby-ai","download_url":"https://codeload.github.com/kby-ai/FaceAttribute-Android/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kby-ai%2FFaceAttribute-Android/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269956177,"owners_count":24503116,"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","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["age-gender","age-gender-estimation","anti-spoofing","ekyc","eye-closeness","eye-closure","face-attributes","face-capture","face-liveness-detection","face-occlusion","face-quality","face-recognition","kyc","liveness","liveness-detection","mask-detection","mouth-openness","verification"],"created_at":"2025-05-19T15:15:50.759Z","updated_at":"2025-10-05T13:05:55.099Z","avatar_url":"https://github.com/kby-ai.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://play.google.com/store/apps/dev?id=7086930298279250852\" target=\"_blank\"\u003e\n    \u003cimg alt=\"\" src=\"https://github-production-user-asset-6210df.s3.amazonaws.com/125717930/246971879-8ce757c3-90dc-438d-807f-3f3d29ddc064.png\" width=500/\u003e\n  \u003c/a\u003e  \n\u003c/p\u003e\n\n### Our facial recognition algorithm is globally top-ranked by NIST in the FRVT 1:1 leaderboards. \u003cspan\u003e\u003cimg src=\"https://github.com/kby-ai/.github/assets/125717930/bcf351c5-8b7a-496e-a8f9-c236eb8ad59e\" alt=\"badge\" width=\"36\" height=\"20\"\u003e\u003c/span\u003e  \n[Latest NIST FRVT evaluation report 2024-12-20](https://pages.nist.gov/frvt/html/frvt11.html)  \n\n![FRVT Sheet](https://github.com/user-attachments/assets/16b4cee2-3a91-453f-94e0-9e81262393d7)\n\n#### 🆔 ID Document Liveness Detection - Linux - [Here](https://web.kby-ai.com)  \u003cspan\u003e\u003cimg src=\"https://github.com/kby-ai/.github/assets/125717930/bcf351c5-8b7a-496e-a8f9-c236eb8ad59e\" alt=\"badge\" width=\"36\" height=\"20\"\u003e\u003c/span\u003e\n#### 📚 Product \u0026 Resources - [Here](https://github.com/kby-ai/Product)\n#### 🛟 Help Center - [Here](https://docs.kby-ai.com)\n#### 💼 KYC Verification Demo - [Here](https://github.com/kby-ai/KYC-Verification-Demo-Android)\n#### 🙋‍♀️ Docker Hub - [Here](https://hub.docker.com/u/kbyai)\n\n# FaceAttribute-Android\n\n## Overview\n\nThis repository integrates several `facial recognition` technologies, including `3D passive face liveness detection`, `face recognition`, `automatic face capture`, and analysis of various `face attributes` such as `age`, `gender`, `face quality`, `facial occlusion`, `eye closure`, and `mouth opening`.\n\nThe system utilizes `face liveness detection` technology to generate a real-time liveness score based on a single image captured by the camera. \n\nAdditionally, the demo offers `Face Recognition` capabilities, enabling enrollment from a gallery and real-time identification of faces captured by the camera.\n\nThe repository also features an automatic face capture function that verifies various `facial attributes`, such as `face quality`, `facial orientation` (`yaw`, `roll`, `pitch`), `facial occlusion` (e.g., mask, sunglass, hand over face), `eye closure`, `mouth opening`, and the position of the face within the `region of interest` (`ROI`).\n\nMoreover, the repository can compute scores for different face attributes from a gallery image, including `liveness`, `face orientation` (`yaw`, `roll`, `pitch`), `face quality`, `luminance of the face`, `facial occlusion`, `eye closure`, `mouth opening`, `age`, and `gender`.\n\n\u003e In this repository, we integrated `KBY-AI`'s `Premium Face Mobile SDK` into `Android` native platform.\u003c/br\u003e\n### ◾FaceSDK(Mobile) Details\n\n  | Basic      | Standard | 🔽 Premium |\n  |------------------|------------------|------------------|\n  | Face Detection        | Face Detection    | \u003cb\u003eFace Detection\u003c/b\u003e |\n  | Face Liveness Detection        | Face Liveness Detection    | \u003cb\u003eFace Liveness Detection\u003c/b\u003e |\n  | Pose Estimation        | Pose Estimation    | \u003cb\u003ePose Estimation\u003c/b\u003e |\n  |         | Face Recognition    | \u003cb\u003eFace Recognition\u003c/b\u003e |\n  |         |         | \u003cb\u003e68 points Face Landmark Detection\u003c/b\u003e |\n  |         |         | \u003cb\u003eFace Quality Calculation\u003c/b\u003e |\n  |         |         | \u003cb\u003eFace Occlusion Detection\u003c/b\u003e |\n  |         |         | \u003cb\u003eEye Closure Detection\u003c/b\u003e |\n  |         |         | \u003cb\u003eAge, Gender Estimation\u003c/b\u003e |\n\n### ◾FaceSDK(Mobile) Product List\n  | No.      | Repository                                                                                                | SDK Details |\n  |------------------|-----------------------------------------------------------------------------------------------------------|------------------|\n  | 1        | [Face Liveness Detection - Android](https://github.com/kby-ai/FaceLivenessDetection-Android)              | Basic SDK |\n  | 2        | [Face Liveness Detection - iOS](https://github.com/kby-ai/FaceLivenessDetection-iOS)                      | Basic SDK |\n  | 3        | [Face Recognition + Face Liveness Detection - Android](https://github.com/kby-ai/FaceRecognition-Android) | Standard SDK |\n  | 4        | [Face Recognition + Face Liveness Detection - iOS](https://github.com/kby-ai/FaceRecognition-iOS)                                   | Standard SDK |\n  | 5        | [Face Recognition + Face Liveness Detection - Flutter](https://github.com/kby-ai/FaceRecognition-Flutter)                           | Standard SDK |\n  | 6        | [Face Recognition + Face Liveness Detection - Ionic-Cordova](https://github.com/kby-ai/FaceRececogniion-Ionic-Cordova)              | Standard SDK |\n  | 7        | [Face Recognition + Face Liveness Detection - React-Native](https://github.com/kby-ai/FaceRecognition-React-Native)                 | Standard SDK |\n  | ➡️        | \u003cb\u003e[Face Attribute - Android](https://github.com/kby-ai/FaceAttribute-Android)\u003c/b\u003e                        | \u003cb\u003ePremium SDK\u003c/b\u003e |\n  | 9        | [Face Attribute - iOS](https://github.com/kby-ai/FaceAttribute-iOS)                                       | Premium SDK |\n  | 10        | [Face Attribute - Flutter](https://github.com/kby-ai/FaceAttribute-Flutter)                               | Premium SDK |\n\n \u003e To get `Face SDK(server)`, please visit products [here](https://github.com/kby-ai/Product).\u003cbr/\u003e\n\n## Try the APK\n\n### Google Play\n\n\u003ca href=\"https://play.google.com/store/apps/details?id=com.kbyai.faceattribute\" target=\"_blank\"\u003e\n  \u003cimg alt=\"\" src=\"https://user-images.githubusercontent.com/125717930/230804673-17c99e7d-6a21-4a64-8b9e-a465142da148.png\" height=80/\u003e\n\u003c/a\u003e\n\n## Performance Video\n\nYou can visit our YouTube video [here](https://www.youtube.com/watch?v=-WiAethTacc) to see how well our demo app works.\u003c/br\u003e\u003c/br\u003e\n[![Face Recognition Android](https://img.youtube.com/vi/-WiAethTacc/0.jpg)](https://www.youtube.com/watch?v=-WiAethTacc)\n\n## Screenshots\n\n\u003cp float=\"left\"\u003e\n  \u003cimg src=\"https://github.com/kby-ai/FaceAttribute-Android/assets/125717930/8357b81f-757f-4300-a913-94e5530108b4\" width=240/\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/125717930/235572299-23989a6e-d6cc-41d3-b75c-a235018ee464.png\" width=240/\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/125717930/235572304-41714fd2-b117-4bcf-999d-32c6d5c1a0c5.png\" width=240/\u003e\n\u003c/p\u003e\n\n\u003cp float=\"left\"\u003e\n  \u003cimg src=\"https://github.com/kby-ai/FaceAttribute-Android/assets/125717930/0fc2851d-ccb3-4473-9748-83e025eb8409\" width=240/\u003e\n  \u003cimg src=\"https://github.com/kby-ai/FaceAttribute-Android/assets/125717930/6ee607b9-dc11-4ac6-8481-27357357b630\" width=240/\u003e\n  \u003cimg src=\"https://github.com/kby-ai/FaceAttribute-Android/assets/125717930/75dbda2c-729a-4823-a18f-30301257b84a\" width=240/\u003e\n\u003c/p\u003e\n\n\u003cp float=\"left\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/125717930/235573436-6944cd3b-3b93-404d-b8c7-c02fc83d4bdc.png\" width=240/\u003e\n  \u003cimg src=\"https://github.com/kby-ai/FaceAttribute-Android/assets/125717930/515157bd-39ab-4a94-a54c-b2224d69b9fc\" width=240/\u003e\n  \u003cimg src=\"https://github.com/kby-ai/FaceAttribute-Android/assets/125717930/b1f64dba-7b58-4385-939d-949fb4be4d66\" width=240/\u003e\n\u003c/p\u003e\n\n## SDK License\n\n\nThe face recognition project relies on `KBY-AI`'s SDK, which requires a license for each `application ID`.\n\n- The code below shows how to use the license: https://github.com/kby-ai/FaceAttribute-Android/blob/db2f1134af4ce947c318d5213f1b1e703c400dbf/app/src/main/java/com/kbyai/faceattribute/MainActivity.kt#L33-L43\n\n- To request a license, please contact us:\u003c/br\u003e\n🧙`Email:` contact@kby-ai.com\u003c/br\u003e\n🧙`Telegram:` [@kbyaisupport](https://t.me/kbyaisupport)\u003c/br\u003e\n🧙`WhatsApp:` [+19092802609](https://wa.me/+19092802609)\u003c/br\u003e\n🧙`Discord:` [KBY-AI](https://discord.gg/CgHtWQ3k9T)\u003c/br\u003e\n🧙`Teams:` [KBY-AI](https://teams.live.com/l/invite/FBAYGB1-IlXkuQM3AY)\u003c/br\u003e\n\n## About SDK\n\n### 1. Set up\n- Copy the SDK (`libfacesdk` folder) to the `root` folder in your project.\n\n- Add SDK to the project in `settings.gradle`.\n  ```bash\n  include ':libfacesdk'\n  ```\n\n- Add dependency to your `build.gradle`.\n  ```bash\n  implementation project(path: ':libfacesdk')\n  ```\n\n### 2. Initializing an SDK\n\n- Step One\n\n  To begin, you need to activate the `SDK` using the license that you have received.\n  ```kotlin\n    FaceSDK.setActivation(\"...\")\n  ```\n  If activation is successful, the return value will be `SDK_SUCCESS`. Otherwise, an error value will be returned.\n\n- Step Two\n\n  After activation, call the `SDK`'s initialization function.\n  ```kotlin\n  FaceSDK.init(getAssets());\n  ```\n  If initialization is successful, the return value will be `SDK_SUCCESS`. Otherwise, an error value will be returned.\n\n### 3. SDK Classes\n\n  - FaceBox\n  \n    This class represents the output of the face detection function and can be utilized in template creation functions.\n\n    | Feature| Type | Name |\n    |------------------|------------------|------------------|\n    | Face rectangle        | int    | x1, y1, x2, y2 |\n    | Face angles (-45 ~ 45)        | float    | yaw, roll, pitch |\n    | Liveness score (0 ~ 1)        | float    | liveness |\n    | Face quality (0 ~ 1)        | float    | face_quality |\n    | Face luminance (0 ~ 255)       | float    | face_luminance |\n    | Face occlusion (0 ~ 1)       | float    | face_occlusion |\n    | Eye closure (0 ~ 1)       | float    | left_eye_closed, right_eye_closed |\n    | Mouth opening (0 ~ 1)       | float    | mouth_opened |\n    | Age, gender        | int    | age, gender |\n    | 68 points facial landmark        | float[]    | landmarks_68 |\n  \n    \u003e 68 points facial landmark\n    \n    \u003cimg src=\"https://user-images.githubusercontent.com/125717930/235560305-ee1b6a39-5dab-4832-a214-732c379cabfd.png\" width=500/\u003e\n\n  - FaceDetectionParam\n  \n    This class serves as the input parameter for `face detection`, enabling various processing functionalities such as `face liveness detection`, `eye closure checking`, `facial occlusion checking`, `mouth opening checking`, and `age and gender estimation`.\n\n    | Feature| Type | Name |\n    |------------------|------------------|------------------|\n    | Check liveness        | boolean    | check_liveness |\n    | Check eye closure        | boolean    | check_eye_closeness |\n    | Check face occlusion        | boolean    | check_face_occlusion |\n    | Check mouth opening        | boolean    | check_mouth_opened |\n    | Estimate age, gender        | boolean    | estimate_age_gender |\n    \n### 4. SDK APIs\n#### - Face Detection\n\n  The `Face SDK` provides a unified function for detecting faces, enabling multiple functionalities such as `liveness detection`, `face orientation` (yaw, roll, pitch), `face quality`, `facial occlusion`, `eye closure`, `mouth opening`, `age`, `gender`, and `facial landmarks`.\n\n  The function can be used as follows:\n\n  ```kotlin\n  FaceSDK.faceDetection(bitmap, param)\n  ```\n\n  This function requires two parameters: a `Bitmap` object and a `FaceDetectionParam` object that enables various processing functionalities.\n\n  The function returns a list of `FaceBox` objects.\n\n#### - Create Templates\n\n  The `FaceSDK` provides a function that can generate a `template` from a `Bitmap` image. This template can then be used to verify the identity of the individual image captured.\n\n  ```kotlin\n  byte[] templates = FaceSDK.templateExtraction(bitmap, faceBox);\n  ```\n\n  The `SDK`'s `template` extraction function takes two parameters: a `Bitmap` object and an object of `FaceBox`. \n\n  The function returns a byte array, which contains the `template` that can be used for person verification.\n\n#### - Calculation similiarity\n\n  The `similarityCalculation` function takes a byte array of two `template`s as a parameter. \n\n  ```kotlin\n  float similarity = FaceSDK.similarityCalucation(templates1, templates1);\n  ```\n\n  It returns the similarity value between the two `template`s, which can be used to determine the level of likeness between the two individuals.\n\n#### - Yuv to Bitmap\n  The `SDK` provides a function called `yuv2Bitmap`, which converts a `yuv` frame to a `Bitmap`. Since camera frames are typically in `yuv` format, this function is necessary to convert them to `Bitmap`. The usage of this function is as follows:\n  ```kotlin\n  Bitmap bitmap = FaceSDK.yuv2Bitmap(nv21, image.getWidth(), image.getHeight(), 7);\n  ```\n  The first parameter is an `nv21` byte array containing the `yuv` data. \n\n  The second parameter is the width of the `yuv` frame, and the third parameter is its height. \n\n  The fourth parameter is the `conversion mode`, which is determined by the camera orientation.\n\n  To determine the appropriate `conversion mode`, the following method can be used:\n  ```kotlin\n  1        2       3      4         5            6           7          8\n\n  888888  888888      88  88      8888888888  88                  88  8888888888\n  88          88      88  88      88  88      88  88          88  88      88  88\n  8888      8888    8888  8888    88          8888888888  8888888888          88\n  88          88      88  88\n  88          88  888888  888888\n  ```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkby-ai%2Ffaceattribute-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkby-ai%2Ffaceattribute-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkby-ai%2Ffaceattribute-android/lists"}