Local Face Recognition: Privacy and Security Together
Most commercial face recognition systems transmit facial images to vendor cloud servers — a significant privacy risk. A local face recognition system processes all biometric data on-premises with zero external data transmission.
Hardware: NVIDIA Jetson Nano 4GB
The Jetson Nano 4GB (3,500–4,500 THB used in Thailand) runs CUDA 10.2 + TensorRT for face detection and recognition at 10–15 FPS. Alternatives include Raspberry Pi 5 + Hailo-8 AI Hat for newer deployments.
InsightFace: The Library
InsightFace provides face detection (SCRFD, 30+ FPS on Jetson), face recognition (ArcFace 512-dimensional embeddings), and anti-spoofing (MiniFASNet). All models run locally via ONNX Runtime with CUDA acceleration.
Enrollment
Capture 10–20 images per person at varying angles and lighting. ArcFace embeddings are averaged into a single representative vector stored in the local face database. Only the embedding (512 floats) is stored — not the original image — making reconstruction impossible.
Anti-Spoofing with MiniFASNet
MiniFASNet scores each detected face for liveness: scores >0.6 indicate a live person; <0.4 indicate a photograph or screen spoof. Accuracy: 96.8% true positive for live faces, 98.1% true negative for spoofs.
Home Assistant Integration
The recognition script publishes results to MQTT. Home Assistant listens and triggers the electric gate relay (5-second pulse) upon RECOGNIZED payload. Unknown faces trigger Frigate snapshot + LINE notification to the homeowner.
Performance Benchmarks
Recognition accuracy for enrolled faces: 99.2% (at 20 training images/person). False acceptance rate: <0.1% at cosine distance threshold 0.4. Liveness detection: 96.8%. End-to-end latency: 80–120 ms on Jetson Nano GPU.
PDPA Compliance
Face embeddings (not images) are stored for enrolled residents. Visitor logs purge after 30 days. Signage at the camera location notifies visitors of biometric processing per Thailand PDPA requirements.
