feat: native face recognition engine (issue #9, M1)#10
Open
Meldrey wants to merge 1 commit into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.rs—FaceEnginewrapping dlib's FHOG face detector, 5-point landmark predictor, and ResNet face encoder. Produces 128-d face encodings identical to howdy/Python'sface_recognitionlibrary.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.toml—LIBCLANG_PATHfor bindgen compatibility.camera.rs), overlay (overlay.rs), andvauth-verifybinary — scaffolding for M2/M3.Test results
54 tests passing (48 existing + 6 new face engine tests).
Build deps
dlibC++ library (pacman -S dlibon Arch)cmake,openblas(already required)Remaining milestones
M2: Camera capture | M3: GTK4 overlay | M4: Daemon integration | M5: Enrollment CLI | M6: Polish
Closes partially: #9