Tired of Google Nest spamming you every time a neighbor or your partner walks past the camera?
Commercial cameras (like Nest) detect people, but they don’t give you a local, lightweight way to filter out known faces without forcing you to pay extra cloud subscriptions or buy expensive hardware.
I built ha-nest-smart-face-filter: an ultra-lightweight, event-driven face recognition pipeline designed specifically for Home Assistant.
Why this instead of Frigate / CompreFace?
Solutions like Frigate, Double Take, or CompreFace are amazing, but they often require dedicated GPUs, Coral TPUs, or 2–3 GB of RAM running 24/7. If you’re on a modest Mini PC or Raspberry Pi, running full continuous NVR processing just for a hallway camera is overkill.
- Event-Driven: No 24/7 video streaming. It wakes up only when Nest/HA triggers a
person_detectedevent. - Potato-Hardware Friendly: Runs on CPU using InsightFace with ONNX Runtime.
- Ultra Low Resource: Uses <200MB RAM and takes ~150–200ms of CPU time per snapshot.
- Privacy-First: Converts faces into 512-dimension mathematical embeddings (
.npyfiles) stored locally on your server. No original face photos are kept.
How It Works
- Nest sends a
person_detectedevent via Google Access Console Pub/Sub to Home Assistant. - HA triggers a
camera.snapshotand calls a lightweight Python script. - The script compares the face embedding in RAM against saved local embeddings (
.npy). - If it’s a known face (neighbor, family), it does nothing.
- If it’s an unknown face, HA fires a mobile push notification with the photo attached.
Quick Setup & Usage
- Install Python Dependencies:
Bashpip install insightface onnxruntime opencv-python-headless numpy requests - Register Known Faces: Run the included
create_embeddings.pyhelper to convert clean face photos of your family/neighbors into local.npyvector files under/config/face_recognition/embeddings/. - Automate in HA: Add a simple YAML automation that takes a snapshot on motion and runs
analyze.py.
Full step-by-step documentation, scripts, and HA YAML automations are available on GitHub.
Project & Repository
- GitHub Repository: GitHub - spectrelabo/ha-nest-smart-face-filter: [HA / CV] Event-driven face recognition for Google Nest & Home Assistant. Ultra-lightweight (<200MB RAM) using InsightFace ONNX. · GitHub
- Status: Open Source / MIT License.
Feedback, PRs, and suggestions are welcome! Let me know if this helps reduce your Nest notification fatigue.
Support the project: If this saved your server RAM or stopped your notification fatigue, consider buying me a coffee!