Compare

For customers who do not wish to store information on our server, we also provide the compare API.

Use cases for the compare API (especially when paired with liveness), include Know Your Customer verifications at financial institutions, Customer Onboarding, Id verification etc.

The API compares two sets of face images:

std::string image_path1 {“C:\\images\\varun.jpg” };
std::string image_path2 {“C:\\images\\varun1.jpg” };
std::string image_path3 {“C:\\images\\varun2.jpg” };
CompareRequest compare_request;
compare_request.gallery = { image_path1,image_path2 };
compare_request.probe = { image_path3 };
compare_request.mode = SearchMode::FAST;

The response is a number which is a similarity score between the two sets of images.

double compare_result = sdk.compare.compare_image_sets(compare_request);

The CompareRequest object has two properties gallery and probe each of which is a list of images that are to be compared.