# How facial recognition technology keeps you safe

[Grab](https://yomu.fyi/company/grab) · Kai Feng Tee · Jun 9, 2022

**Type:** Explainer

## Summary

Grab utilizes facial recognition technology across its platform for driver authentication, passenger verification, and digital electronic Know Your Customer (e-KYC) processes. The core pipeline consists of image preprocessing through face detection and alignment, anti-spoofing checks, feature extraction into high-dimensional vector embeddings, and downstream verification or search. To counter spoof attacks like screen replays, synthetic moiré patterns are generated and cropped face patches are used during training and inference to focus on local structures rather than global semantic noise. Face verification challenges involving shallow ID datasets and masked faces are resolved using semi-Siamese training architectures and masked data augmentations.

## Context

Verifying user and partner identities for ride safety, crime deterrence, and regulatory e-KYC compliance while handling challenges like spoofing, shallow datasets, and masked faces.

## Approach / What changed

Grab built a multi-stage facial recognition pipeline that pairs patch-based anti-spoofing models trained on synthetic moiré patterns with semi-Siamese neural network architectures and masked image augmentation for robust feature extraction and verification.

## Takeaways

- Splitting cropped face images into evenly distributed patches forces anti-spoofing models to learn subtle local features, such as moiré patterns, instead of global semantic biases.
- Semi-Siamese training mitigates model collapse on shallow datasets (many identities with few samples) by using non-identical backbone subnetworks to increase intra-class diversity.
- Incorporating masked selfies into training sets allows verification without mask removal while functioning as data augmentation that improves overall unmasked verification accuracy.

**Tags:** [Architecture](https://yomu.fyi/topic/architecture), [Authentication](https://yomu.fyi/topic/authentication), [Machine Learning](https://yomu.fyi/topic/machine-learning), [Privacy](https://yomu.fyi/topic/privacy), [Search](https://yomu.fyi/topic/search)

[Read original post](https://engineering.grab.com/facial-recognition)
