SplicerAi is an intelligent document analysis SDK offering the following functionalities:
- Document Identification / Classification : Identification and categorization of documents.
- Document Data Extraction : Extraction of textual data from documents.
- Document Masking : Specific to Aadhaar documents, ensuring data privacy.
Developer-friendly & Easy to integrate SDK.
Works entirely offline*, locally on the device, with no data transferred to any server or third party.
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
You can use this SDK in any Android project simply by using Gradle :
//Add expack central repo in settings.gradle
repositories {
google()
mavenCentral()
maven {url 'https://expack.extrieve.in/maven/'}
}
//Then add implementation for SDK in dependencies in build.gradle (module:<yourmodulename>)
dependencies {
implementation 'com.extrieve.splicer.aisdk:SplicerAIv2:2.0.17'
}
Or Maven:
<dependency>
<groupId>com.extrieve.splicer.aisdk</groupId>
<artifactId>SplicerAIv2</artifactId>
<version>SDK-VERSION</version>
</dependency>
//SDK-VERSION - Need to replace with the correct v2 series.
Or can even integrate with the .aar library file and manually add the file dependency to the project/app.
- JAVA 17 Support: QuickCapture v4 requires JAVA version 17 support for the application.
- Minimum Android SDK: QuickCapture v4 requires a minimum API level of 21.
- Target Android SDK: QuickCapture v4 features supports API 35.
- Compiled SDK Version: QuickCapture v4 compiled against API 34.Host application using this SDK should compiled against 33 or later
- This SDK is designed to run on officially supported Android & iOS devices only.
- On Android, Google Play Services is mandatory.
- Supported CPU architectures: arm64-v8a and armeabi-v7a.
- Simulator and emulator environments are not supported.For testing on simulators, please contact the development support team to request a dedicated test version compatible with those environments. Depending on your specific needs, you can import and use one or all of the classes provided by the SDK.
Available properties and method
SDK has one core class and one supporting classe :
import com.extrieve.splicer.aisdk.*;
//OR : can import only required classes as per use cases.
import com.extrieve.splicer.aisdk.AiDocument;
import com.extrieve.splicer.aisdk.Config;
In 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();
//Creating a new document object.
AiDocument DocumentObject = new AiDocument(ImagePath);
//ImagePath - string type - path of document image
DocumentObject can be generated with the following properties :
- ID : Identifier for the unique document object.Can be used for further reference.
- TYPE : Property to specify the KYC document type (AADHAAR,PAN etc.).
- PATH : Physical path of the document image file.
- DATA : Text/character data will be identified and extracted from image.
DocumentObject will be available with the following Methods :
KYCDetect Method from DocumentObject will provide the type of KYC document with document analysis intelligence by SplicerAi.
//KYCDetect will use callback function to return the result.
DocumentObject.KYCDetect(handleKYCDetectCallBack);
function handleKYCDetectCallBack(resultJson) {
//Use detect respose resultJson here
}
//Or use lambda
DocumentObject.KYCDetect(resultJson -> {
//Use detect respose resultJson here
});
Once the document type is identified, same will also be available in the TYPE property of DocumentObject .Following is the response structure :
//Respose JSON data
{
DOCNAME: "<name/type of document>",
Confidence: "<Level of accuracy /High>",
predictedDocs: {
//If any other documents are detected,
//Same will be listed out with the confidence level
Aadhaar: "HIGH"
},
//classification succes or not
CLASSIFICATION: true/false,
}
KYCExtract Method from DocumentObject will provide extracted data from the provided document in a JSON string format.
//KYCDetect will use callback function to return the result.
DocumentObject.KYCExtract(handleKYCExtractCallBack);
function handleKYCExtractCallBack(resultJson) {
// Code to process the resultJson
}
//Or use lambda
DocumentObject.KYCExtract(resultJson -> {
//Detect respose
});
Once document data is extracted, the same will be available in DATA property of DocumentObject. Following is the response structure :
{
DOCNAME: "AADHAAR",
Confidence: "High",
predictedDocs: {
Aadhaar: "HIGH"
},
CLASSIFICATION: true,
//Extracted data from KYC document
KEYVALUE: {
NAME: "NAME",
GENDER: "MALE",
DOB: "16/09/1981",
AADHAARNO: "2513 5077 5668",
FILENAME: ""
}
}
GetKYCDocList Method from DocumentObject will provide the list of available KYC documents.
//GetKYCDocList will return all the possible KYC document types.
String KYCDOcList = DocumentObject.GetKYCDocList();
Following is a sample response structure :
["AADHAAR","PAN","PASSPORT"]
KYCVerify Method from DocumentObject will verify KYC document with the TYPE provided.
//KYCVerify will use callback function to return the result.
DocumentObject.KYCVerify("PAN",handleKYCVerifytCallBack);
*@param "Type of document to verify can get from GetKYCDocList Method".
*@param "A callback method to capture the KYCVerification response".
function handleKYCVerifyCallBack(resultJson) {
//Process the resultJson
}
//Or use lambda function
DocumentObject.KYCVerify("PAN",resultJson -> {
//Detected response JSON
});
Following is a sample response structure :
{
STATUS: true/false,
//success/failure
CONFIDENCE : "LOW/MEDIUM/HIGH"
//if STATUS is success
}
SplicerAi also provides an activity based class for AADHAAR MASKING.
//Create a new intent to call aadhaar masking activity.
Intent maskIntent = new Intent(this, Class.forName("com.extrieve.splicer.AadhaarMask"));
//Pass the ID of the document to be masked
maskIntent.putExtra("DOCUMENT_ID",DocumentObject.ID);
//Set the config for Masking options
//Keep the extracted aadhaar number in respose.
Config.AadhaarMasking.ENABLE_AADHAAR_NO = true;
//Set the masking colour
Config.AadhaarMasking.MaskColor = Color.GRAY;
//Launch the activity.
activityResultLauncher.launch(maskIntent);
//Activity launcher registration
ActivityResultLauncher<Intent> activityResultLauncher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(),result -> {
//Will get the masked image as a result of the intent
Intent data = result.getData();
//data Will contain repose JSON string
});
AadhaarMask intent call, requires a document id of previously created AiDocument Object.
The response data will be in following structure :
{
STATUS: true/false,
//Masking activity status
DESCRIPTION : "SUCCESS",
//Success or failure description
MASKING_STATUS : true,
//Extracted data from KYC document
MASKING_STATUS: {
COUNT : "10",
//Number of masking done
AADHAAR_NO: "2513 5077 5668",
//Can enable & disable in config.
MASKED_METHOD: "MANUAL/SYSTEM"
//Specify how the masking happened
}
FILE : "<File path of masked image>"
//eg : "/storage/files/Splicer/SP_20240122_183209.jpg"
}
The 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:
Common - Contains various configurations as follows:
- SDKInfo - Contains all version related information on SDK.
//JAVA Config.Common.SDKInfo;
//Kotlin Config!!.Common!!.SDKInfo;
- DeviceInfo - Will share all general information about the device.
//JAVA Config.Common.DeviceInfo;
//Kotlin Config!!.Common!!.DeviceInfo;
License - Controls all activities related to licensing.
- Activate - Method to activate the SDK license.
//JAVA Config.License.Activate(hostApplicationContext,licenseString);
//Kotlin Config!!.License!!.Activate(hostApplicationContext,licenseString)
hostApplicationContext : Application context of host/client application which is using the SDK. > licenseString : Licence data in string format.
Indian KYC Documents : List of KYC documents, their respective subtypes, and the key-value pairs "expected" from the current trained set of the SplicerAi :
- PAN CARD : NAME, FATHER'S NAME, DOB, PAN NO
- AADHAAR : NAME, DOB, GENDER, AADHAAR NO, ADDRESS, YEAR OF BIRTH
- Driving License : NAME, DOB, S/D/W, ADDRESS, DATE OF ISSUE, DATE OF EXPIRY, LICENSE NO.
- VOTER ID : NAME, DOB, GUARDIAN'S NAME, ADDRESS, UID, GENDER
- PASSPORT : SURNAME, GIVEN NAME, DOB, DATE OF ISSUE, DATE OF EXPIRY, PASSPORT NO, PLACE OF BIRTH, PLACE OF ISSUE, GENDER, NATIONALITY, COUNTRY CODE
Following are the extra subtype supported : (subtypes will provided as part of description)
- PAN Card – PAN_CORPORATE
- Passport – PASSPORT_BACK
- Voter Id – VOTER_ID_BACK
- Driving Licence – DL_BACK
The accuracy of Detection & 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.
Extrieve - Your Expert in Document Management & AI Solutions.