Skip to content

Reduce false face detections and expose confidence sensitivity - #1632

Merged
emmertex merged 3 commits into
emmertex:stagingfrom
1234destiny1234:arena/57aa4761-lightcraft-classic
Nov 28, 2026
Merged

emmertex merged 3 commits into
emmertex:stagingfrom
1234destiny1234:arena/57aa4761-lightcraft-classic

Conversation

@1234destiny1234

@1234destiny1234 1234destiny1234 commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary
Related to #1444 — partial mitigation, not a complete resolution.

This PR reduces weak or misplaced face detections and adds a configurable detection confidence control.

Changes
Set the default detection confidence floor to 0.75.
Add Detection sensitivity / Confidence required in Settings → Faces.
Expose the setting through faces.matching as detectionScore (0.65–0.95; null restores the default).
Reject detections smaller than 24 pixels on either side in the detector input before landmark fitting and recognition.
Require confidence of at least 0.90 when FaceMesh cannot confirm a face.
Reject meshes whose face oval centre or size no longer corresponds to the detected box, guarding against retry crops locking onto a neighbouring face.
Add regression tests for mesh consistency and settings deserialization, plus documentation.
Behaviour and limitations
Settings apply to future detection jobs. Existing detections require an explicit rescan.
This change does not silently delete existing regions or change the existing protection for named and manually added regions.
Faces within background photographs or posters may still be detected.
Different real people receiving the same suggested identity is not directly fixed by this PR.
Validation
git diff --check passed.
Rust compilation, formatting checks, and tests have not been run because cargo, rustc, and rustfmt were unavailable in the editing environment.
The reporter’s examples and representative real-model precision/recall cases have not been validated.
Before merging
Run formatting checks, compile, and execute relevant engine, TFLite, and UI tests with the required Rust toolchain.
Validate against the reporter’s examples and representative group photos and profiles.
Assess recall loss from the confidence, minimum-size, and mesh-consistency gates; calibrate thresholds if needed.
Investigate incorrect identity matching separately.
This is a draft PR for review and validation. It should not automatically close #1444.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@1234destiny1234
1234destiny1234 marked this pull request as ready for review November 28, 2026 13:18
@emmertex
emmertex merged commit 44889b1 into emmertex:staging Nov 28, 2026
3 checks passed
@clydecbrown

Copy link
Copy Markdown
Collaborator

Hi @1234destiny1234, this PR missed language localizations for some new strings. It's failing 2 tests: lcc_ui_egui::i18n::tests::no_language_has_translation_gaps and lcc_ui_egui::tests_i18n_coverage::ui_text_is_in_every_catalog

@emmertex

Copy link
Copy Markdown
Owner

The two failing tests (@clydecbrown's note above) come from the three strings this PR added in Settings ▸ Faces — Detection sensitivity, Confidence required, and the hint under them. They went into crates/ui-egui/src/panels/faces.rs without entries in the fork catalogs (crates/ui-egui/locales/fork/<code>.json), so every language but English fell back to the English text.

Rectified in #1681 (Upstream intake 2026-11-29), commit dd8218597 — i18n: the Faces detection-sensitivity texts in every language: all three messages are now in every fork catalog (17 languages), and both lcc_ui_egui::i18n::tests::no_language_has_translation_gaps and lcc_ui_egui::tests_i18n_coverage::ui_text_is_in_every_catalog pass. The fix reaches staging when that intake round merges.

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.

feature improvement : facial recognition

3 participants