Building a Face Matching System for Identity Verification

In digital lending, verifying customer identity is a critical step. A common requirement is ensuring that the selfie a customer takes during onboarding matches their government-issued ID (like Aadhaar). But before we could even compare faces, we faced a different challenge: making sure the selfie captured at the frontend was of good enough quality for verification.

Customers often clicked pictures that were blurry, poorly lit, tilted, or with their face partially covered. These issues led to false mismatches and frustrated both the customer and the system.

First Challenge: Capturing a Good Selfie

The face matching algorithm is only as good as the input photo. So instead of running expensive corrections later, we decided to guide customers while they were taking their selfies.

To achieve this, we:

These checks ran directly in the frontend, so customers received real-time guidance like “Move closer to the camera”, “Open your eyes”, or “Adjust your face straight”. Only when all checks were passed did we allow the user to capture the picture.

Face Matching

Once a proper selfie was captured, it was sent to the backend for face matching against the Aadhaar photo. The matching itself used a CNN-based face embedding approach, which handled variations in lighting and minor angles while still being strict enough to prevent impersonation.

Tech Stack

Key Learnings

Conclusion

By combining real-time selfie guidance with face matching, we built a system that not only verifies customer identity but also ensures a smooth onboarding experience.