---
title: "Synthetic Passport Dataset for Identity Verification"
description: "Verifying documents at scale required data that cannot legally be collected. We built a pipeline that generated it: realistic, varied, and free of personal data."
url: "https://unidata.pro/cases/synthetic-passport-dataset-for-identity-verification/"
date_modified: "2026-09-02T05:41:52+03:00"
language: "en-US"
---
**The Task**
------------

The objective was to train a system that could verify passport authenticity and detect forged documents across more than 100 countries.

Real data was not an option. Passport images are among the most legally restricted categories of personal data, protected under GDPR and national privacy regulations. Collection and transfer were both closed to us.

The client's earlier approach was manual. Templates were edited in Photoshop, personal fields were masked, and text was inserted from Excel sheets at random. The output looked artificial. It did not reproduce the variability of genuine documents: layouts, fonts, lighting, textures, and physical wear.

The model generalized poorly and produced frequent false positives in verification tasks.

**The Generation Pipeline**
---------------------------

We built the dataset as a sequence of generation stages:

1. Document templates PSD-based layouts for more than 100 countries, covering passports, ID cards, visas, and driver's licenses.
2. Text generation Language models filled the name, number, and issuing authority fields with realistic multilingual entries.
3. Face synthesis GAN-based models produced synthetic portraits, blended into each layout.
4. Physical variation: a) Fonts, seals, and holograms varied per document b) Background noise, glare, and scanning artifacts applied at random
5. Metadata pairing Every image carried structured metadata: gender, document type, country of origin, and background.

Real data was prohibited at every stage. No scanned document, cropped photograph, or field value from a genuine passport entered the pipeline. Every element was generated, including the faces.

Metadata gave the client direct control over dataset composition. The same corpus could then be used for face recognition and anti-spoofing tasks without regenerating it.

**Quality Control**
-------------------

Every generated batch was validated before delivery.

Three parameters were checked:

- Template fidelity Layout, field positions, and typography had to match the reference structure for the country.
- Field consistency Generated values had to stay coherent across the whole document.
- Visual plausibility Artifacts, holograms, and noise had to stay within the range observed in genuine scans.

Consistency mattered more than volume. For example, if a document number appeared both on the data page and in the machine-readable zone, both had to carry the same value. A mismatch teaches the model that a genuine document is a forgery.

Validation at the template level reduced downstream errors. Rather than filtering images after generation, we corrected the source layout and regenerated the batch.

No personally identifiable information entered the pipeline at any stage.

**Challenges**
--------------

The main complexity lay in balancing three dimensions:

- Realism without any trace of real personal data
- Coverage across more than 100 countries without losing per-country accuracy
- Randomness that reproduces wear and scanning artifacts without crossing into visible distortion

Additionally, no two countries share the same document logic. Layout, script, security features, and field order differ, and a template that is correct for one issuing authority is wrong for the next. Instead of generalizing across regions, we built and verified templates country by country and expanded the library incrementally.

This approach allowed us to scale coverage while keeping structural accuracy per document type.

**Stage Overview**
------------------

| Stage | Input | Workflow Scope | Main Quality Checks |
|---|---|---|---|
| Template Design | Reference document structures | PSD layout construction per country | Field positions, typography, security elements |
| Text Generation | Country and document parameters | Model-based field population | Multilingual accuracy, internal consistency |
| Face Synthesis | Generation parameters | Portrait creation and blending | Realism, alignment, no real identities |
| Artifact Simulation | Composed base documents | Font, seal, hologram, and noise variation | Plausible wear, scan-level realism |
| Metadata Assembly | Generated images | Attribute tagging | Completeness, label accuracy |
| Delivery | Validated dataset | Packaging and handover | Privacy compliance, coverage balance |

## Main title

Synthetic Passport Dataset for Identity Verification

## Description

We built a synthetic document generation pipeline to support the training of an identity verification model covering more than 100 countries. Real passport images were unavailable by law. Instead of collecting data, we reproduced it under controlled parameters: templates, text fields, faces, and physical artifacts were generated separately and combined. The result was over 100,000 high-fidelity images containing no personal data.

## Hero

**Industry and use case:** Biometrics & Facial Recognition

## Прогресс - результаты - цитата

### Прогресс - шаги

**Перечень шагов:**

- **Количество дней:** Week 1 — **Описание шага:** Pipeline assembled, first country templates built
- **Количество дней:** Week 2 — **Описание шага:** First batches in client-side testing
- **Количество дней:** Week 4 — **Описание шага:** Coverage past 100 countries, four document types
- **Количество дней:** Within 2 months — **Описание шага:** Over 100,000 images, dataset in production

### Результаты

**Перечень результатов:**

- Over 100,000 synthetic document images generated automatically
- Coverage of more than 100 countries across passports, ID cards, visas, and driver’s licenses
- 27 percent improvement in the client’s identity verification accuracy
- Dataset preparation time reduced from weeks to hours
- Full compliance with privacy regulations, with no personally identifiable data involved
- Datasets reused across subsequent computer vision and KYC projects

### Цитата

**Цитата:** Generated data is data you can dictate: which country, how worn, how badly scanned. Real collection cannot give you that range at this scale, and with passports it gives you nothing at all. The limit is reproducibility: when a task depends on one physical object behaving identically twice, only real collection will do, and we say so before generation starts.

**Автор:** Elizabeth Karnaukhova

**Должность:** Datamarket Project Manager
