[Project] Lightweight Event-Driven Face Recognition for Nest Cameras (<200MB RAM, CPU-Only)

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_detected event.
  • 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 (.npy files) stored locally on your server. No original face photos are kept.

How It Works

  1. Nest sends a person_detected event via Google Access Console Pub/Sub to Home Assistant.
  2. HA triggers a camera.snapshot and calls a lightweight Python script.
  3. The script compares the face embedding in RAM against saved local embeddings (.npy).
  4. If it’s a known face (neighbor, family), it does nothing.
  5. If it’s an unknown face, HA fires a mobile push notification with the photo attached.

Quick Setup & Usage

  1. Install Python Dependencies:Bashpip install insightface onnxruntime opencv-python-headless numpy requests
  2. Register Known Faces: Run the included create_embeddings.py helper to convert clean face photos of your family/neighbors into local .npy vector files under /config/face_recognition/embeddings/.
  3. 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

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!