BioID and light fakes

In the previous post, I have presented the capabilities of BioID with some happy and unhappy paths. BioID worked pretty well. All the pictures used in those posts represented real people.

According to the documentation, BioID uses advanced algorithms and artificial intelligence to detect deepfakes. BioID Face Liveness Detection protects against spoofing attacks and is also certified by independent laboratories. So, it is definitely powerful technology. Let’s check if it is also resistant to light fakes.

I hijacked my slow-motion nodding video from the BioID playground using simple techniques described in this post. Here is the recording.

video
play-sharp-fill

And again, I uploaded the hijacked video to Vidnoz AI Face Swap along with a photo of Krzysztof extracted from his ID. Here is the Vidnoz output joined with the original video for better visibility.

video
play-sharp-fill

Let’s now inject the generated video with Krzysztof’s nodding into the Chrome browser, open the BioID playground, and try the Liveness Detection, PhotoVerify API, and Deepfake detection. If you’re curious about how the video injection is done, you can read about it here.

video
play-sharp-fill

For PhotoVerify, we achieved success with the highest possible score, LEVEL 5. The file krzysztof_vidnoz_output.mp4 used for deep fake detection is Vidnoz-generated Krzysztof nodding. The file krzysztof_left_right.mp4 is also a video generated by Vidnoz, and it was correctly classified as a fake video by BioID.

video
play-sharp-fill

Ok. So let’s now test the BioID API via Postman using the generated light fakes.
As the first example, let’s try Julia’s selfies and mine from the previous post in the first row. In the second row, there is the output of light fakes generated by Vidnoz AI.

So, let’s try the Live Detection API.

We’ve got a success result. Let’s see the detailed response.

{
    "Success": true,
    "State": "KonradJulia",
    "JobID": "2c893432-3c8d-4924-a754-ad304701fa78",
    "Samples": [
        {
            "Errors": [],
            "EyeCenters": {
                "RightEyeX": 333.466,
                "RightEyeY": 347.148,
                "LeftEyeX": 480.985,
                "LeftEyeY": 352.36
            }
        },
        {
            "Errors": [],
            "EyeCenters": {
                "RightEyeX": 335.939,
                "RightEyeY": 294.599,
                "LeftEyeX": 485.721,
                "LeftEyeY": 297.947
            }
        }
    ]
}

Ok. So let’s now check the PhotoVerify API using the photo face from my ID and the generated light fakes.

As expected, the result is “Success”: false. Well done, BioID! Let’s see the full JSON response.

{
    "Success": false,
    "State": "KonradJuliaPhotoVerify",
    "JobID": "fbc1e7cd-56e2-408f-b1d6-a647f7314a11",
    "AccuracyLevel": 2,
    "Samples": [
        {
            "Errors": [],
            "EyeCenters": {
                "RightEyeX": 333.466,
                "RightEyeY": 347.148,
                "LeftEyeX": 480.985,
                "LeftEyeY": 352.36
            }
        },
        {
            "Errors": [],
            "EyeCenters": {
                "RightEyeX": 335.939,
                "RightEyeY": 294.599,
                "LeftEyeX": 485.721,
                "LeftEyeY": 297.947
            }
        }
    ]
}

The AccuracyLevel has value 2.

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

The actual level of accuracy (1 – 5) the specified photo would comply with; 0 if the photo is to be rejected anyway.
Five accuracy settings are defined from 1 to 5 with accuracy lower or equal to 1 being the worst (with a false acceptance rate of about 0.5%), and greater or equal to 5 being the best (with a false acceptance rate of about 0.001%). The default is 4, with a false acceptance rate of 0.01%.

The default threshold for AccuracyLevel is 4, which is why the result is unsuccessful.

Let’s now try another set of examples, this time with me light faking Krzysztof. The first row represents my two selfies which have already passed the Liveness Check and the photo face from Krzysztof’s ID. In the second row, there are generated light fakes of Krzysztof by Vidnoz AI Tools.

Let’s send the generated selfies to the BioID Live Detection API via Postman.

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

{
    "Success": true,
    "State": "KrzysztofKonrad",
    "JobID": "97790f37-533c-4b9b-a0b0-24a292cde48a",
    "Samples": [
        {
            "Errors": [],
            "EyeCenters": {
                "RightEyeX": 346.269,
                "RightEyeY": 506.929,
                "LeftEyeX": 480.031,
                "LeftEyeY": 518.825
            }
        },
        {
            "Errors": [],
            "EyeCenters": {
                "RightEyeX": 343.358,
                "RightEyeY": 488.688,
                "LeftEyeX": 473.159,
                "LeftEyeY": 496.761
            }
        }
    ]
}

Ok. Let’s make another attempt, this time with the PhotoVerify API.

Again, the result is successful with the highest possible score.

{
    "Success": true,
    "State": "KrzysztofKonradPhotoVerify",
    "JobID": "f4801361-7bd8-4ce9-8b2a-157a5afbac80",
    "AccuracyLevel": 5,
    "Samples": [
        {
            "Errors": [],
            "EyeCenters": {
                "RightEyeX": 346.269,
                "RightEyeY": 506.929,
                "LeftEyeX": 480.031,
                "LeftEyeY": 518.825
            }
        },
        {
            "Errors": [],
            "EyeCenters": {
                "RightEyeX": 343.358,
                "RightEyeY": 488.688,
                "LeftEyeX": 473.159,
                "LeftEyeY": 496.761
            }
        }
    ]
}

Ok. Let’s now check the VideoLiveDetection API. The first example uses Krzysztof’s generated slow-motion nodding from the top of this blog post. This example was also used in the BioID playground tests.

The result is successful and the full raw response is:

{
    "Success": true,
    "State": "KrzysztofNodding",
    "JobID": "ed671b97-a9cf-4d8f-8d6e-c6e61422e171",
    "FailedToAcquire": false
}

The second example, also used in the BioID playground from the top of this post, features Krzysztof moving his head left and right.

The light fake was discovered, and the result is “Success”: false, as expected. Well done, BioID!

{
    "Success": false,
    "State": "KrzysztofLeftRight",
    "JobID": "4a0207b3-86f1-4689-88b5-38a271c9d8c1",
    "FailedToAcquire": false
}

Let’s now try the left and right video used in one of the previous posts Onfido and light fakes.

video
play-sharp-fill

The result is successful.

{
    "Success": true,
    "State": "KrzysztofOnfidoShirt",
    "JobID": "86cdc623-fc64-4cf0-86d1-a23fb903d48b",
    "FailedToAcquire": false
}

And now the very last example, also from the Onfido and light fakes post.

video
play-sharp-fill

This time, BioID correctly discovered that the video was not recorded from a live person. Well done, BioID!

{
    "Success": false,
    "State": "KrzysztofOnfidoGreen",
    "JobID": "efb68950-4c0f-4c10-a7b8-58a6c25493f4",
    "FailedToAcquire": false
}

Leave a Comment