Java EKYC Example

Initialize EKYC module

import org.sertiscorp.oneml.face.*;
EKYC ekyc = new EKYC();

Initialize EKYC module with licensing

import org.sertiscorp.oneml.face.*;
LicenseManager licenseManager = new LicenseManager();
licenseManager.setKey("LICENSE_KEY_VALUE_HERE");
licenseManager.activateKey();
EKYC ekyc = new EKYC(licenseManager);

Initialize oneML’s Utils

Utils utils = new Utils();

Initialize oneML’s Utils with licensing

Utils utils = new Utils(licenseManager);

Read input as oneML’s Image

Image image1 = utils.readImageCV(filePath1);
Image image2 = utils.readImageCV(filePath2);

Run the module

// run both image blur check and face pad check
EKYCOps ops = new EKYCOps(true);
EKYCResult result = ekyc.run(image1, image2, ops, ops);

And get the output

int status = result.getReturnStatus();
boolean same = result.isSamePerson();
float distance = result.getDistance();

BBoxList boxes = result.getBBoxes();
FloatList scores = result.getBBoxScores();
Landmark5List landmarks = result.getLandmarks();
FacePoseList poses = result.getFacePoses();

BBox bbox1 = boxes.get(0);
float score1 = scores.get(0);
Landmark5 lm1 = landmarks.get(0);
FacePose pose1 = poses.get(0);

BBox bbox2 = boxes.get(1);
float score2 = scores.get(1);
Landmark5 lm2 = landmarks.get(1);
FacePose pose2 = poses.get(1);

Cleanup

ekyc.delete();
utils.delete();