{"id":22972988,"url":"https://github.com/extrievetechnologies/splicerai_android","last_synced_at":"2025-04-02T07:14:19.839Z","repository":{"id":218838190,"uuid":"747500429","full_name":"ExtrieveTechnologies/SplicerAi_Android","owner":"ExtrieveTechnologies","description":"SplicerAi Intelligent Document Analysis SDK Specially designed for native ANDROID from Extrieve","archived":false,"fork":false,"pushed_at":"2025-04-01T11:57:10.000Z","size":189,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"SplicerAi-V2","last_synced_at":"2025-04-01T12:46:47.414Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/ExtrieveTechnologies.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-24T03:42:06.000Z","updated_at":"2025-04-01T11:57:14.000Z","dependencies_parsed_at":"2025-04-01T12:41:18.994Z","dependency_job_id":null,"html_url":"https://github.com/ExtrieveTechnologies/SplicerAi_Android","commit_stats":null,"previous_names":["extrievetechnologies/splicerai_android"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExtrieveTechnologies%2FSplicerAi_Android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExtrieveTechnologies%2FSplicerAi_Android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExtrieveTechnologies%2FSplicerAi_Android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExtrieveTechnologies%2FSplicerAi_Android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ExtrieveTechnologies","download_url":"https://codeload.github.com/ExtrieveTechnologies/SplicerAi_Android/tar.gz/refs/heads/SplicerAi-V2","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246769968,"owners_count":20830771,"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-12-14T23:37:33.830Z","updated_at":"2025-04-02T07:14:19.833Z","avatar_url":"https://github.com/ExtrieveTechnologies.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg align=\"right\" class=\"img-fluid\" padding=\"10px\" src=\"https://raw.githubusercontent.com/ExtrieveTechnologies/QuickCapture/main/img/android.png\" alt=\"img-verification\"\u003e\n\n#  SplicerAi v2.0\nSplicerAi is an intelligent document analysis SDK offering the following functionalities:\n\n1.  **Document Identification / Classification** : _Identification and categorization of documents_.\n2.  **Document Data Extraction** : _Extraction of textual data from documents_.\n3.  **Document Masking** : _Specific to Aadhaar documents, ensuring data privacy_.\n\n\u003e **Developer-friendly** \u0026 **Easy to integrate** SDK.\n\n\u003e **Works entirely offline***, locally on the device, with **no data transferred to any server or third party**.  \n\n*For reduced build size if needed, an initial internet connection may optionally be required to fetch ML data or resource files, depending on the specific integration and features used by the consumer application*\n\n\nDownload / Addition\n--------\nYou can use this SDK in any Android project simply by using Gradle :\n\n```java\n//Add expack central repo in settings.gradle\nrepositories {\n  google()\n  mavenCentral()\n  maven {url 'https://expack.extrieve.in/maven/'}\n}\n\n//Then add implementation for SDK in dependencies in build.gradle (module:\u003cyourmodulename\u003e)\ndependencies {\n  implementation 'com.extrieve.splicer.aisdk:SplicerAIv2:\u003cSDK-VERSION\u003e'\n  // Latest version: 2.0.15\n}\nSDK-VERSION - Need to replace with the correct v2 series.\n```\n\nOr Maven:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.extrieve.splicer.aisdk\u003c/groupId\u003e\n  \u003cartifactId\u003eSplicerAIv2\u003c/artifactId\u003e\n  \u003cversion\u003eSDK-VERSION\u003c/version\u003e\n\u003c/dependency\u003e\nSDK-VERSION - Need to replace with the correct v2 series.\n```\n\nOr can even integrate with the **.aar** library file and manually add the file dependency to the project/app.\n\n\nCompatibility\n-------------\n * **JAVA 17 Support**: QuickCapture v4 requires JAVA version 17 support for the application.\n * **Minimum Android SDK**: QuickCapture v4 requires a minimum API level of 21.\n * **Target Android SDK**: QuickCapture v4 features supports **API 34**.\n  * **Compiled SDK Version**: QuickCapture v4 compiled against **API 33**.Host application using this SDK should compiled against 33 or later\n ----\n\nDepending on your specific needs, you can import and use one or all of the classes provided by the SDK.\n```java\nimport com.extrieve.splicer.aisdk.*;\n//OR : can import only required classes as per use cases.\nimport com.extrieve.splicer.aisdk.AiDocument;  \nimport com.extrieve.splicer.aisdk.Config;\n```\n---\n\nIn SplicerAi, prior to any document analysis, an independent document object needs to be created using the `AiDocument` class provided by the SplicerAi SDK. Also the **SDK needs to be activated using proper license** with Config.License.Acivate();\n\n```java\n//Creating a new document object.\nAiDocument DocumentObject = new AiDocument(ImagePath);\n//ImagePath - string type - path of document image \n```\n# KYC Document\n**DocumentObject** can be generated with the following properties :\n\n1.  **ID** : _Identifier for the unique document object.Can be used for further reference_.\n2.  **TYPE** : _Property to specify the KYC document type (AADHAAR,PAN etc.)_.\n3.  **PATH** : _Physical path of the document image file_.\n4.  **DATA** : _Text/character data will be identified and extracted from image_.\n\n**DocumentObject** will be available with the following **Methods** :\n\n## 1.  **KYCDetect**  \nKYCDetect Method from **DocumentObject** will provide the **type of KYC document** with  document analysis intelligence by SplicerAi.\n    \n  ```java\n  //KYCDetect will use callback function to return the result.\n  DocumentObject.KYCDetect(handleKYCDetectCallBack);\n  function handleKYCDetectCallBack(resultJson) {\n      //Use detect respose resultJson here\n  }\n  //Or use lambda \n  DocumentObject.KYCDetect(resultJson -\u003e {\n      //Use detect respose resultJson here\n  });\n  \n  ```\n    \nOnce the document type is identified, same will also be available in the **TYPE** property of **DocumentObject** .Following is the response structure :\n    \n```json\n//Respose JSON data\n{\n   DOCNAME: \"\u003cname/type of document\u003e\",\n   Confidence: \"\u003cLevel of accuracy /High\u003e\",\n   predictedDocs: {\n\t //If any other documents are detected,\n\t //Same will be listed out with the confidence level\n      Aadhaar: \"HIGH\"\n   },\n   //classification succes or not\n   CLASSIFICATION: true/false,\n}\n\n```\n    \n## 2.  **KYCExtract**  \nKYCExtract Method from **DocumentObject** will provide extracted data from the provided document in a JSON string format.\n    \n```java\n//KYCDetect will use callback function to return the result.\nDocumentObject.KYCExtract(handleKYCExtractCallBack);\nfunction handleKYCExtractCallBack(resultJson) {\n  // Code to process the resultJson\n}\n//Or use lambda \nDocumentObject.KYCExtract(resultJson -\u003e {\n  //Detect respose\n});\n\n```\n    \nOnce document data is extracted, the same will be available in **DATA** property of DocumentObject. Following is the response structure :\n    \n```json\n{\n   DOCNAME: \"AADHAAR\",\n   Confidence: \"High\",\n   predictedDocs: {\n      Aadhaar: \"HIGH\"\n   },\n   CLASSIFICATION: true,\n   //Extracted data from KYC document\n   KEYVALUE: {\n      NAME: \"NAME\",\n      GENDER: \"MALE\",\n      DOB: \"16/09/1981\",\n      AADHAARNO: \"2513 5077 5668\",\n      FILENAME: \"\"\n   }\n}\n\n```\n    \n## 3.  **GetKYCDocList**  \nGetKYCDocList Method from **DocumentObject** will provide the list of available KYC documents.\n    \n```java\n//GetKYCDocList will return all the possible KYC document types.\nString KYCDOcList = DocumentObject.GetKYCDocList();\n```\n\nFollowing is a sample response structure :\n\n```json\n[\"AADHAAR\",\"PAN\",\"PASSPORT\"]\n```\n    \n## 4.  **KYCVerify**  \nKYCVerify Method from **DocumentObject** will verify KYC document with the **TYPE** provided.\n    \n```java\n//KYCVerify will use callback function to return the result.\nDocumentObject.KYCVerify(\"PAN\",handleKYCVerifytCallBack);\n*@param \"Type of document to verify can get from GetKYCDocList Method\".\n*@param \"A callback method to capture the KYCVerification response\".\n   \nfunction handleKYCVerifyCallBack(resultJson) \t{\n\t//Process the resultJson\n}\n\n//Or use lambda function\nDocumentObject.KYCVerify(\"PAN\",resultJson -\u003e {\n\t//Detected response JSON\n});\n```\n\nFollowing is a sample response structure :\n```json\n{\n   STATUS: true/false,\n   //success/failure\n   CONFIDENCE : \"LOW/MEDIUM/HIGH\"\n   //if STATUS is success \n }\n```\n    \n\n# **AADHAAR MASKING**\n\nSplicerAi also provides an activity based class for AADHAAR MASKING.\n\n```java\n//Create a new intent to call aadhaar masking activity.\nIntent maskIntent = new Intent(this, Class.forName(\"com.extrieve.splicer.AadhaarMask\"));\n//Pass the ID of the document to be masked\nmaskIntent.putExtra(\"DOCUMENT_ID\",DocumentObject.ID);\n//Set the config for Masking options\n//Keep the extracted aadhaar number in respose.\nConfig.AadhaarMasking.ENABLE_AADHAAR_NO = true;\n//Set the masking colour\nConfig.AadhaarMasking.MaskColor = Color.GRAY;\n//Launch the activity.\nactivityResultLauncher.launch(maskIntent);\n\n//Activity launcher registration\nActivityResultLauncher\u003cIntent\u003e activityResultLauncher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(),result -\u003e {\n\t//Will get the masked image as a result of the intent\n\tIntent data = result.getData();\n\t//data Will contain repose JSON string\n});\n\n```\n\nAadhaarMask intent call, requires a document id of previously created AiDocument Object.  \nThe response data will be in following structure :\n\n```json\n{\n   STATUS: true/false,\n   //Masking activity status\n   DESCRIPTION : \"SUCCESS\",\n   //Success or failure description\n   MASKING_STATUS : true,\n   //Extracted data from KYC document\n   MASKING_STATUS: {\n      COUNT : \"10\",\n      //Number of masking done\n      AADHAAR_NO: \"2513 5077 5668\",\n      //Can enable \u0026 disable in config.\n      MASKED_METHOD: \"MANUAL/SYSTEM\"\n      //Specify how the masking happened\n   }\n   FILE : \"\u003cFile path of masked image\u003e\"\n   //eg : \"/storage/files/Splicer/SP_20240122_183209.jpg\"\n}\n```\n## Config\n\nThe SDK includes a supporting class called for static configuration. This class holds all configurations related to the SDK. It also contains sub-configuration collection for further organization. This includes:\n\n**Common** - Contains various configurations as follows:\n\n- **SDKInfo**  - Contains all version related information on SDK.\n\t```java\n\t//JAVA\n\tConfig.Common.SDKInfo;\n\t```\n\t```kotlin\n\t//Kotlin\n\tConfig!!.Common!!.SDKInfo;\n\t```\n- **DeviceInfo** - Will share all general information about the device.\n\t```java\n\t//JAVA\n\tConfig.Common.DeviceInfo;\n\t```\n\t```kotlin\n\t//Kotlin\n\tConfig!!.Common!!.DeviceInfo;\n\t```\n**License** - Controls all activities related to licensing.\n- ***Activate*** - *Method to activate the SDK license.*\n\t```java\n \t//JAVA\n\tConfig.License.Activate(hostApplicationContext,licenseString);\n\t```\n \t```kotlin\n  \t//Kotlin\n\tConfig!!.License!!.Activate(hostApplicationContext,licenseString)\n\t```\n\t \u003e **hostApplicationContext** : Application context of host/client application which is using the SDK.\n\t \t \u003e **licenseString** : Licence data in string format.\n\t \n\n\n# Notes\n\n### Document supported\n**Indian KYC Documents** : List of KYC documents, their respective subtypes, and the key-value pairs \"expected\" from the current trained set of the SplicerAi :\n\n1.  **PAN CARD** : NAME, FATHER'S NAME, DOB, PAN NO\n2.  **AADHAAR** : NAME, DOB, GENDER, AADHAAR NO, ADDRESS, YEAR OF BIRTH\n3.  **Driving License** : NAME, DOB, S/D/W, ADDRESS, DATE OF ISSUE, DATE OF EXPIRY, LICENSE NO.\n4.  **VOTER ID** : NAME, DOB, GUARDIAN'S NAME, ADDRESS, UID, GENDER\n5.  **PASSPORT** : SURNAME, GIVEN NAME, DOB, DATE OF ISSUE, DATE OF EXPIRY, PASSPORT NO, PLACE OF BIRTH, PLACE OF ISSUE, GENDER, NATIONALITY, COUNTRY CODE\n\nFollowing are the extra subtype supported : (subtypes will provided as part of description)\n\n1.  **PAN Card** – PAN_CORPORATE\n2.  **Passport** – PASSPORT_BACK\n3.  **Voter Id** – VOTER_ID_BACK\n4.  **Driving Licence** – DL_BACK\n\n### Regarding accuracy :\n*The accuracy of Detection \u0026 Extaction technologies depends significantly on the quality of input images, including factors such as image wrapping, stretching, angle of rotation, lighting conditions, and colour consistency. While offline solutions are effective for reducing manual efforts in scenarios having additional verification measures, cannot guarantee 100% accuracy.Even though we are aiming and provinding 88-95% accuracy.*\n\n**Extrieve** - *Your Expert in Document Management \u0026 AI Solutions.*\n\n[© 1996 - 2025 Extrieve Technologies](https://www.extrieve.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fextrievetechnologies%2Fsplicerai_android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fextrievetechnologies%2Fsplicerai_android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fextrievetechnologies%2Fsplicerai_android/lists"}