Checking the face against the pass, not against everyone.
We didn't train a face-recognition network. The kiosk uses face_recognition, a library built on dlib's pretrained model, which turns a face into 128 numbers so that two photos of the same person end up close together.
Each attendee was enrolled from one reference photo, which I expanded into ten varied copies to give the matcher more examples. At the kiosk, the camera's face is compared with the enrolled faces, and it only counts when the closest match is the person registered to the scanned pass. Five matching frames admit the guest; if they don't arrive within about ten seconds, the kiosk sends the guest to staff.
Illustration of the real pipeline. Silhouettes and numbers are made up.
One reference photo per attendee.
Rotated, shifted, scaled, mirrored, brightened or blurred at random.
A pretrained model turns each face into an encoding. Nothing is trained here.
- Pass holder
- 0.41 ≤ 0.512 · match
- Someone else
- 0.68 > 0.512 · no
Closer than 0.512, and it must be the person on the pass.
5 matching frames admit the guest. This reduces one-off false matches; it is not a liveness or anti-spoofing check.
How the matching works
Pretrained embeddings
face_recognition (dlib) produces a 128-dimensional encoding per face. No model was trained or fine-tuned for this project.
Enrolment augmentation
Each reference photo becomes ten variants with small random rotation, shift, scale, mirroring, brightness change and blur, and each variant is encoded. Faces that can't be detected are skipped.
Live detection
Faces are detected on a quarter-size copy of the cropped camera frame for speed, then encoded at full size.
Distance threshold
A face matches when its Euclidean distance to the nearest enrolled encoding is at most 0.512, stricter than the library's usual 0.6. I started at 0.6 and tightened it so that unknown people were reported as unknown instead of as the nearest known person.
Claimed identity
A match only counts if it is the attendee the server returned for that pass, so resembling some other guest doesn't help.
Five frames, ten seconds
An early version accepted after two matching frames; the final kiosk needs five, with a prompt to move closer at five seconds and a timeout at about ten.
What it isn't
Five-frame confirmation reduces one-off false matches. It is not liveness or anti-spoofing detection, and accuracy was never formally measured.