Creating a Test ID#
The onboarding flow needs a two-sided ID document: a front side with your face and a back side with a PDF417 barcode whose data matches the front. Because the final step compares the face on the document with your live webcam capture, the document must contain a photo of your face.
This blueprint therefore ships a small generator that creates a test ID card from a portrait photo of yourself, in one command.
Important: The generated card carries sample data only. It is intended for testing this service only. Do not use it for any other purpose or in production environments.
Quick start#
Take (or pick) a well-lit, front-facing portrait photo of yourself, e.g.
me.jpg.Clone the Solution Blueprints repository and change into this blueprint’s directory:
git clone https://github.com/amd-enterprise-ai/solution-blueprints.git cd solution-blueprints/solution-blueprints/fintech-kyc-onboarding
Run the generator (requires uv):
uv run --with-requirements tools/requirements.txt tools/create-test-id.py --photo /path/to/me.jpg
This writes
test-id-front.pngandtest-id-back.pngto the current directory.In the onboarding UI, complete the liveness check with your webcam, then upload
test-id-front.pngas the front side andtest-id-back.pngas the back side.
Optional overrides (all data is sample data by default):
uv run --with-requirements tools/requirements.txt tools/create-test-id.py --photo /path/to/me.jpg \
--first JAMIE --last SAMPLE --dob 03/15/1990 --sex M --out-dir /tmp
What the generated card looks like#
These reference images were generated without --photo, so the photo box holds a placeholder
silhouette:


How it works#
The front side is rendered with field labels the blueprint’s OCR understands (
LN,FN,DOB,SEX), and your photo is placed in the photo box as input to face detection (YuNet) and embedding (SFace).The back side carries a PDF417 barcode (generated locally with
pdf417gen— no data is sent externally) whose payload matches the front-side data in the field format the blueprint’s barcode parser reads.Dates are printed and parsed in MM/DD/YYYY format.