2.1 /quality/face/stateless
Perform a quality check of the photo.
For photo standards, refer to Chapter 3 Photo and Video Standards in the Operation Manual.
Request mode
POST
Request URL
http://ip:port/quality/face/stateless
Request parameters
Name
Type
Required
Description
Normal response
Name
Type
Description
code
int
System response code: 1000
faces
Array
Information about the quality of each face in the photo
request_id
string
The ID of this request
{
"code": 1000,
"faces": [
{
"rect": { # face frame position
"left": integer, # The left border of the face frame is the X-coordinate, and the upper left corner of the image is the origin of coordinates
"top": integer, # The top border of the face frame is the Y-coordinate, and the upper left corner of the image is the origin of coordinates
"right": integer, # The right border of the face frame is the X-coordinate, and the upper left corner of the image is the origin of coordinates
"bottom": integer # The bottom border of the face frame is the Y-coordinate, and the upper left corner of the image is the origin of coordinates
},
"pose": { # pose angle information
"yaw": float, # rotation angle around the Y-axis
"pitch": float, # rotation angle around the X-axis
"roll": float # rotation angle around the Z-axis
},
"occlusion":{ # occlusion information
"left_eye": float, # The proportion of left eye not occluded with value range between [0,1]. The larger the value, the less occlusion
"right_eye": float, # The proportion of right eye not occluded with value range between [0,1]. The larger the value, the less occlusion
"nose": float, # The proportion of nose not occluded with value range between [0,1]. The larger the value, the less occlusion
"mouth": float, # The proportion of mouth not occluded with value range between [0,1]. The larger the value, the less occlusion
"total": float # The proportion of five features not occluded with value range between [0,1]. The larger the value, the less occlusion
},
"distance2center": float, # The proportion of the distance of the face to the center of the image with value range between [0,1]. The higher the score, the closer the face to the center of the image. The calculation formula is as follows: max (1-distance from the center of five features to the center of the image/distance of the short side of the image, 0)
"size": float, # The proportion of five features in the image with value range between [0,1]. The higher the score, the greater the proportion of five features: Area of the five features in the image/image area
"brightness": float, # Face brightness score with value range between [-1,1]. The higher the score, the higher the brightness
"sharpness": float, # Face sharpness score with value range between [0,1]. The higher the score, the higher the sharpness
"mouth_open": float, # Degree of mouth opening with value range between [0,1]. The higher the score, the lower the degree of mouth opening
"integrity": float # Integrity of the five features in the image, with value range between [0,1]. The higher the score, the more integral the face is in the image. The calculation formula is as follows: Area of the five features in the image/five features area
}
],
"request_id": string
}
Abnormal response
Name
Type
Instructions
code
int
System response code
message
string
Error Messages
request_id
string
The ID of this request
{
"code": int,
"message": string,
"request_id": string
}
System response code
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
4000
detection failed
Feature extraction failed, no face detected in the image
Possible HTTP status codes
status
Description
400
BAD_REQUEST
404
NOT_FOUND
411
LENGTH_REQUIRED
413
PAYLOAD_TOO_LARGE
500
INTERNAL_ERROR
Sample
curl -X POST "http://ip:port/quality/face/stateless" \
-d encrypted_image=xxx
Last updated
Was this helpful?