BioID Face Biometrics Company

While preparing for my Code Europe presentation, I had a chance to test BioID – a Digital Identity Verification Provider. I encourage everyone to register and try BioID’s playground, which is a demo of the services they provide. The demo is free and allows you to perform biometric operations.
During my tests, I was particularly interested in

Below is the recording from my tests.

video
play-sharp-fill

I initially had problems passing the liveness detection check, probably due to nodding too quickly. The video sent for deep fake detection was just a simple left-right rotation recorded by my smartphone. BioID successfully qualified this video as real.

video
play-sharp-fill

The playground is really nice for trying out the capabilities of BioID. However, I also had a chance to test their API trial, and BioID agreed to let me present the results of my tests on my blog and during my Code Europe lecture. I would like to say a big thank you to BioID for granting permission and setting up longer trial access than usual.

I focused only on the Web API and testing via Postman.
So let’s have a look at the first backend call using the live detection API, where just two live images are sent encoded in the POST body.

BioID provides a very nice portal with a dashboard that shows details of API calls, including the images sent to BioID.

BioID identified that the person in these two pictures is live, therefore the response includes “Success”: true. Below is the screenshot from the Details tab and the full response.

{
    "Success": true,
    "State": "Julia",
    "JobID": "39b59798-d0e1-4243-a3b2-e894b7911d62",
    "Samples": [
        {
            "Errors": [
                {
                    "Code": "BadFaceBrightness",
                    "Message": "The face area within the image has an improper brightness distribution.",
                    "Details": "A Kurtosis of 17.57 was calculated, where only a value between -2.00 and 10.00 is allowed."
                }
            ],
            "EyeCenters": {
                "RightEyeX": 921.934,
                "RightEyeY": 999.664,
                "LeftEyeX": 1393.527,
                "LeftEyeY": 1004.194
            }
        },
        {
            "Errors": [
                {
                    "Code": "BadFaceBrightness",
                    "Message": "The face area within the image has an improper brightness distribution.",
                    "Details": "A Kurtosis of 15.58 was calculated, where only a value between -2.00 and 10.00 is allowed."
                }
            ],
            "EyeCenters": {
                "RightEyeX": 936.922,
                "RightEyeY": 851.854,
                "LeftEyeX": 1410.395,
                "LeftEyeY": 865.875
            }
        }
    ]
}

The most important parameter is “Success” from the response, which, as BioID’s documentation states

Boolean flag indicating whether the submitted images prove that they are recorded from a live person.

https://developer.bioid.com/classicbws/bwsreference/webapi/livedetection

Let’s try another example, this time with glasses.

Again, the person in the picture was classified as live. Let’s try sending two identical pictures so that the person in the images does not move.
As expected, the liveness check failed this time with a false result.

Let’s see the detailed response from BioID.

{
    "Success": false,
    "State": "GabrielaNotMotion",
    "JobID": "87d4f221-5740-4a54-9cc7-428f61e957f0",
    "Errors": [
        {
            "Code": "LiveDetectionFailed",
            "Message": "The submitted samples do not prove that they are recorded from a live person.",
            "Details": ""
        }
    ],
    "Samples": [
        {
            "Errors": [
                {
                    "Code": "LiveDetectionFailed",
                    "Message": "The sample has been discarded as it cannot be proven that it has been recorded from a live person.",
                    "Details": ""
                }
            ],
            "EyeCenters": {
                "RightEyeX": 611.883,
                "RightEyeY": 858.491,
                "LeftEyeX": 852.521,
                "LeftEyeY": 856.408
            }
        },
        {
            "Errors": [
                {
                    "Code": "IdenticalImages",
                    "Message": "Two identical images have been detected.",
                    "Details": ""
                },
                {
                    "Code": "UnnaturalMotionDetected",
                    "Message": "The 3D detector observed some unnatural motion.",
                    "Details": ""
                }
            ],
            "EyeCenters": {
                "RightEyeX": 611.883,
                "RightEyeY": 858.491,
                "LeftEyeX": 852.521,
                "LeftEyeY": 856.408
            }
        }
    ]
}

The error LiveDetectionFailed clearly explains what went wrong.

The submitted samples do not prove that they are recorded from a live person.

Let’s try another example, this time with one face wearing glasses and the same face without glasses. It turns out that the liveness check passed.

Another example with the face near the camera and then farther away.

This time, the liveness check failed as expected with the error LiveDetectionFailed and the message.

The submitted samples do not prove that they are recorded from a live person.

Let’s now try using images of two different people.

And as expected, the liveness check failed.
Let’s try a liveness check with my selfies, slightly moved during nodding. The result is successful.

OK, we already have some examples of the live detection API. Let’s now move on to the PhotoVerify API.
First, let’s try an example with just an ID photo and a selfie, without liveness detection.

Since BWS version 2.7 the second live image (liveimage2) is optional. IfIt is important to note that the AccuracyLevel is 5, which is the highest possible score.

https://developer.bioid.com/classicbws/bwsreference/webapi/photoverify

The result is successful. Let’s check the full response.

{
    "Success": true,
    "State": "KonradPhotoVerify",
    "JobID": "2dbe90ba-97c0-485a-97f2-c0fc23d938cc",
    "AccuracyLevel": 5,
    "Samples": [
        {
            "Errors": [],
            "EyeCenters": {
                "RightEyeX": 609.171,
                "RightEyeY": 899.358,
                "LeftEyeX": 851.42,
                "LeftEyeY": 919.788
            }
        }
    ]
}

It is important to note that the AccuracyLevel is 5, which is the highest possible score.

AccuracyLevel – The actual level of accuracy (1 – 5) the specified photo would comply with; 0 if the photo is to be rejected anyway.

https://developer.bioid.com/classicbws/bwsreference/webapi/photoverify

Let’s now try PhotoVerify together with liveness detection, so three photos are sent to BioID.

As expected, the result is successful. Let’s check the full response.

{
    "Success": true,
    "State": "KonradPhotoVerifyWithLiveness",
    "JobID": "9739a176-6960-459d-a05b-7f9ad37d3cbf",
    "AccuracyLevel": 5,
    "Samples": [
        {
            "Errors": [],
            "EyeCenters": {
                "RightEyeX": 609.171,
                "RightEyeY": 899.358,
                "LeftEyeX": 851.42,
                "LeftEyeY": 919.788
            }
        },
        {
            "Errors": [],
            "EyeCenters": {
                "RightEyeX": 610.09,
                "RightEyeY": 866.504,
                "LeftEyeX": 840.859,
                "LeftEyeY": 881.373
            }
        }
    ]
}

AccuracyLevel is again 5. Let’s now try the PhotoVerify API with my ID photo and Julia’s selfies.

This time, the result is false as expected. Let’s see the JSON response.

{
    "Success": false,
    "State": "KonradAndJulia",
    "JobID": "ebff4260-9484-4740-99ea-bf77276dc677",
    "AccuracyLevel": 0,
    "Samples": [
        {
            "Errors": [],
            "EyeCenters": {
                "RightEyeX": 919.95,
                "RightEyeY": 995.887,
                "LeftEyeX": 1391.639,
                "LeftEyeY": 1001.923
            }
        },
        {
            "Errors": [],
            "EyeCenters": {
                "RightEyeX": 940.861,
                "RightEyeY": 847.983,
                "LeftEyeX": 1409.804,
                "LeftEyeY": 862.07
            }
        }
    ]
}

This time, the AccuracyLevel score is 0, the lowest possible, as Julia and I are different persons. Let’s also check my ID photo with two identical live photos.

And the full response

{
    "Success": false,
    "State": "KonradLivenessFail",
    "JobID": "c94cab3c-1c95-47a4-993d-e4db7ed8a4f4",
    "AccuracyLevel": 0,
    "Errors": [
        {
            "Code": "LiveDetectionFailed",
            "Message": "The submitted samples do not prove that they are recorded from a live person.",
            "Details": ""
        }
    ],
    "Samples": [
        {
            "Errors": [
                {
                    "Code": "LiveDetectionFailed",
                    "Message": "The sample has been discarded as it cannot be proven that it has been recorded from a live person.",
                    "Details": ""
                }
            ],
            "EyeCenters": {
                "RightEyeX": 609.171,
                "RightEyeY": 899.358,
                "LeftEyeX": 851.42,
                "LeftEyeY": 919.788
            }
        },
        {
            "Errors": [
                {
                    "Code": "IdenticalImages",
                    "Message": "Two identical images have been detected.",
                    "Details": ""
                },
                {
                    "Code": "UnnaturalMotionDetected",
                    "Message": "The 3D detector observed some unnatural motion.",
                    "Details": ""
                }
            ],
            "EyeCenters": {
                "RightEyeX": 609.171,
                "RightEyeY": 899.358,
                "LeftEyeX": 851.42,
                "LeftEyeY": 919.788
            }
        }
    ]
}

We have an unsuccessful response with the errors LiveDetectionFailed, IdenticalImages, and UnnaturalMotionDetected, along with explanatory messages.

  • The sample has been discarded as it cannot be proven that it has been recorded from a live person.
  • Two identical images have been detected.
  • The 3D detector observed some unnatural motion.

Let’s now try the VideoLiveDetection API, which performs liveness detection on the attached video. The first example is a video of myself turning my head left and right – it is the second video for deepfake detection on BioID’s playground at the top of this blog post.

video
play-sharp-fill

I have prepared the request in Postman using the multipart/form-data content type.

The raw response is:

{
    "Success": true,
    "State": "VideoLeftRight",
    "JobID": "69751a44-6ec0-4735-8082-dece65a6655d",
    "FailedToAcquire": false
}

The Success flag is set to true, so the video of myself passed the liveness detection check. Unfortunately, there is nothing like an AccuracyLevel or any other kind of score, just a binary decision: true or false.
Let’s now check BioID’s dashboard. Similar to the other APIs, there is a nice display of the VideoLiveDetection HTTP call.

BioID extracted 7 frames from the video.

So, that’s all the tests of BioID. In some upcoming post, we will check whether BioID can detect light fakes.

Leave a Comment