Liveness

While being able to identify a person by performing a search on an image is great, it is not always sufficient as someone could simply use a printed picture of a person to fool the system.

In use cases such as Access Control, Know Your Customer, Customer Onboarding, we also need to check if the image provided to the system is live, i.e. is an actual live person, and not a paper/screen showing their photo.

To facilitate this, we have the liveness API.

As usual, we start by creating a request:

std::string image_path{ “C:\\images\\varun.jpg”);
LivenessRequest liveness_request{ OS::DESKTOP,image_path };

And then we get the response:

LivenessResponse liveness_response = sdk.liveness.check_liveness(liveness_request);
cout<< liveness_response.score;

The image passed in the request should be a high quality image, sufficiently close to the camera.

The returned score represents how confident the system is that this is a real image vs a printed/screen one.