Golang EKYC Example¶
Initialize EKYC module
import ("oneml/face")
ekyc := new EKYC()
Initialize EKYC module with licensing
import ("oneml/face")
licenseManager := face.NewLicenseManager()
licenseManager.SetKey("LICENSE_KEY_VALUE_HERE")
licenseManager.ActivateKey()
ekyc := face.NewEKYC(licenseManager)
Initialize oneML’s Utils
Utils utils = face.NewUtils()
Initialize oneML’s Utils with licensing
Utils utils = face.NewUtils(licenseManager)
Read input as oneML’s Image
image1 := oneMLUtils.ReadImageCV(filePath1)
image2 := oneMLUtils.ReadImageCV(filePath2)
Run the model
// run both image blur check and face pad check
ops := face.NewEKYCOps(true)
result := ekyc.Run(image1, image2, ops, ops)
And get the output
distance := result.GetDistance()
isSamePerson := result.IsSamePerson()
bboxes := result.GetBboxes()
scores := result.GetBboxScores()
landmarks := result.GetLandmarks()
poses := result.GetFacePoses()
status := result.GetReturnStatus()
Cleanup
defer face.DeleteEKYC(ekyc)
defer face.DeleteUtils(oneMLUtils)