fix(workers-people): weak single-face suggestions require kNN consensus (≥2 faces ≤ 0.5) #822
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/quality-consensus-worker"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The weak single-face pass emitted suggestions on min-pairwise distance alone — an extreme-value statistic: with 387 assigned faces, one odd/blurry face of the person matches almost anything (production: adults suggested for a child at 43-58% similarity; one person had 173 pending weak suggestions).
Change
New
_weak_consensus_matchgating: a weak suggestion requires ≥2 assigned faces of the target person within min(0.5, suggest_max_distance) of the candidate face; confidence = 1 − mean of the k best supporting distances (k = min(3, support)) instead of the inflated 1 − bestDistance. Strong path (≤0.35), cluster-centroid path, and the emitted payload contract are unchanged (verified againstisWeakSingleFaceCandidate/ auto-accept guard). All distances in one vectorized NumPy pass (ISSUE-035 style). Matches Immich's minFaces core-point philosophy; the new confidence is always ≥ 0.5 so it aligns with the V135 sub-floor sweep in the companion API PR.Tests
19 weak-match tests (consensus gating, per-person support counting, band-edge narrowing, handler-level payload contract, William-style extreme-value regression, vectorized-vs-naive parity); golden clustering + cluster-match suites green (55/55 targeted, 59 combined). Pre-existing
test_face_model.pyfailures (8, baseline-verified on pristine main) documented as ISSUE-064; missing people-worker CI test job documented as ISSUE-063.Companion PR: V135 threshold floor 0.5 + sub-floor sweep + recognition re-arm debounce.