Compare 1:1
Service for Comparing Two Images.
This service helps you compare a single selfie (called the "probe") with a collection of selfies (called the "gallery") to verify identities and perform a liveness detection to the probe image. It’s perfect for controlling access to your app or completing Know Your Customer (KYC) checks securely.
Let’s break it down step by step!
Endpoint
The Face Comparison API allows you to perform a 1:1 comparison to find facial similarity. It offers the ability to analyze and score the resemblance between two images, which can be images from a document or camera images, as long as they differ between the "gallery" and "probe" parameters.
Ensure you provide valid images encoded in base64 in the request and choose the appropriate search mode for your specific needs (FAST or ACCURATE). The response will contain essential information about the comparison work, including timestamps and certification details.
Compare 1:1 Vs Face verify
If you have read all the guides in this documentation, you may have noticed that these services perform very similar processes, so what sets them apart?
The differentiating factor between these services is how the comparison process is performed:
Face Verify: Performs the comparison between an image and a person already created within a collection.
Compare 1:1: Performs the comparison between two images. Unlike Face Verify, there is no restriction on where these images come from, making this service more versatile in how it performs the 1:1 comparison.
Compare 1:1 Live: Same operation as the Compare 1:1 service, with the added value of conducting a Liveness check on one of the supplied images.
Best Practices
Security: Keep your API token safe and use HTTPS.
Image Quality: Use clear, well-lit selfies for best results.
Testing: Test with different devices (iOS, Android) and gallery sizes.
Thresholds: Start with default min_score values, then tweak based on false positives/negatives.
Examples
Troubleshooting
No Match?
Check image quality or try ACCURATE mode.
Ensure gallery contains the right faces.
Errors?
Verify your token and base64 encoding.
What You Need
A selfie to compare (probe).
A set of selfies to compare against (gallery).
An API token (get this from Verifik’s dashboard or from the Authentication APIs).
Ready to integrate?
Follow the code example, test with your selfies, and adjust scores to fit your app’s needs.
Headers
Content-Type
application/json
Authorization
Bearer <token>
Body
os
string
OS from where you are doing the operation. [DESKTOP, IOS, ANDROID]
probe
string
Face encoded in base64
gallery
Array
Array of images to compare with the face inside probe.
search_mode
string
search mode, it could be FAST, ACCURATE.