Phase 1: fix face quality sharpness scoring #89

Merged
ilia merged 1 commits from fix/face-quality-sharpness-phase1 into master 2026-08-05 10:07:58 -05:00
Owner

Summary

  • Fix calculate_face_quality_score so sharpness uses Laplacian variance of the face crop (was variance of the 3×3 kernel — always ~constant)
  • Add face_laplacian_variance helper + tests/test_face_quality_score.py
  • Doc: docs/FACE_MATCH_ERROR_TAGGING.md checklist for sampling ~100 Auto-Match/Identify misses
  • ROADMAP: face recognition accuracy phases 1–6

Note

Existing DB quality_score values are unchanged until faces are re-processed (Phase 3).

Test plan

  • pytest tests/test_face_quality_score.py -v --noconftest (4 passed)
  • ruff check backend/services/face_service.py
  • CI green
## Summary - Fix `calculate_face_quality_score` so sharpness uses Laplacian variance of the **face crop** (was variance of the 3×3 kernel — always ~constant) - Add `face_laplacian_variance` helper + `tests/test_face_quality_score.py` - Doc: `docs/FACE_MATCH_ERROR_TAGGING.md` checklist for sampling ~100 Auto-Match/Identify misses - ROADMAP: face recognition accuracy phases 1–6 ## Note Existing DB `quality_score` values are unchanged until faces are re-processed (Phase 3). ## Test plan - [x] `pytest tests/test_face_quality_score.py -v --noconftest` (4 passed) - [x] `ruff check backend/services/face_service.py` - [ ] CI green
ilia added 1 commit 2026-08-05 10:04:05 -05:00
Fix face quality sharpness: Laplacian on face crop (Phase 1).
CI / skip-ci-check (pull_request) Successful in 30s
CI / python-lint (pull_request) Successful in 32s
CI / docker-ci (pull_request) Successful in 33s
CI / secret-scan (pull_request) Successful in 36s
CI / viewer-unit (pull_request) Successful in 1m44s
CI / e2e (pull_request) Successful in 1m54s
CI / admin-unit (pull_request) Successful in 2m0s
7856be47ff
Sharpness previously used variance of the kernel constant, so every face
got ~0 sharpness weight. Compute Laplacian variance on the grayscale crop;
add unit tests and an error-tagging checklist for follow-on accuracy work.
ilia scheduled this pull request to auto merge when all checks succeed 2026-08-05 10:05:57 -05:00
ilia merged commit dfd0c582e6 into master 2026-08-05 10:07:58 -05:00
ilia deleted branch fix/face-quality-sharpness-phase1 2026-08-05 10:07:58 -05:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ilia/punimtag#89