Application
Face Detection
The following Image API services perform face detection:
- face-detector-face-fitter
- face-detector-template-extractor
- face-detector-liveness-estimator
Body Detection
Input image size is no more than 4.7 MB.
The request is sent to body-detector service. API returns the following attributes with calculated values:
objects:
- id
- class
- confidence
- bbox
Request example:
{
"$image": "image in base64",
"objects": [
{}
]
}
Response example:
{
"$image":"image in base64",
"objects": [
{
"id": 0,
"class": "body",
"confidence": 0.8266383409500122,
"bbox": [
0.648772656917572,
0.13773296773433685,
0.9848934412002563,
0.8240703344345093
]
},
{
"id": 1,
"class": "body",
"confidence": 0.7087612748146057,
"bbox": [
0.35164034366607666,
0.15803256630897522,
0.6833359003067017,
0.8854727745056152
]
}
]
}
Gender Estimation
The request is sent to gender-estimator service. API returns the following attributes with calculated values:
objects:
- id
- class
- gender
Request example:
{
"$image": "image in base64",
"objects": [
{}
]
}
Response example:
{
"$image":"image in base64",
"objects": [
{
"id": 0,
"class": "face",
"gender": "MALE"
}
]
}
Age Estimation
The request is sent to age-estimator service. API returns the following attributes with calculated values:
objects:
- id
- class
- age
Request example:
{
"$image": "image in base64",
"objects": [
{}
]
}
Response example:
{
"$image":"image in base64",
"objects": [
{
"id": 0,
"class": "face",
"age": "25"
}
]
}
Emotion Estimation
The request is sent to emotion-estimator service. API returns the following attributes with calculated values:
objects:
- id
- class
- emotions
- emotion
- confidence
Request example:
{
"$image": "image in base64",
"objects": [
{}
]
}
Response example:
{
"$image":"image in base64",
"objects": [
{
"id": 0,
"class": "face",
"emotions": [
{
"confidence": 0.10151619818478974,
"emotion": "ANGRY"
},
{
"confidence": 0.07763473911731263,
"emotion": "DISGUSTED"
},
{
"confidence": 0.20321173801223097,
"emotion": "SCARED"
},
{
"confidence": 0.08768639197580883,
"emotion": "HAPPY"
},
{
"confidence": 0.19000983487515088,
"emotion": "NEUTRAL"
},
{
"confidence": 0.08262699313446588,
"emotion": "SAD"
},
{
"confidence": 0.257314104700241,
"emotion": "SURPRISED"
}
]
}
]
}
Liveness Estimation
The request is sent to face-detector-liveness-estimator service, used for face detection and liveness estimation.
The service has three modules available for selection:
- liveness-anti-spoofing
- quality-liveness-anti-spoofing
- face-detector-liveness-estimator
To find out which module is installed, contact your administrator.
liveness-anti-spoofing module
Input image size is no more than 4.7 MB with resolution of no more than 10 megapixels. The module calculates liveness only for one face in the image.
API returns the following attributes with calculated values:
objects:
- id
- class
- liveness:
- confidence
- value
Request example:
{
"$image": "image in base64",
"objects": [
{}
]
}
Response example:
{
"$image":"image in base64",
"objects": [
{
"id": 0,
"class": "face",
"liveness": {
"confidence": 0.9989556074142456,
"value": "REAL"
}
}
]
}
quality-liveness-anti-spoofing module
Input image size is no more than 4.7 MB with resolution of no more than 10 megapixels. The module calculates liveness only for one face in the image.
The module returns the following error list:
The image did not pass the quality threshold. The error contains the threshold value and the calculated value for the input image:
{
"detail": "Low image quality. Calculated score value (22) is less than the threshold (30)
}
The image contains more than one face:
{
"detail": "More than one face detected"
}
API returns the following attributes with calculated values:
objects:
- id
- class
- liveness:
- confidence
- value
Request example:
{
"$image": "image in base64",
"objects": [
{}
]
}
Response example:
{
"$image":"image in base64",
"objects": [
{
"id": 0,
"class": "face",
"liveness": {
"confidence": 0.9989556074142456,
"value": "REAL"
}
}
]
}
face-detector-liveness-estimator module
Input image size is no more than 4.7 MB.
API returns the following attributes with calculated values:
objects:
- id
- class
- bbox
- confidence
- liveness:
- confidence
- value
Request example:
{
"$image": "image in base64",
"objects": [
{}
]
}
Response example:
{
"$image":"image in base64",
"objects": [
{
"id": 0,
"class": "face",
"confidence": 0.8233476281166077,
"bbox": [
0.375,
0.12333333333333334,
0.7645833333333333,
0.42
],
"liveness": {
"confidence": 0.9989556074142456,
"value": "REAL"
}
}
]
}
Face mask check
In this version of Image API, it is recommended to use the quality-assessment-estimator service to determine the presence/absence of a mask on a face, which currently shows more accurate results compared to the mask-estimator service.
The request is sent to mask-estimator service. API returns the following attributes with calculated values:
objects:
- id
- class
- mask:
- value
- confidence
Request example:
{
"$image": "image in base64",
"objects": [
{}
]
}
Response example:
{
"$image":"image in base64",
"objects": [
{
"id": 0,
"class": "face",
"mask": {
"confidence": 0.07230597734451294,
"value": false
}
}
]
}
Anthropometric Points
This request is sent to face-detector-face-fitter service. API returns the following attributes with calculated values:
objects:
- id
- class
- bbox
- confidence
- fitter:
- fitter_type
- keypoints
- left_eye
- right_eye
- angles:
- yaw
- pitch
- roll
Request example:
{
"$image": "image in base64",
"objects": [
{}
]
}
Response example:
{
"$image":"image in base64",
"objects": [
{
"id": 0,
"class": "face",
"confidence": 0.895225465297699,
"bbox": [
0.10445103857566766,
0.05966162065894924,
0.7008902077151336,
0.9243098842386465
],
"fitter": {
"fitter_type": "fda",
"keypoints": [
344.24078369140625,
379.23858642578125,
0,
443.0493469238281,
364.8091125488281,
0,
547.5462646484375,
384.35833740234375,
0,
724.5175170898438,
385.01220703125,
0,
816.4994506835938,
366.4952697753906,
0,
899.7161865234375,
380.7967224121094,
0,
391.20654296875,
461.12066650390625,
0,
461.524169921875,
459.44287109375,
0,
531.2512817382812,
467.7398681640625,
0,
721.8792724609375,
468.227294921875,
0,
784.9144897460938,
461.4508056640625,
0,
854.609130859375,
465.002685546875,
0,
250.21035766601562,
657.1244506835938,
0,
559.1598510742188,
666.7738647460938,
0,
641.8836059570312,
678.353515625,
0,
710.0083618164062,
670.3438110351562,
0,
939.4479370117188,
656.3207397460938,
0,
509.8494873046875,
816.0798950195312,
0,
634.861083984375,
823.5408325195312,
0,
748.5276489257812,
813.4531860351562,
0,
633.5501098632812,
1033.822509765625,
0
],
"left_eye": [
461.524169921875,
459.44287109375
],
"right_eye": [
784.9144897460938,
461.4508056640625
]
},
"angles": {
"yaw": 6.648662090301514,
"roll": 0.3107689917087555,
"pitch": -23.410654067993164
}
}
]
}
Quality Assessment
This request is sent to quality-assessment-estimator service. In the request body pass the values of face attributes obtained after processing the image by face-detector-face-fitter. API returns the following attributes with calculated values:
objects:
- id
- class
- confidence
- bbox
- quality:
- qaa:
- totalScore
- isSharp
- sharpnessScore
- isEvenlyIlluminated
- illuminationScore
- noFlare
- isLeftEyeOpened
- leftEyeOpennessScore
- isRightEyeOpened
- rightEyeOpennessScore
- isBackgroundUniform
- backgroundUniformityScore
- isDynamicRangeAcceptable
- dynamicRangeScore
- isEyesDistanceAcceptable
- eyesDistance
- isNotNoisy
- noiseScore
- isMarginsAcceptable
- marginInnerDeviation
- marginOuterDeviation
- isNeutralEmotion
- neutralEmotionScore
- notMasked
- notMaskedScore
- hasWatermark
- watermarkScore
- isRotationAcceptable
- maxRotationDeviation
- qaa:
Request example:
{
"$image": "string",
"objects": [
{
"id": 0,
"class": "face",
"confidence": 0.895225465297699,
"bbox": [
0.10445103857566766,
0.05966162065894924,
0.7008902077151336,
0.9243098842386465
],
"fitter": {
"fitter_type": "fda",
"keypoints": [
344.24078369140625,
379.23858642578125,
0,
443.0493469238281,
364.8091125488281,
0,
547.5462646484375,
384.35833740234375,
0,
724.5175170898438,
385.01220703125,
0,
816.4994506835938,
366.4952697753906,
0,
899.7161865234375,
380.7967224121094,
0,
391.20654296875,
461.12066650390625,
0,
461.524169921875,
459.44287109375,
0,
531.2512817382812,
467.7398681640625,
0,
721.8792724609375,
468.227294921875,
0,
784.9144897460938,
461.4508056640625,
0,
854.609130859375,
465.002685546875,
0,
250.21035766601562,
657.1244506835938,
0,
559.1598510742188,
666.7738647460938,
0,
641.8836059570312,
678.353515625,
0,
710.0083618164062,
670.3438110351562,
0,
939.4479370117188,
656.3207397460938,
0,
509.8494873046875,
816.0798950195312,
0,
634.861083984375,
823.5408325195312,
0,
748.5276489257812,
813.4531860351562,
0,
633.5501098632812,
1033.822509765625,
0
],
"left_eye": [
461.524169921875,
459.44287109375
],
"right_eye": [
784.9144897460938,
461.4508056640625
]
},
"angles": {
"yaw": 6.648662090301514,
"roll": 0.3107689917087555,
"pitch": -23.410654067993164
}
}
]
}
Response example:
{
"$image": "string",
"objects": [
{
"id": 0,
"class": "face",
"confidence": 0.69044026635,
"bbox": [
0.42242398858070374,
0.05838850140571594,
0.5360375642776489,
0.17216356098651886
],
"quality": {
"qaa": {
"totalScore": 0,
"isSharp": true,
"sharpnessScore": 0,
"isEvenlyIlluminated": true,
"illuminationScore": 0,
"noFlare": true,
"isLeftEyeOpened": true,
"leftEyeOpennessScore": 0,
"isRightEyeOpened": true,
"rightEyeOpennessScore": 0,
"isRotationAcceptable": true,
"maxRotationDeviation": 0,
"notMasked": true,
"notMaskedScore": 0,
"isNeutralEmotion": true,
"neutralEmotionScore": 0,
"isEyesDistanceAcceptable": true,
"eyesDistance": 0,
"isMarginsAcceptable": true,
"marginOuterDeviation": 0,
"marginInnerDeviation": 0,
"isNotNoisy": true,
"noiseScore": 0,
"watermarkScore": 0,
"hasWatermark": true,
"dynamicRangeScore": 0,
"isDynamicRangeAcceptable": true,
"backgroundUniformityScore": 0,
"isBackgroundUniform": true
}
}
}
]
}
Extraction of Biometric Template
This request is sent to face-detector-template-extractor service. API returns the following attributes with calculated values:
objects:
- id
- class
- confidence
- bbox
- $template
- template_size
Request example:
{
"$image": "image in base64",
"objects": [
{}
]
}
Response example:
{
"$image":"image in base64",
"objects": [
{
"id": 0,
"class": "face",
"confidence": 0.895225465297699,
"bbox": [
0.10445103857566766,
0.05966162065894924,
0.7008902077151336,
0.9243098842386465
],
"$template": "template in base64",
"template_size": 74
}
]
}
Face Verification
This request is sent to verify-matcher service. In the request body pass the values of face attributes obtained after processing the image by face-detector-template-extractor. API returns the following attributes with calculated values:
verification:
- distance
- fa_r
- fr_r
- score
Request example:
{
"objects": [
{"id": 0,
"class": "face",
"confidence": 0.9171707630157471,
"bbox": [
0.14427860696517414,
0.21912350597609562,
0.8656716417910447,
0.796812749003984
],
"$template": "template in base64",
"template_size": 74},
{"id": 0,
"class": "face",
"confidence": 0.8453116416931152,
"bbox": [
0.16477272727272727,
0.22272727272727272,
0.875,
0.7954545454545454
],
"$template": "template in base64",
"template_size": 74}
]
}
Response example:
{
"objects": [
{
"bbox": [
0.14427860696517414,
0.21912350597609562,
0.8656716417910447,
0.796812749003984
],
"$template": "template in base64",
"id": 0,
"class": "face",
"confidence": 0.9171707630157471,
"template_size": 74
},
{
"bbox": [
0.16477272727272727,
0.22272727272727272,
0.875,
0.7954545454545454
],
"$template": "template in base64",
"id": 0,
"class": "face",
"confidence": 0.8453116416931152,
"template_size": 74
}
],
"verification": {
"distance": 4796,
"fa_r": 0,
"fr_r": 0.522820770740509,
"score": 0.9515298008918762
}
}