MS-988 Adding SimFace integration#1202
Conversation
9684518 to
b286120
Compare
6167762 to
76fc303
Compare
| * Dev version >= 2024.2.2 is required for float quality thresholds | ||
| * Dev version >= 2024.3.0 is required to receive configuration ID | ||
| * Dev version >= 2025.2.0 is required to support enrolment record updates | ||
| * Dev version >= 2025.2.0 is required to support enrolment record updates and biometric sdk age restrictions to receive SimFace configuration |
There was a problem hiding this comment.
"biometric sdk age restrictions" - copy-paste?
76fc303 to
7f07880
Compare
| candidate.faces.map { face -> | ||
| val baseScore = simFace.verificationScore(probeTemplate, face.template) | ||
| // TODO: remove the adjustment after we find out why the returned range is biased towards [0.5;1] | ||
| (baseScore - 0.5).coerceAtLeast(0.0).toFloat() * 200f |
There was a problem hiding this comment.
Not commenting on the "fix" itself :D but shouldn't this at least be inside the SDK?
There was a problem hiding this comment.
It could be inside, but it is "simpler" to adjust it on the caller side as it does not require re-publishing of the AAR. Ideally, we find the reason for the bias and fix it on the model level (there is a plan on the biometrics team side). For now, this should be enough, tho.
| Simber.i("Initialising matcher", tag = crashReportTag) | ||
| val bioSdk = resolveFaceBioSdk() | ||
| if (matchParams.faceSDK == null) { | ||
| send(MatcherState.Success(emptyList(), 0, "")) |
There was a problem hiding this comment.
Should we log a Simber.e() here (and in fingerprint's copy) as this would indicate a code error somewhere?
There was a problem hiding this comment.
I will add Simber.w since there is no exception to log with .e().
| val faces = simFace.detectFaceBlocking(bitmap) | ||
| val face = faces.getOrNull(0) ?: return@runBlocking null | ||
| // Skip the obviously bad images, but leave the rest to be determined by the caller | ||
| if (face.quality < 0.1) return@runBlocking null |
There was a problem hiding this comment.
Would be better if declared 0.1 in constants
|
|
||
| dependencies { | ||
| implementation(project(":face:infra:base-bio-sdk")) | ||
| api(libs.simface) |
There was a problem hiding this comment.
can you use implementation to avoid exposing the libs.simface outside this module ?
There was a problem hiding this comment.
Unfortunately, no - we need to provide the regular "SimFace" to the matcher's constructor.
| licenseRepository.deleteCachedLicense(Vendor.RankOne) | ||
| _invalidLicense.send() | ||
| } | ||
| saveLicenseCheckEvent(licenseVendor, licenseStatus) |
There was a problem hiding this comment.
Maybe in the future we can abstract all this logic in the license repo, so that it takes the SDK as param and returns whatever license is appropriate and the call here is the same regardless of the SDK.
There was a problem hiding this comment.
I vote for removing the license module altogether. :D
Made a ticket for it: https://simprints.atlassian.net/browse/MS-1011
| class SimFaceBioSdk @Inject constructor( | ||
| override val initializer: SimFaceInitializer, | ||
| override val detector: SimFaceDetector, | ||
| private val simFace: SimFace, |
There was a problem hiding this comment.
It's a little weird to have SimFace* and just SimFace. However, the latter comes from the lib so don't have a concrete suggestion at the moment.
There was a problem hiding this comment.
This is only due to the matchers being created dynamically for the probe list.
7f07880 to
be324d3
Compare
|



JIRA ticket
Will be released in: 2025.2.0
Notable changes
dev-usdeployment. For staging and prod projects, nothing changes.Testing guidance
Additional work checklist