Python EKYC ExampleΒΆ
Initialize EKYC model
from oneML import faceAPI as api
ekyc = api.EKYC()
Initialize EKYC module with licensing
from oneML import faceAPI as api
license_manager = api.LicenseManager()
license_manager.set_key("LICENSE_KEY_VALUE_HERE")
license_manager.activate_key()
ekyc = api.EKYC(license_manager)
Read input as numpy array
image1 = np.array(cv2.cvtColor(cv2.imread(image_path1), cv2.COLOR_BGR2RGB), dtype=np.uint8)
image2 = np.array(cv2.cvtColor(cv2.imread(image_path2), cv2.COLOR_BGR2RGB), dtype=np.uint8)
Run the model
# run both image blur check and face pad check
ops = api.EKYCOps(True)
result = ekyc.run(image1, image2, ops, ops)
And get the output
bbox1, bbox2 = result.get_bboxes()
score1, score2 = result.get_bbox_scores()
pose1, pose2 = result.get_face_poses()
lm1, lm2 = result.get_landmarks()
is_same_person = result.is_same_person()
distance = result.get_distance()
status = result.get_return_status()