Skip to content

v0.8.1: Cross-platform face detection

Choose a tag to compare

@aaron777collins aaron777collins released this 29 Jun 05:02

What's Changed

Fix: Face detection now works cross-platform

Replaced face_recognition (dlib) with OpenCV's built-in YuNet face detector + SFace recognizer.

Before: Face detection depended on dlib, which requires C++ compilation and frequently fails to install on macOS, Windows, and ARM platforms. When it failed, face detection silently returned zero results.

After: Face detection uses ONNX models that ship with opencv-python-headless (already a core dependency). No extra build tools, no C++ compiler, no platform-specific issues. Models (~37 MB total) are auto-downloaded on first use and cached locally.

Changes

  • Rewrote recognize.py to use cv2.FaceDetectorYN (YuNet) + cv2.FaceRecognizerSF (SFace)
  • Updated blur.py video frame processing to use the new detector
  • Updated ai.count_faces() to use YuNet with Haar cascade as fallback
  • Removed optional face_recognition/dlib dependency from pyproject.toml
  • Bumped scan cache version to force re-scan with new detector
  • Updated docs (CLAUDE.md, ARCHITECTURE.md)