splicerai 0.0.8
splicerai: ^0.0.8 copied to clipboard
Developer Friendly Document Automation plugin for document classification,Masking,extraction & verification From Extrieve.
SplicerAi Flutter Plugin #
Extrieve Technologies - Your Expert in Document Management & AI Solutions
The SplicerAi Flutter Plugin provides a set of tools for integrating advanced document management and AI-powered KYC (Know Your Customer) solutions into your Flutter applications. With this plugin, you can easily perform Aadhaar masking, detect and extract information from KYC documents, and verify KYC documents against specific document types.
Features #
- Aadhaar Masking: Automatically mask sensitive information on Aadhaar cards to protect user privacy.
- KYC Document Detection: Detect the type of KYC document provided (e.g., Aadhaar, Passport, PAN Card).
- KYC Information Extraction: Extract structured data from KYC documents for easy processing.
- KYC Document Verification: Verify the authenticity of KYC documents against supported document types.
- Supported Document Types: Retrieve a list of all KYC document types supported by the plugin.
Getting Started #
This plugin provides a simple interface to leverage SplicerAi's document management and AI capabilities in your Flutter applications.
Prerequisites #
- Flutter SDK: Make sure you have Flutter installed on your machine. For installation instructions, visit Flutter's official website.
- Dart SDK: Included with the Flutter SDK.
Installation #
Add splicerai
to your project's pubspec.yaml
file:
dependencies:
flutter:
sdk: flutter
splicerai: ^1.0.0 # Replace with the latest version
Then, run flutter pub get
to fetch the package.
Integration #
Import the Package
import 'package:splicerai/splicerai.dart';
License Activation
Before using the plugin, you need to activate your license. Replace "<Your Android License Key>"
with the license keys provided by Extrieve Technologies.
Future<void> activateLicense() async {
String androidLicense = "<Your Android License Key>";
String iosLicense = "<Your IOS License Key>";
try {
bool? isActivated = await SplicerAi().activateLicense(
android: androidLicense,
ios: iosLicense,
);
if (isActivated == true) {
print("License activated successfully");
} else {
print("License activation failed. Please check your license.");
}
} catch (e) {
print("Error activating license: ${e.toString()}");
}
}
Usage Examples
1. Aadhaar Masking
Mask sensitive information on an Aadhaar card image.
Future<void> maskAadhaar(String imagePath) async {
try {
String? maskedImagePath = await SplicerAi.maskAadhaar(imagePath);
if (maskedImagePath != null) {
print("Aadhaar masked successfully. Masked image path: $maskedImagePath");
} else {
print("Failed to mask Aadhaar");
}
} catch (e) {
print("Error in Aadhaar masking: ${e.toString()}");
}
}
2. KYC Document Detection
Detect the type of KYC document in an image.
Future<void> detectKYCDocument(String imagePath) async {
try {
String? detectionResult = await SplicerAi.detectKYCDocument(imagePath);
if (detectionResult != null) {
print("KYC Document detected: $detectionResult");
} else {
print("Failed to detect KYC document");
}
} catch (e) {
print("Error in KYC document detection: ${e.toString()}");
}
}
3. KYC Information Extraction
Extract information from a KYC document.
Future<void> extractKYCDocument(String imagePath) async {
try {
String? extractionResult = await SplicerAi.extractKYCDocument(imagePath);
if (extractionResult != null) {
print("KYC Document extraction result: $extractionResult");
} else {
print("Failed to extract KYC document");
}
} catch (e) {
print("Error in KYC document extraction: ${e.toString()}");
}
}
4. Get Supported KYC Document Types
Retrieve a list of all supported KYC document types.
Future<void> getSupportedKYCDocuments() async {
try {
String? docListJson = await SplicerAi.getSupportedKYCDocList();
if (docListJson != null) {
List<dynamic> docList = jsonDecode(docListJson);
print("Supported KYC Documents: ${docList.join(', ')}");
} else {
print("Failed to retrieve supported KYC documents");
}
} catch (e) {
print("Error fetching supported KYC documents: ${e.toString()}");
}
}
5. KYC Document Verification
Verify a KYC document against a specified document type.
Future<void> verifyKYCDocument(String imagePath, String documentType) async {
try {
String? verificationResult = await SplicerAi.verifyKYCDocument(
imagePath,
documentType,
);
if (verificationResult != null) {
print("KYC Document verification result: $verificationResult");
} else {
print("Failed to verify KYC document");
}
} catch (e) {
print("Error in KYC document verification: ${e.toString()}");
}
}
Complete Example #
Here is a complete example integrating all the above functionalities:
import 'package:flutter/material.dart';
import 'package:splicerai/splicerai.dart';
import 'dart:convert';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// Application root
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'SplicerAi Demo',
home: SplicerAiDemo(),
);
}
}
class SplicerAiDemo extends StatefulWidget {
@override
_SplicerAiDemoState createState() => _SplicerAiDemoState();
}
class _SplicerAiDemoState extends State<SplicerAiDemo> {
@override
void initState() {
super.initState();
activateLicense();
}
Future<void> activateLicense() async {
String androidLicense = "<Your Android License Key>";
String iosLicense = "<Your iOS License Key>";
try {
bool? isActivated = await SplicerAi().activateLicense(
android: androidLicense,
ios: iosLicense,
);
if (isActivated == true) {
print("License activated successfully");
} else {
print("License activation failed. Please check your license.");
}
} catch (e) {
print("Error activating license: ${e.toString()}");
}
}
// Implement other methods as needed...
@override
Widget build(BuildContext context) {
// Build your UI here
return Scaffold(
appBar: AppBar(
title: Text('SplicerAi Demo'),
),
body: Center(
child: Text('Integrate SplicerAi features here'),
),
);
}
}
Document supported #
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
Regarding accuracy : #
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-93% accuracy.
Note: Replace placeholders like "<Your Android License Key>"
and "<Your iOS License Key>"
with your actual license keys provided by Extrieve Technologies.
By integrating the SplicerAi Flutter Plugin, you can enhance your application with powerful document management and AI capabilities, providing users with secure and efficient KYC processing.
Additional Information #
- Author: Extrieve Technologies
- Website: https://www.extrieve.com
- Support: For any issues or questions, please contact our support team at devsupport@extrieve.com.
- For more information, refer to the Extrieve SplicerAi..
Getting Help #
For help getting started with Flutter, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Important #
- Privacy and Security: Always handle user data securely and ensure compliance with applicable laws and regulations when processing personal identification documents.
- Error Handling: Implement proper error handling in your application to provide a smooth user experience.