Skip to content

feat: native face recognition engine (issue #9, M1)#10

Open
Meldrey wants to merge 1 commit into
mainfrom
feat/native-face-engine
Open

feat: native face recognition engine (issue #9, M1)#10
Meldrey wants to merge 1 commit into
mainfrom
feat/native-face-engine

Conversation

@Meldrey

@Meldrey Meldrey commented Jun 27, 2026

Copy link
Copy Markdown
Member

Summary

Adds a native dlib-based face recognition engine, replacing the howdy PAM dependency for face verification.

What's in this PR (Milestone 1)

  • src/face/mod.rsFaceEngine wrapping dlib's FHOG face detector, 5-point landmark predictor, and ResNet face encoder. Produces 128-d face encodings identical to howdy/Python's face_recognition library.
  • src/face/models.rs — Howdy-compatible JSON model storage. Load, save, merge, and import from /lib/security/howdy/models/. Same schema (time, label, id, data: [[f64; 128]]).
  • tests/face_engine.rs — 4 integration tests: model loading, roundtrip, engine init, distance sanity.
  • .cargo/config.tomlLIBCLANG_PATH for bindgen compatibility.
  • Stubs for camera (camera.rs), overlay (overlay.rs), and vauth-verify binary — scaffolding for M2/M3.

Test results

54 tests passing (48 existing + 6 new face engine tests).

Build deps

  • dlib C++ library (pacman -S dlib on Arch)
  • cmake, openblas (already required)

Remaining milestones

M2: Camera capture | M3: GTK4 overlay | M4: Daemon integration | M5: Enrollment CLI | M6: Polish

Closes partially: #9

Add dlib-face-recognition integration replacing howdy dependency.

- src/face/mod.rs: FaceEngine with dlib FHOG detector, landmark
  predictor, and ResNet encoder. Produces 128-d face encodings
  compatible with howdy's model format.
- src/face/models.rs: howdy-compatible JSON model storage, import
  from /lib/security/howdy/models/, save/load/merge operations.
- src/face/camera.rs, overlay.rs: stubs for M2/M3.
- src/bin/vauth_verify.rs: stub binary for face overlay (M3).
- tests/face_engine.rs: 4 integration tests (model loading, roundtrip,
  engine init, distance sanity).
- .cargo/config.toml: LIBCLANG_PATH for bindgen/uhidrs-sys.

Build dep: dlib (C++ library with headers).
Ref: #9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant