DEV Community

Nexariza
Nexariza

Posted on

Building a Production Face Recognition System on Embedded Linux: SCRFD + AdaFace + Wiegand + ONNX

TL;DR: We deployed a real-time 1:1 face verification system on an
industrial Linux PC for a Dubai client. SCRFD + AdaFace + ONNX Runtime

  • Wiegand 48-bit + ONVIF + GPIO. Full offline. Here's the complete breakdown.

How We Built a Production-Grade Facial Recognition Security System for a Dubai Client — On Embedded Linux Hardware

Category: Computer Vision · Edge AI · Security
Client Location: Dubai, UAE
Industry: Physical Security & Access Control
Tech Stack: SCRFD · AdaFace · ONNX Runtime · ONVIF · Python · Linux
Project Value: $500 (Collaborative Integration Scope)
Timeline: 30 Days
Status: ✅ Delivered & Deployed

The Problem

A Dubai-based security operator needed a high-accuracy, real-time facial recognition system deployed on an industrial embedded Linux PC — the Q-BOX-E10 (Intel 12th/13th Gen, Ubuntu Linux).

The system had to:

Authenticate employees in real-time via IP camera feed
Match against a database of 20,000+ enrolled faces
Integrate with Wiegand 48-bit physical access control hardware (D0/D1/GND)
Trigger GPIO alarm outputs based on match/no-match results
Operate fully offline and on-premise — no cloud dependency, no latency

The client had already found solutions on Fiverr under $500 that were generic GitHub demos — none of them handled the full embedded stack: ONVIF camera integration, Wiegand protocol, GPIO triggering, and Linux deployment in a single production system.

Why This Was Hard

Most developers can write a face recognition script. Very few can:

Deploy it on industrial embedded Linux with real hardware
Read Wiegand 48-bit protocol from physical access control readers
Integrate with ONVIF/RTSP IP cameras on-device
Handle 20,000-face database with fast 1:1 verification
Trigger real-world GPIO outputs (door locks, alarm relays)
Make the whole system run as a stable Linux daemon that restarts automatically

That's the gap Nexariza AI filled.

Our Architecture

We chose a 1:1 verification architecture (not 1:N identification) — the client provides an Employee ID via Wiegand input, the system fetches that specific face from the database, then verifies the person seen by the camera against that one face only.

This design choice was critical: it made the system dramatically faster and more accurate than generic face recognition, because we're not searching 20,000 faces — we're verifying one.

[Wiegand Reader]
↓ Employee ID (48-bit)
[Linux Application]
↓ Fetch enrolled face from SQLite DB
[ONVIF/RTSP Camera Stream]
↓ Live frame capture
[SCRFD Face Detector]
↓ Bounding box + landmarks
[AdaFace Recognition Engine]
↓ 512-dim face embedding
[1:1 Cosine Similarity Match]
↓ Match / No-Match
[GPIO Output Trigger]
→ CLEAR (door unlock) or ALARM (access denied)
Tech Stack — Why Each Component Was Chosen
Component Technology Why
Face Detection SCRFD State-of-art accuracy on edge hardware, works in low-light
Face Recognition AdaFace Top-ranked on IJB-C benchmark, adaptive margin for challenging conditions
Runtime ONNX Runtime Hardware-agnostic, optimized for Intel CPU inference, no GPU needed
Camera ONVIF/RTSP Industry-standard IP camera protocol, works with any manufacturer
Hardware Protocol Wiegand 48-bit Standard access control protocol for all commercial readers
Database SQLite Lightweight, offline, zero-dependency, handles 20K+ records fast
OS Ubuntu Linux Stable embedded Linux for industrial deployment
Deployment Linux Daemon/Service Auto-restart, runs on boot, no manual intervention needed
Project Phases & Delivery
Phase 1 — Environment Setup ($100)
Ubuntu Linux setup on Q-BOX-E10 industrial PC
Python environment, dependencies, ONNX Runtime installation
SCRFD + AdaFace model download and integration initialization
Remote development environment via SSH
Phase 2 — Camera Integration ($150)
ONVIF/RTSP IP camera connectivity established on embedded Linux
Stable live video feed pipeline
Frame capture and stream stability handling
Camera reconnect logic for production reliability
Phase 3 — FR Pipeline + Face Database ($150)
Face database structure and enrollment workflow (20,000 records)
SCRFD detection → AdaFace embedding → 1:1 cosine verification pipeline
Wiegand 48-bit reader integration (D0/D1/GND)
Counter logic and timer-based verification window
GPIO output triggers (CLEAR_OUTPUT, ALARM_1, ALARM_2)
Phase 4 — Deployment & Testing ($100)
Full system integration testing on real hardware
Edge case handling (multiple faces, no face, low-light)
Linux daemon deployment (auto-start on boot)
Final debugging, optimization, and handover
The Result

A fully deployed, production-grade embedded AI security system running on industrial Linux hardware in Dubai — with:

✅ Real-time 1:1 face verification at camera feed speed
✅ 20,000+ face database with sub-second lookup
✅ Wiegand 48-bit hardware integration working reliably
✅ GPIO alarm outputs triggering correctly on match/no-match
✅ ONVIF IP camera stream stable and reconnecting automatically
✅ System running as Linux daemon — boots automatically, zero manual intervention
✅ Full offline operation — no cloud dependency, no latency, no privacy risk
✅ Remote SSH management capability for future updates
What Made This Different From a Fiverr $50 Script

The client had explored cheap options before contacting us. Here's what those options couldn't deliver:

Capability Cheap Freelancer Nexariza AI
Wiegand 48-bit integration ❌ ✅
ONVIF IP camera on embedded Linux ❌ ✅
Industrial Linux daemon deployment ❌ ✅
20,000-face database architecture ❌ ✅
GPIO hardware triggering ❌ ✅
Production stability + auto-restart ❌ ✅
Remote SSH management ❌ ✅
Lessons for Businesses Building Embedded AI Security
1:1 verification beats 1:N identification for access control — faster, more accurate, simpler to audit
ONNX Runtime is the right choice for Intel-based edge hardware — no GPU required, optimized inference
AdaFace > ArcFace for challenging real-world conditions (varying lighting, angles, partial occlusion)
Linux daemons are essential for production embedded systems — they survive reboots and network drops
Offline-first architecture is non-negotiable for physical security — cloud dependency is a liability
Want a Similar System?

Nexariza AI builds production-grade embedded AI systems for security, industrial, healthcare, and agricultural applications.

We've delivered 60+ production AI systems across the US, UAE, UK, and Europe — from computer vision pipelines on NVIDIA Jetson Orin to multi-camera surveillance platforms with real-time alerting.

Start with a free discovery call:
📧 contact@nexariza.com
🌐 nexariza.com/contact
💼 Upwork: upwork.com/freelancers/~013900a3c3552a40a6
⭐ Fiverr: fiverr.com/s/dDmlq9G

Keywords: facial recognition embedded linux, edge AI security system, SCRFD AdaFace ONNX, Wiegand integration Python, ONVIF camera Python Linux, face recognition access control, industrial AI deployment, Nexariza AI, computer vision Pakistan, embedded AI engineer

Top comments (0)