base on Face Recognition, Face Liveness Detection, Face Anti-Spoofing, Face Detection, Face Landmarks, Face Compare, Face Matching, Face Pose, Face Expression, Face Attributes, Face Templates Extraction, Face Landmarks <div align="center"> <img alt="" src="https://github.com/Faceplugin-ltd/FaceRecognition-Javascript/assets/160750757/657130a9-50f2-486d-b6d5-b78bcec5e6e2.png" width=200/> </div> #### Hugging Face - [Here](https://huggingface.co/spaces/FacePlugin-Ltd/FaceRecognition-LivenessDetection-SDK) <span> <img src="https://github.com/user-attachments/assets/303cda2b-a195-42c5-b481-6b2b796d2910" style="margin: 4px; width: 36px; height: 20px"> <span/> #### Documentation- [Here](https://doc.faceplugin.com) # Face Recognition SDK Android with 3D Passive Liveness Detection - Fully On Premise ## Overview Explore `face recognition SDK` from [Faceplugin](https://faceplugin.com/) Top-ranked on NIST FRVT , coupled with an advanced `iBeta level 2 liveness detection` engine that effectively safeguards against **printed photos, video replay, 3D masks, and deepfake threats**, ensuring top-tier security. <br>This is `on-premise face recognition SDK` which means everything is processed in your phone and **NO** data leaves the device. <br></br> ## Try this APP on Google Play <a href="https://play.google.com/store/apps/details?id=ai.faceplugin.recognition" target="_blank"> <img alt="" src="https://user-images.githubusercontent.com/125717930/230804673-17c99e7d-6a21-4a64-8b9e-a465142da148.png" height=80/> </a> <br></br> <div align="left"> <img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome Badge"/> <img src="https://img.shields.io/static/v1?label=%F0%9F%8C%9F&message=If%20Useful&style=style=flat&color=BC4E99" alt="Star Badge"/> <img src="https://img.shields.io/github/issues/genderev/assassin" alt="issue"/> <img src="https://img.shields.io/github/issues-pr/genderev/assassin" alt="pr"/> </div> ## Screenshots <div align="left"> <img alt="" src="https://github.com/Faceplugin-ltd/FaceRecognition-LivenessDetection-Android/assets/160750757/5665b865-23fc-4c19-9663-5093a975fc66" width=200/> <img alt="" src="https://github.com/Faceplugin-ltd/FaceRecognition-LivenessDetection-Android/assets/160750757/250ac71d-0844-4c26-b4b6-8afa6952f60e" width=200/> <img alt="" src="https://github.com/Faceplugin-ltd/FaceLivenessDetection-Android/assets/160750757/92f4113e-16b0-43e2-b6af-d5fa3c4e56c9" width=200/> <img alt="" src="https://github.com/Faceplugin-ltd/FaceLivenessDetection-Android/assets/160750757/fc5f985c-cf40-41d7-9ff9-a5aab5898a33" width=200/> </div> ## On the Youtube <div align="center"> <a href="http://www.youtube.com/watch?feature=player_embedded&v=qVtdkwtGtqs" target="_blank"> <img src="http://img.youtube.com/vi/qVtdkwtGtqs/maxresdefault.jpg" alt="Watch the video" width="960" height="520" border="10" /> </a> </div> ## Install License The code below shows how to use the license: https://github.com/Faceplugin-ltd/FaceRecognition-Android/blob/370ecadae564788eaa84f288e342da742fde0c1a/app/src/main/java/com/faceplugin/facerecognition/MainActivity.kt#L30-L45 Please [contact us](#contact) to get the license. ## Documentation <details> <a name="setup"><h3>Setup</h3></a> Copy the SDK (`libfacesdk` folder) to the `root` folder in your project. Add SDK to the project in `settings.gradle` ``` rootProject.name = "YourProjectName" include ':app' include ':libfacesdk' ``` Add dependency to your build.gradle ``` implementation project(path: ':libfacesdk') ``` <a name="api"><h3>APIs</h3></a> <h4> Activate SDK using license </h4> ```java public static native int setActivation(java.lang.String s); ``` <h4> Init model for face recognition and liveness detection </h4> ```java public static native int init(AssetManager var0); ``` <h4> Convert camera frame in YUV to Bitmap </h4> ```java public static native Bitmap yuv2Bitmap(byte[] var0, int var1, int var2, int var3); ``` <h4> Run face recognition and liveness detection </h4> ```java public static native List<FaceBox> faceDetection(Bitmap var0, FaceDetectionParam var1); ``` <h4> Extract feature vector for the enrollment </h4> ```java public static native byte[] templateExtraction(Bitmap var0, FaceBox var1); ``` <h4> Calculate cosine similarity for the matching </h4> ```java public static native float similarityCalculation(byte[] var0, byte[] var1); ``` <a name="sdk-code"><h3>SDK Codes</h3></a> | Code | Status | |:------:|------| |0|Activate SDK successfully| |-1|Invalid License Key | |-2|Invalid AppID | |-3|Expired License Key| |-4|Activation Failed| |-5|SDK Failed| <a name="classes"><h3>Classes</h3></a> <h4>FaceResult</h4> | Type | Name | Description | |------------------|------------------|------------------| | Rect | rect | Bounding box for face | | int | liveness | Liveness status: 0 for spoof, 1 for real, less than 0 for unknown | | int | gender | Gender classification result | | int | mask | Mask presence: 0 for no mask, 1 for mask | | int | age | Age estimation result | | float | yaw | Yaw angle: -45 to 45 degrees | | float | roll | Roll angle: -45 to 45 degrees | | float | pitch | Pitch angle: -45 to 45 degrees | | byte[] | feature | 2056-byte facial feature data | | byte[] | faceData | Encrypted facial data | | int | orient | Face orientation: 1 for no rotation, 2 for 90° rotation, 3 for 270° rotation, 4 for 180° rotation | | int | faceId | Face ID in the tracking face mode | ```java public class FaceResult { public Rect rect; public int liveness; public int gender; public int mask; public int age; public float yaw; public float roll; public float pitch; public byte[] feature; public byte[] faceData; public int orient; public int faceId; public FaceResult() { } } ``` </details> Here's our official [document](https://doc.faceplugin.com/) ## List of our Products * **[Face Recognition with Liveness Detection-Android (Java, Kotlin)](https://github.com/Faceplugin-ltd/FaceRecognition-Android)** * **[Face Recognition with Liveness Detection-iOS (Objective C, Swift)](https://github.com/Faceplugin-ltd/FaceRecognition-iOS)** * **[Face Recognition with Liveness Detection-React Native](https://github.com/Faceplugin-ltd/FaceRecognition-React-Native)** * **[Face Recognition with Liveness Detection-Flutter](https://github.com/Faceplugin-ltd/FaceRecognition-Flutter)** * **[Face Recognition with Liveness Detection-Ionic Cordova](https://github.com/Faceplugin-ltd/FaceRecognition-Ionic-Cordova)** * **[Face Recognition with Liveness Detection-.Net MAUI](https://github.com/Faceplugin-ltd/FaceRecognition-.Net)** * **[Face Recognition with Liveness Detection-.Net WPF](https://github.com/Faceplugin-ltd/FaceRecognition-WPF-.Net)** * **[Face Recognition with Liveness Detection-Javascript](https://github.com/Faceplugin-ltd/FaceRecognition-LivenessDetection-Javascript)** * **[Face Recognition with LivenessDetection-React](https://github.com/Faceplugin-ltd/FaceRecognition-LivenessDetection-React)** * **[Face Recognition with LivenessDetection-Vue](https://github.com/Faceplugin-ltd/FaceRecognition-LivenessDetection-Vue)** * **[Face Liveness Detection-Android (Java, Kotlin)](https://github.com/Faceplugin-ltd/FaceLivenessDetection-Android)** * **[Face Liveness Detection-iOS (Objective C, Swift)](https://github.com/Faceplugin-ltd/FaceLivenessDetection-iOS)** * **[Face Liveness Detection-Linux](https://github.com/Faceplugin-ltd/FaceLivenessDetection-Linux)** * **[Face Liveness Detection-Docker](https://github.com/Faceplugin-ltd/FaceLivenessDetection-Docker)** * **[Open Source Face Recognition SDK](https://github.com/Faceplugin-ltd/Open-Source-Face-Recognition-SDK)** * **[Face Recognition SDK](https://github.com/Faceplugin-ltd/Face-Recognition-SDK)** * **[Liveness Detection SDK](https://github.com/Faceplugin-ltd/Face-Liveness-Detection-SDK)** * **[Palm Recognition SDK](https://github.com/Faceplugin-ltd/Palm-Recognition)** * **[ID Card Recognition](https://github.com/Faceplugin-ltd/ID-Card-Recognition)** * **[ID Document Liveness Detection](https://github.com/Faceplugin-ltd/ID-Document-Liveness-Detection)** ## Contact <div align="left"> <a target="_blank" href="mailto:info@faceplugin.com"><img src="https://img.shields.io/badge/email-info@faceplugin.com-blue.svg?logo=gmail " alt="faceplugin.com"></a>&emsp; <a target="_blank" href="https://t.me/faceplugin"><img src="https://img.shields.io/badge/telegram-@faceplugin-blue.svg?logo=telegram " alt="faceplugin.com"></a>&emsp; <a target="_blank" href="https://wa.me/+14422295661"><img src="https://img.shields.io/badge/whatsapp-faceplugin-blue.svg?logo=whatsapp " alt="faceplugin.com"></a> </div> ", Assign "at most 3 tags" to the expected json: {"id":"8144","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"