API

Step by Step on How to Use Face Occlusion Service

Parameters

In postman, send a POST to coordinator: http://localhost:4004/NFFS-FIQA/v1/predict

{
  "images": ["base64"],
}

Payload below if you want to determine specific threshold for each analytics inside FIQA.

{
    "additional_params": {
        "face_detection": {
            "threshold": 0.9
        },
        "face_occlusion": {
            "threshold": 0.6
        },
        "face_iqa": {
            "threshold": 0.435
        }
  },
    "images": ["base64"],
}

Response

1. Success (Face Accepted for Enrollment)

{
    "job": {
        "id": "20230801100518697b88a670854340c5d452a91786c7ccfcf8149fadb86f2acfb7b2ed1316cb584e2",
        "result": {
            "analytic_type": "FACE IQA PIPELINE",
            "result": [
                {
                    "accepted": true,
                    "face_iqa": {
                        "accepted": true,
                        "iqa_score": 0.4586
                    },
                    "face_occlusion": {
                        "occluded": false,
                        "occluded_features": {
                            "cheek_left": false,
                            "cheek_right": false,
                            "chin": false,
                            "eye_left": false,
                            "eye_right": false,
                            "eyebrow_left": false,
                            "eyebrow_right": false,
                            "forehead": false,
                            "mouth": false,
                            "nose": false
                        }
                    }
                }
            ],
            "status": "success"
        }
    },
    "message": "Your Image accepted.",
    "ok": true
}

2. Unsuccessful (Face not Detected or Multiple Face Detected)

{
    "job": {
        "id": "20230801100154763e7464ad7dab8209e65262a4cbff2f7bc7759a47975a76533f7d479d784cacf45",
        "result": {
            "analytic_type": "FACE IQA PIPELINE",
            "result": [
                {
                    "accepted": false,
                    "face_iqa": {},
                    "face_occlusion": {}
                }
            ],
            "status": "success"
        }
    },
    "message": "Your Image not accepted. Face not detected or Multiple faces detected.",
    "ok": true
}

3. Unsuccessfull (Face Occluded)

{
    "job": {
        "id": "20230801100634730cadbab4b669da921d0c59256dfd1b2dc8a227495e185ea77ed39f990bc3336dd",
        "result": {
            "analytic_type": "FACE IQA PIPELINE",
            "result": [
                {
                    "accepted": false,
                    "face_iqa": {},
                    "face_occlusion": {
                        "occluded": true,
                        "occluded_features": {
                            "cheek_left": false,
                            "cheek_right": false,
                            "chin": false,
                            "eye_left": true,
                            "eye_right": false,
                            "eyebrow_left": false,
                            "eyebrow_right": false,
                            "forehead": false,
                            "mouth": false,
                            "nose": false
                        }
                    }
                }
            ],
            "status": "success"
        }
    },
    "message": "Your Image not accepted. Face is Occluded.",
    "ok": true
}

4. Unsuccessful (Face Quality not Match)

{
    "job": {
        "id": "20230801100653759d0a322b50cc1c6248b63d225619b665a78491e4cdc712006584bb625d4feb9d2",
        "result": {
            "analytic_type": "FACE IQA PIPELINE",
            "result": [
                {
                    "accepted": false,
                    "face_iqa": {
                        "accepted": false,
                        "iqa_score": 0.272
                    },
                    "face_occlusion": {
                        "occluded": false,
                        "occluded_features": {
                            "cheek_left": false,
                            "cheek_right": false,
                            "chin": false,
                            "eye_left": false,
                            "eye_right": false,
                            "eyebrow_left": false,
                            "eyebrow_right": false,
                            "forehead": false,
                            "mouth": false,
                            "nose": false
                        }
                    }
                }
            ],
            "status": "success"
        }
    },
    "message": "Your Image not accepted. Image quality not match.",
    "ok": true
}

Error

{
  "job": {
    "id": "hex",
    "result": null
  },
  "message": "string",
  "ok": false
}

Last updated