ScanDoc
← All articles

Product

Face Matching for ID, Passport and Driver's Licence Verification

A live selfie compared with the portrait on an ID card by face matching software, with the result Same person

Checking that an ID document is genuine is only half of identity verification. The other half is making sure the person using it is the person in the photo. At a hotel desk or a bank branch, a member of staff glances from the card to the face. Online, that job falls to face matching software, which compares a live selfie with the portrait on the passport, ID card or driving licence. It sounds simple, and with modern algorithms it is usually fast and accurate. But matching a selfie against an ID photo has its own challenges, from holograms printed over the portrait to photos taken a decade ago, and it's a favourite target for fraudsters. This guide explains how face matching for ID documents works, what makes it difficult, how accurate it is, how it's attacked and defended, and what to look for in a solution. If you're new to the topic, our general guide to face recognition software explains the difference between verifying one person (1:1) and searching a database (1:N). Everything in this article is about 1:1 verification: is this person the owner of this document?

How selfie-to-ID face matching works

The process starts with two images. The first is a live selfie taken by the user during verification. Before it's used, liveness detection checks that it comes from a real, present person rather than a printed photo, a screen or a mask. The second is the portrait from the identity document, either cropped from the photo of the printed page captured by ID and Passport Scan, or read digitally from the document's chip through NFC.

Software then finds the face in each image, aligns it and corrects for differences in size and angle. A neural network turns each face into a face template: a compact mathematical description of its features. The two templates are compared to produce a similarity score, and that score is checked against a threshold. Above the threshold, it's a match. Below it, it isn't. Many systems also define a grey zone in between, where the case goes to a person for review rather than being decided automatically.

The whole process typically takes a second or two. What makes the difference between a good and a poor result is mostly what happens before the comparison: the quality of the two images and how well the software handles the quirks of identity documents.

Face matching pipeline: a live selfie checked for liveness and the document portrait from the printed page or chip are each turned into a face template, compared into a similarity score, and checked against a threshold to give match, no match or review

Why ID photos are hard to match

A selfie is a large, sharp colour image of a face taken seconds ago. A document portrait is often none of those things.

The photo is small

A passport portrait is only a few centimetres across, and ID cards and driving licences are smaller still. Captured through a phone camera, the face may be just a few hundred pixels wide.

Security features cover the face

To stop photo substitution, issuers deliberately print holograms, fine line patterns, microtext and seals across the portrait. These protect the document, but they also add patterns that face matching has to see past. Many modern documents also use laser-engraved greyscale portraits, which look quite different from a colour selfie.

Glare and reflections

Holographic laminates reflect light, so a photo taken under a desk lamp or near a window can have a bright patch across the face. Good capture software detects this and asks the user to tilt the document.

Time has passed

Adult passports are typically valid for ten years, and driving licences in some countries for longer. Faces change with age, weight, facial hair and glasses, and children's faces change dramatically. NIST's evaluations of face recognition algorithms show that false non-match rates rise as the time between two photos grows, and its earlier testing traced many of the remaining errors to ageing over long periods, facial injuries and poor-quality images.

Expression and pose

Document photos are taken with a neutral expression, looking straight at the camera. Selfies vary. Good selfie capture guides users to a similar pose and lighting.

Passports, ID cards and driving licences compared

Passports

Passports follow ICAO standards for portrait size, background and pose, which makes them relatively consistent across countries. Almost all modern passports also have a chip containing a digital copy of the portrait.

National ID cards

National ID cards in Europe also follow ICAO-based standards, and new EU ID cards include a contactless chip storing the holder's facial image. The printed portrait is smaller than a passport's and often laser-engraved in greyscale.

Driving licences

Driving licences are the most varied. They don't use the ICAO chip standard, photo quality varies widely between countries and states, and licences are often renewed less frequently, so the photo may be older. We cover these differences in our guide to driving licence scanning. Face matching against licences works well with good capture, but expect more cases to need review than with passports.

The chip photo advantage

When a document has a chip, it's almost always better to match against the chip photo than the printed one. The chip portrait is a clean digital image with no holograms, glare or print artefacts, and it's digitally signed by the issuing country, so you know it's the photo the government issued. That also defeats one of the oldest frauds: replacing the printed photo on a genuine document. If the printed portrait has been swapped, it won't match the chip. We explain how chip reading works in our guide to NFC in identity verification.

How accurate is face matching?

Face matching accuracy is measured with two error rates. The false match rate (FMR) is how often two different people are wrongly accepted as the same person. The false non-match rate (FNMR) is how often the same person is wrongly rejected. The threshold controls the balance between them: raise it and fewer impostors get through, but more genuine customers are rejected; lower it and the opposite happens. For identity verification, businesses usually set a strict threshold to keep false matches very low, and rely on good image capture and a review queue to keep genuine customers moving.

The best modern algorithms are extremely accurate on good-quality images. The independent benchmark is NIST's Face Recognition Technology Evaluation (FRTE) 1:1, where developers submit algorithms for testing on large datasets. NIST's work has also examined accuracy across demographic groups. Its study of demographic effects found that differences between groups were mainly in false matches rather than false non-matches, and that they appeared in many algorithms, though not all. The variation between algorithms is the key point: the best-performing ones show much smaller differences than the weakest. When choosing a provider, ask how their algorithm performs in independent testing and across demographic groups, and test it on images that reflect your own customers.

How fraudsters attack face matching, and how it's defended

Photo substitution

Replacing the portrait on a genuine document with the fraudster's own. Defences include checking the document for signs of tampering, comparing the main portrait with the smaller ghost image many documents print elsewhere, and, best of all, comparing against the chip photo.

Look-alikes and borrowed IDs

Using a genuine document belonging to someone who looks similar, such as a sibling or a stranger with similar features. A strict threshold and a good algorithm are the main defence.

Morphing attacks

A sophisticated attack where two people's faces are digitally blended into one passport photo, so that both can match it. The document is genuinely issued, so the chip check passes. Defences include morph detection on the document portrait and, at issuance, live photo capture by authorities. It's an active research area, with NIST running a dedicated evaluation of morph detection.

Presentation attacks

Holding a photo, a video on a screen or a mask up to the camera instead of a live face. This is what liveness detection is designed to stop.

Injection and deepfakes

Feeding a deepfake video or a synthetic face directly into the app, bypassing the camera. Defending against this requires injection attack detection alongside liveness. We cover both in depth in our guide to anti-spoofing in face recognition, and the wider fraud picture in how ID scanning prevents fraud.

Privacy and GDPR

Face templates are biometric data, which GDPR treats as a special category of personal data. Using them to verify someone's identity requires a valid legal basis, typically the user's explicit consent or, in some regulated sectors, a specific legal obligation. Explain clearly why you're asking for a selfie, what happens to it and how long it's kept. Process it securely, keep images and templates only as long as you need them, and don't reuse them for other purposes. Because 1:1 matching only compares a user against their own document, it doesn't need a central database of faces, which makes it far less intrusive than 1:N identification. The EU's AI Act also treats this kind of biometric verification, confirming that a person is who they claim to be, differently from riskier uses such as remote identification in public spaces.

Where face matching for ID documents is used

Banks and fintechs use it in remote account opening and KYC verification, as part of digital customer onboarding. ScanDoc for banks shows how facial verification fits regulated customer checks. Hotels use it for contactless and late-night check-in, as described in our guide to hotel digital check-in.

Car rental companies use it to confirm the renter is the licence holder, and mobility platforms use it to stop account sharing between drivers, as covered in identity verification in ride-sharing. It's also central to age verification, where it stops minors from using a parent's ID.

What to look for in a face matching solution

Look for strong performance in independent testing, including across demographic groups and over long time gaps between photos. Check that the solution is built for identity documents: it should handle small, holographic and greyscale portraits, detect glare and guide users to a good selfie. It should be able to match against the chip photo where one is available, and combine face matching with liveness detection that has been independently tested. Look for configurable thresholds and a review workflow for borderline cases, clear explanations of results, and a straightforward approach to data protection. Our guide to choosing a document data extraction solution covers the wider vendor questions.

How ScanDoc helps

ScanDoc's Face Recognition compares a live selfie with the portrait on the user's passport, ID card or driving licence, captured by ScanDoc's document scanning from documents from more than 190 countries. Active and passive liveness detection confirms the selfie comes from a real, present person, and NFC verification can read the chip in passports and supported ID cards.

Everything runs in one flow through iOS and Android SDKs, web capture and a REST API, documented on our developer portal. See our pricing page for plans.

Request a demo to test face matching with your own documents, or visit the ScanDoc homepage to explore the complete platform.

Frequently asked questions

The user takes a live selfie, which is checked for liveness. Software then compares the selfie with the portrait on their ID document, from the printed page or the chip, by turning each face into a mathematical template and measuring how similar they are. If the similarity is above a set threshold, the faces are considered a match.

The best modern algorithms are highly accurate on good-quality images. Accuracy falls with poor capture, heavy glare and long gaps between when the ID photo and the selfie were taken, which is why good capture guidance and a review process for borderline cases matter.

Yes, in most cases, but accuracy decreases as the time between the two photos grows. Faces change with age, and children's faces change most. Matching against the chip photo and reviewing borderline cases helps.

The chip photo is better when available. It's a clean digital image without holograms or glare, and it's digitally signed by the issuing country, which also exposes printed photos that have been swapped.

A morphing attack blends the faces of two people into one document photo, so that both can match it. Defending against it requires morph detection on the document portrait and secure photo capture when documents are issued.

It can be. Face templates are biometric data, so you need a valid legal basis, usually explicit consent, clear information for users, strong security and limited retention.

Latest articles

Ready to verify in seconds?

Start a free trial or book a walkthrough with our team.