Identification (1:N)
Identification answers the question "Who is this person?" without asking the user for an identifier. MobbID compares the captured face with every user of a group (1:N) and returns a ranking of candidates. Typical uses include physical access control, customer recognition at a branch and duplicate registration detection.
Before you begin
- The face engine is built, with liveness enabled.
- The users of the group are enrolled. Every enrolled user belongs to the
DEFAULTgroup; create smaller groups from your backend with the Groups API.
Start the identification
- Swift
- Objective-C
faceSDK.start(recognitionMode: .identification,
parameters: MIDIdentificationParameters(groupId: "headquarters"),
operationListener: self)
extension ViewController: MIDIdentificationListener {
func onIdentificationFinished(result: MIDIdentificationListenerResult, data: MIDIdentificationData?, errorOccurred: MIDError?) {
guard result != .error else {
// The identification could not be completed: offer the user a retry
return
}
// Send the operation ID to your backend to obtain the identified user
}
}
[faceSDK startRecognitionMode:CMIDRecognitionMode.identification
parameters:[[CMIDIdentificationParameters alloc] initWithGroupId:@"headquarters"]
operationListener:self];
// CMIDIdentificationListener
- (void)onIdentificationFinishedResult:(CMIDIdentificationListenerResult *)result
data:(CMIDIdentificationData * _Nullable)data
errorOccurred:(CMIDError * _Nullable)errorOccurred {
if (result == CMIDIdentificationListenerResult.error) {
// The identification could not be completed: offer the user a retry
return;
}
// Send the operation ID to your backend to obtain the identified user
}
| Parameter | Description |
|---|---|
.identification | Runs a 1:N identification. |
MIDIdentificationParameters(groupId:) | Group in which the user is searched. |
MIDIdentificationListener | Receives the outcome, the identification data and, if the operation fails, the error. |
Handle the result
- Identified: a member of the group matches the captured face. Your backend obtains the ranking of candidates, with their scores, by reading the operation. See Operation result.
- Not identified: no member of the group exceeds the decision threshold. The person may not be enrolled in that group.
- Error:
errorOccurreddescribes the cause.
Recommendations
- Search the smallest relevant group. Identification is faster and produces fewer false matches when the group contains only the people who can be present: the employees of a site, the customers of a branch.
- Combine identification with a second factor for high-risk operations, or use verification when the user can state their identity.
Next step
Read the ranking of candidates in your backend with Operation result.