Compare the two photos with multiple faces included and uploaded through the interface to get the similarity score of each pair of faces in the two photos.
For photo standards, refer to Chapter 3 Photo and Video Standards in the Operation Manual.
POST
For example:
Suppose that Photo A corresponding to first_image_file contains two faces (a1, a2); Photo B corresponding to second_image_file contains two faces (b1, b2); a1b1 represents the comparison score of face a1 in Photo A and face b1 in Photo B. The response is like:
Correlations between the verification score threshold and the error rate:
Recommended threshold: greater than 0.7.
Name
Type
Required
Description
first_encrypted_image
string
Yes
Encrypted photo 1. Encryption method reference: [Photo and Video Encryption]
second_encrypted_image
string
Yes
Encrypted photo 2. Encryption method reference: [Photo and Video Encryption]
auto_rotate
boolean
No
The default value is false, indicating that the photo is not rotated. When the value is true, the photo is automatically rotated.
Name
Type
Description
code
int
System response code: 1000
scores
array
The face comparison score of each group of photos
is from 0-1. The greater the value, the greater the probability that the two faces belong to the same person.
face_rects
hash
Face frame in each photo
request_id
string
The ID of this request
Threshold
0.4
0.5
0.6
0.7
0.8
0.9
error rate
1/10
1/100
1/1000
1/10,000
1/100,000
1/1,000,000
Name
Type
Description
code
int
System response code
message
string
Error Messages
request_id
string
The ID of this request
code
Field value
Description
1200
invalid argument
Invalid input parameter
2003
invalid image size
The image size (height and width in pixel) does not meet the requirements
2004
invalid content length
The image file size does not meet the requirements
2005
invalid image type or corrupted
The image type does not meet the requirements
2006
corrupted image error
Image corrupted
4000
detection failed
Feature extraction failed, no face detected in the image
status
Description
400
BAD_REQUEST
404
NOT_FOUND
411
LENGTH_REQUIRED
413
PAYLOAD_TOO_LARGE
500
INTERNAL_ERROR