I recently went down a rabbit hole after hearing how a major bank’s ATM face scanners were defeated by a literal piece of printer paper. It’s a classic example of what happens when we build for the "happy path" instead of the real world. If you’re building biometrics for something like employee clock-ins or secure access, you can’t just rely on a basic detection demo—you need a pipeline that actually knows the difference between a human and a photo.
This article walks through building a cross-platform, offline-first face recognition system that handles everything from the initial camera frame to the final identity match.
- Runs lightweight AI models locally via ONNX, making it fast enough for mobile devices and tablets.
- Filters out noise by requiring a minimum detection confidence score of 0.7.
- Cleans up overlapping boxes using Non-Maximum Suppression (NMS) at a 0.4 IoU threshold.
- Implements a dedicated anti-spoofing layer using a 112x112 face crop and a 2-class softmax model.
- Requires a spoof score of 0.1 or lower to ensure the subject is a live person, not a printout or screen.
- Generates 128-dimensional face signatures (embeddings) using FaceNet for high-precision matching.
- Uses HNSW indexing to search through thousands of stored faces in under 1ms.
- Built with .NET MAUI to share the same processing logic across Android, Windows, and cloud environments.
The hard truth is that if your biometric system can be tricked by a $20 desk printer, your entire security model is just theater.
Read the full article here:
https://erwinwilsonceniza.qzz.io/blogs/engineering-a-cross-platform-face-recognition-pipeline-with-anti-spoofing
Top comments (0)