Face Recognition and Document Reconciliation
Last updated
Was this helpful?
Last updated
Was this helpful?
Handl provides 3 methods for face detection:
The /face/detect
method takes 1 image as input, searches for people's faces, and returns their coordinates in the response. The faces of people in the input image can be represented on documents, such as a passport photo.
The /face/distance
method accepts two images, each of which finds a person's face, then compares them and returns the probability of a face mismatch in the response.
The /face/selfie
method takes as input 1 image, a "selfie" of a person holding the document that also contains an image of their face. It searches the image for the person's face and their photo in the document, and then compares the two found faces. The answer is the same_face
parameter, which returns the value true if the photo and the document contain the face of the same person, and false otherwise.
The parameter distance
in the response shows the probability of a mismatch of two detected faces in the input data:
0.50-1.00 - faces do not match, they are different people (same_face="false")
0.00-0.49 - faces match, it is the same person (same_face="true")
POST
https://latest.handl.ai/face/detect
return_crops
boolean
true (default) - the answer will return the areas with faces clipped from the image in base64 format. false - disables the return of areas with faces.
async
boolean
true - request in asynchronous mode, see. "Asynchronous mode" in the "Connecting" section. false - request in the synchronous mode.
priority
integer
Task priority, by default it takes the value "1"
image
string
File in which you want to find people's faces
POST
https://latest.handl.ai/face/distance
return_crops
string
true (default) - the answer will return the areas cut out of the image in base64 format. false - disables the return of cut out areas with faces.
async
boolean
true - request in asynchronous mode, see. "Asynchronous mode" in the "Connection" section. false - request in the synchronous mode.
priority
integer
Task priority, assumes the value of “1” by default.
image1
string
1st file, in which you need to find a face
image2
string
2nd file, in which you need to find a face
POST
https://latest.handl.ai/face/selfie
return_crops
boolean
true (default) - the answer will return the areas with faces cut out from the image in base64 format. false - disables the return of cut out areas with faces
simple
string
default (the default option) - the algorithm compares the face in the given image with the face in the target document type. simple - the algorithm compares two faces in the image, without checking the document and its type
doc_type
string
The name of the document type on the selfie image. For example, if the target document for comparison with the selfie is a passport, then you must specify the value passtront_main. Any other target document is specified according to the type names in the specification.
simple_cropper
boolean
false (default) - the simplified algorithm of cutting documents from images is not used true - the simplified algorithm of cutting documents from images is used: it works faster but gives less exact results. On images with a complex background documents may be cut out less accurately.
async
boolean
true - Query in asynchronous mode, see "Asynchronous Mode". "Asynchronous mode" in the "Connection" section. false - request in the synchronous mode
priority
integer
Task priority, assumes the value of “1” by default.
image
string
file in which you want to compare faces
Below is the API specification for the 3 face recognition methods. For more details on how to compile the query, see .