Quality Check Verification🔁

Our engine assesses factors like resolution, sharpness, color accuracy, and overall visual fidelity to ensure satisfactory image presentation or analysis and help you meet ICAO standards.

Overview

The Image Quality Assessment API employs advanced algorithms and machine learning models to deliver accurate and objective assessments of image quality. With this powerful tool, you can easily check the overall quality of an image and identify any issues that may affect its usability. This helps you to ensure that your images meet the highest standards and are suitable for a wide range of applications.

🚧

Important!

Before you proceed, ensure you review the prerequisites for integrating to our APIs for a more detailed guide.

API Endpoint

https://api.verified.africa/sfx-v4-verify/v4/id-service

Headers

Our service accepts headers for authentication. See below the headers to pass to the API

HeaderTypeDescription
useridStringThis is your user id retrieved from the portal. Check the getting started article to understand how to retrieve your user ID
apiKeyStringThis is your api key retrieved from the portal. Check the getting started article to understand how to retrieve your apiKey

Request Parameters

Parameter

Required

Description

Type

Test Data

verificationType

Yes

This field is used to identify the service being called. Ensure to use the value provided exactly as provided

String

QUALITY-CHECK-VERIFICATION

Selfie

Yes

The source image

String

Base64 image

qualityCheck

Yes

The quality image configurations are set.

JSON

{"min": 0.5, "name": "hat_detector"},
{"min": 0.5, "name": "blur_detector"},
{"min": 0.5, "name": "glasses_detector"},
{"min": 0.1, "max": 2.2, "name": "face_shadow"},
{"min": 0.05, "max": 0.2, "name": "face_sharpness"},
{"min": 0.4, "max": 0.8, "name": "face_brightness"},
{"min": 40.0, "max": 80.0, "name": "shoulder_score"},
{"min": 1.5, "max": 2.2, "name": "image_height_to_face"},
{"yaw": 10.0, "roll": 10.0, "pitch": 10.0, "name": "estiamte_pose"},
{"min": 0.0, "max": 0.1, "name": "shadow_score"},
{"flag": "ON", "name": "head_in_frame"},
{"flag": "ON", "name": "background_clutter"},
{"min": 0.5, "name": "mask_detector"},
{"min": 0.65, "max": 1.3, "name": "face_align"},
{"height": 350, "width": 350, "name": "image_dimension"}

{
    "verificationType": "QUALITY-CHECK-VERIFICATION",
    "selfie": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/",
    "qualityCheck": [
    {"min": 0.5, "name": "hat_detector"},
    {"min": 0.5, "name": "blur_detector"},
    {"min": 0.5, "name": "glasses_detector"},
    {"min": 0.1, "max": 2.2, "name": "face_shadow"},
    {"min": 0.05, "max": 0.2, "name": "face_sharpness"},
    {"min": 0.4, "max": 0.8, "name": "face_brightness"},
    {"min": 40.0, "max": 80.0, "name": "shoulder_score"},
    {"min": 1.5, "max": 2.2, "name": "image_height_to_face"},
    {"yaw": 10.0, "roll": 10.0, "pitch": 10.0, "name": "estiamte_pose"},
    {"min": 0.0, "max": 0.1, "name": "shadow_score"},
    {"flag": "ON", "name": "head_in_frame"},
    {"flag": "ON", "name": "background_clutter"},
    {"min": 0.5, "name": "mask_detector"},
    {"min": 0.65, "max": 1.3, "name": "face_align"},
    {"height": 350, "width": 350, "name": "image_dimension"}
    ]
}

Response Parameters

Parameter

Type

Description

responseCode

String

Please reference Response Codes page for details on all possible responses

description

String

This is a description of the response received.

verificationType

String

The same verificationType passed in request will be returned here

verificationStatus

String

This field lets you know if the identity verification was successful. Options are:

    • VERIFIED:** This means that the image passed the quality check.
    • NOT VERIFIED** This means that the image did not pass the quality check.
    • PENDING** This status means that the verification could not be completed. Refer to the responseCode for the specific failure reason

transactionStatus

String

This indicates the wallet debit status. The options are successful or failed.

transactionReference

String

If you supplied a transactionReference, the same will be returned here. Else, we would generate a reference and return that to you in this field.

transactionDate

String

Date the transaction was done

response

Json

null

{
    "responseCode": "00",
    "description": "Success",
    "verificationType": "QUALITY-CHECK-VERIFICATION",
    "verificationStatus": "VERIFIED",
    "transactionStatus": "SUCCESSFUL",
    "transactionReference": "1630321373727-S7YEIV7J-1713262779496-950ef218-faa3-4bb7-85f0-f2450ef057d5",
    "transactionDate": "1713262787050",
    "searchParameter": null,
    "callBackUrl": null,
    "livenessScore": 0.0,
    "paymentRef": null,
    "response": [
        {
            "name": "hatDetection",
            "score": 0.003585,
            "status": "Pass",
            "reason": "Score is lower than the threshold"
        },
        {
            "name": "blurDetection",
            "score": 5.4E-5,
            "status": "Pass",
            "reason": "Score is lower than the threshold"
        },
        {
            "name": "glassesDetection",
            "score": 0.159076,
            "status": "Pass",
            "reason": "Score is lower than the threshold"
        },
        {
            "name": "faceShadowDetection",
            "score": 0.216433,
            "status": "Pass",
            "reason": "Score is within the stipulated thresholds"
        },
        {
            "name": "faceSharpnessDetection",
            "score": 0.044421,
            "status": "Fail",
            "reason": "Score is lower than the min threshold"
        },
        {
            "name": "faceBrightnessDetection",
            "score": 0.505151,
            "status": "Pass",
            "reason": "Score is within the stipulated thresholds"
        },
        {
            "name": "shoulderScore",
            "score": 105.0,
            "status": "Fail",
            "reason": "Score is higher than the max threshold"
        },
        {
            "name": "imageHeighttoFace",
            "score": 1.259259,
            "status": "Fail",
            "reason": "Score is lower than the min threshold"
        },
        {
            "name": "estimatePose",
            "status": "Fail",
            "reason": "Yaw value is higher than the yaw threshold",
            "estimatePoseScore": {
                "yaw": 5.254457,
                "roll": 4.28412,
                "pitch": 10.195716
            }
        },
        {
            "name": "shadowScore",
            "score": 0.158477,
            "status": "Fail",
            "reason": "Score is higher than the max threshold"
        },
        {
            "name": "headInFrame",
            "score": "FALSE",
            "status": "Fail",
            "reason": "Head is not within the frame"
        },
        {
            "name": "backgroundClutter",
            "score": "BLUE",
            "status": "Pass",
            "reason": "Plain Background"
        },
        {
            "name": "maskDetection",
            "score": 0.231767,
            "status": "Pass",
            "reason": "Score is lower than the threshold"
        },
        {
            "name": "faceAlign",
            "score": 0.488889,
            "status": "Fail",
            "reason": "Score is lower than the min threshold"
        },
        {
            "name": "imageDimension",
            "score": "width: 816 Height: 612",
            "status": "Fail",
            "reason": "Height and width are not same as threshold"
        }
    ],
    "faceMatch": null,
    "licenseSessionId": null,
    "remainingLicenseSessionRound": null
}

Error Responses

Status CodeDescription
400Bad Request - Invalid input parameters
401Unauthorized - Invalid API Key
500Internal Server Error - Something went wrong on the server side